wireless: Use eth_<foo>_addr instead of memset
Use the built-in function instead of memset. Miscellanea: Add #include <linux/etherdevice.h> where appropriate Use ETH_ALEN instead of 6 Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
519983b129
commit
93803b3385
@@ -2676,7 +2676,7 @@ static void wifi_setup(struct net_device *dev)
|
||||
dev->addr_len = ETH_ALEN;
|
||||
dev->tx_queue_len = 100;
|
||||
|
||||
memset(dev->broadcast,0xFF, ETH_ALEN);
|
||||
eth_broadcast_addr(dev->broadcast);
|
||||
|
||||
dev->flags = IFF_BROADCAST|IFF_MULTICAST;
|
||||
}
|
||||
@@ -3273,7 +3273,7 @@ static void airo_handle_link(struct airo_info *ai)
|
||||
}
|
||||
|
||||
/* Send event to user space */
|
||||
memset(wrqu.ap_addr.sa_data, '\0', ETH_ALEN);
|
||||
eth_zero_addr(wrqu.ap_addr.sa_data);
|
||||
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
|
||||
wireless_send_event(ai->dev, SIOCGIWAP, &wrqu, NULL);
|
||||
}
|
||||
|
Reference in New Issue
Block a user