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
@@ -468,7 +468,7 @@ static void wl1251_op_stop(struct ieee80211_hw *hw)
|
||||
wl1251_tx_flush(wl);
|
||||
wl1251_power_off(wl);
|
||||
|
||||
memset(wl->bssid, 0, ETH_ALEN);
|
||||
eth_zero_addr(wl->bssid);
|
||||
wl->listen_int = 1;
|
||||
wl->bss_type = MAX_BSS_TYPE;
|
||||
|
||||
@@ -547,7 +547,7 @@ static void wl1251_op_remove_interface(struct ieee80211_hw *hw,
|
||||
mutex_lock(&wl->mutex);
|
||||
wl1251_debug(DEBUG_MAC80211, "mac80211 remove interface");
|
||||
wl->vif = NULL;
|
||||
memset(wl->bssid, 0, ETH_ALEN);
|
||||
eth_zero_addr(wl->bssid);
|
||||
mutex_unlock(&wl->mutex);
|
||||
}
|
||||
|
||||
|
@@ -367,7 +367,7 @@ void wl12xx_free_link(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 *hlid)
|
||||
wl->links[*hlid].allocated_pkts = 0;
|
||||
wl->links[*hlid].prev_freed_pkts = 0;
|
||||
wl->links[*hlid].ba_bitmap = 0;
|
||||
memset(wl->links[*hlid].addr, 0, ETH_ALEN);
|
||||
eth_zero_addr(wl->links[*hlid].addr);
|
||||
|
||||
/*
|
||||
* At this point op_tx() will not add more packets to the queues. We
|
||||
@@ -1293,7 +1293,7 @@ int wl1271_cmd_build_arp_rsp(struct wl1271 *wl, struct wl12xx_vif *wlvif)
|
||||
hdr->frame_control = cpu_to_le16(fc);
|
||||
memcpy(hdr->addr1, vif->bss_conf.bssid, ETH_ALEN);
|
||||
memcpy(hdr->addr2, vif->addr, ETH_ALEN);
|
||||
memset(hdr->addr3, 0xff, ETH_ALEN);
|
||||
eth_broadcast_addr(hdr->addr3);
|
||||
|
||||
ret = wl1271_cmd_template_set(wl, wlvif->role_id, CMD_TEMPL_ARP_RSP,
|
||||
skb->data, skb->len, 0,
|
||||
|
Reference in New Issue
Block a user