mac80211: Use eth_<foo>_addr instead of memset

Use the built-in function instead of memset.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Joe Perches 2015-03-02 19:54:57 -08:00 committed by David S. Miller
parent afc130dd39
commit c84a67a2fc
4 changed files with 8 additions and 8 deletions

View File

@ -1488,7 +1488,7 @@ static void mpath_set_pinfo(struct mesh_path *mpath, u8 *next_hop,
if (next_hop_sta) if (next_hop_sta)
memcpy(next_hop, next_hop_sta->sta.addr, ETH_ALEN); memcpy(next_hop, next_hop_sta->sta.addr, ETH_ALEN);
else else
memset(next_hop, 0, ETH_ALEN); eth_zero_addr(next_hop);
memset(pinfo, 0, sizeof(*pinfo)); memset(pinfo, 0, sizeof(*pinfo));

View File

@ -1742,7 +1742,7 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)
ieee80211_ibss_disconnect(sdata); ieee80211_ibss_disconnect(sdata);
ifibss->ssid_len = 0; ifibss->ssid_len = 0;
memset(ifibss->bssid, 0, ETH_ALEN); eth_zero_addr(ifibss->bssid);
/* remove beacon */ /* remove beacon */
kfree(sdata->u.ibss.ie); kfree(sdata->u.ibss.ie);

View File

@ -520,7 +520,7 @@ int ieee80211_fill_mesh_addresses(struct ieee80211_hdr *hdr, __le16 *fc,
} else { } else {
*fc |= cpu_to_le16(IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS); *fc |= cpu_to_le16(IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS);
/* RA TA DA SA */ /* RA TA DA SA */
memset(hdr->addr1, 0, ETH_ALEN); /* RA is resolved later */ eth_zero_addr(hdr->addr1); /* RA is resolved later */
memcpy(hdr->addr2, meshsa, ETH_ALEN); memcpy(hdr->addr2, meshsa, ETH_ALEN);
memcpy(hdr->addr3, meshda, ETH_ALEN); memcpy(hdr->addr3, meshda, ETH_ALEN);
memcpy(hdr->addr4, meshsa, ETH_ALEN); memcpy(hdr->addr4, meshsa, ETH_ALEN);

View File

@ -2033,7 +2033,7 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
ieee80211_flush_queues(local, sdata, false); ieee80211_flush_queues(local, sdata, false);
/* clear bssid only after building the needed mgmt frames */ /* clear bssid only after building the needed mgmt frames */
memset(ifmgd->bssid, 0, ETH_ALEN); eth_zero_addr(ifmgd->bssid);
/* remove AP and TDLS peers */ /* remove AP and TDLS peers */
sta_info_flush(sdata); sta_info_flush(sdata);
@ -2464,7 +2464,7 @@ static void ieee80211_destroy_auth_data(struct ieee80211_sub_if_data *sdata,
del_timer_sync(&sdata->u.mgd.timer); del_timer_sync(&sdata->u.mgd.timer);
sta_info_destroy_addr(sdata, auth_data->bss->bssid); sta_info_destroy_addr(sdata, auth_data->bss->bssid);
memset(sdata->u.mgd.bssid, 0, ETH_ALEN); eth_zero_addr(sdata->u.mgd.bssid);
ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BSSID); ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BSSID);
sdata->u.mgd.flags = 0; sdata->u.mgd.flags = 0;
mutex_lock(&sdata->local->mtx); mutex_lock(&sdata->local->mtx);
@ -2777,7 +2777,7 @@ static void ieee80211_destroy_assoc_data(struct ieee80211_sub_if_data *sdata,
del_timer_sync(&sdata->u.mgd.timer); del_timer_sync(&sdata->u.mgd.timer);
sta_info_destroy_addr(sdata, assoc_data->bss->bssid); sta_info_destroy_addr(sdata, assoc_data->bss->bssid);
memset(sdata->u.mgd.bssid, 0, ETH_ALEN); eth_zero_addr(sdata->u.mgd.bssid);
ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BSSID); ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BSSID);
sdata->u.mgd.flags = 0; sdata->u.mgd.flags = 0;
mutex_lock(&sdata->local->mtx); mutex_lock(&sdata->local->mtx);
@ -4474,7 +4474,7 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata,
return 0; return 0;
err_clear: err_clear:
memset(ifmgd->bssid, 0, ETH_ALEN); eth_zero_addr(ifmgd->bssid);
ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BSSID); ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BSSID);
ifmgd->auth_data = NULL; ifmgd->auth_data = NULL;
err_free: err_free:
@ -4817,7 +4817,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
return 0; return 0;
err_clear: err_clear:
memset(ifmgd->bssid, 0, ETH_ALEN); eth_zero_addr(ifmgd->bssid);
ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BSSID); ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BSSID);
ifmgd->assoc_data = NULL; ifmgd->assoc_data = NULL;
err_free: err_free: