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
@@ -2866,7 +2866,7 @@ static void b43legacy_op_bss_info_changed(struct ieee80211_hw *hw,
|
||||
if (conf->bssid)
|
||||
memcpy(wl->bssid, conf->bssid, ETH_ALEN);
|
||||
else
|
||||
memset(wl->bssid, 0, ETH_ALEN);
|
||||
eth_zero_addr(wl->bssid);
|
||||
}
|
||||
|
||||
if (b43legacy_status(dev) >= B43legacy_STAT_INITIALIZED) {
|
||||
@@ -3470,7 +3470,7 @@ static void b43legacy_op_remove_interface(struct ieee80211_hw *hw,
|
||||
|
||||
spin_lock_irqsave(&wl->irq_lock, flags);
|
||||
b43legacy_adjust_opmode(dev);
|
||||
memset(wl->mac_addr, 0, ETH_ALEN);
|
||||
eth_zero_addr(wl->mac_addr);
|
||||
b43legacy_upload_card_macaddress(dev);
|
||||
spin_unlock_irqrestore(&wl->irq_lock, flags);
|
||||
|
||||
@@ -3487,8 +3487,8 @@ static int b43legacy_op_start(struct ieee80211_hw *hw)
|
||||
/* Kill all old instance specific information to make sure
|
||||
* the card won't use it in the short timeframe between start
|
||||
* and mac80211 reconfiguring it. */
|
||||
memset(wl->bssid, 0, ETH_ALEN);
|
||||
memset(wl->mac_addr, 0, ETH_ALEN);
|
||||
eth_zero_addr(wl->bssid);
|
||||
eth_zero_addr(wl->mac_addr);
|
||||
wl->filter_flags = 0;
|
||||
wl->beacon0_uploaded = false;
|
||||
wl->beacon1_uploaded = false;
|
||||
|
Reference in New Issue
Block a user