[PATCH 2/5] net: ifup: use accessor to set network device ip/netmask

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We have accessors to set a network devices ip/netmask. Use them
instead of accessing the struct members directly.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 net/ifup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ifup.c b/net/ifup.c
index 5b92ee794d..2e1a5529a8 100644
--- a/net/ifup.c
+++ b/net/ifup.c
@@ -133,8 +133,8 @@ static int source_env_network(struct eth_device *edev)
 		memcpy(edev->ethaddr, ethaddr, 6);
 
 	if (mode == ETH_MODE_STATIC) {
-		edev->ipaddr = ipaddr;
-		edev->netmask = netmask;
+		net_set_ip(edev, ipaddr);
+		net_set_netmask(edev, netmask);
 		if (gateway)
 			net_set_gateway(gateway);
 		if (serverip)
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux