mac80211: Use eth_<foo>_addr instead of memset
authorJoe Perches <joe@perches.com>
Tue, 3 Mar 2015 03:54:57 +0000 (19:54 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Mar 2015 22:01:38 +0000 (17:01 -0500)
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>
net/mac80211/cfg.c
net/mac80211/ibss.c
net/mac80211/mesh.c
net/mac80211/mlme.c

index dd4ff36..74f509c 100644 (file)
@@ -1488,7 +1488,7 @@ static void mpath_set_pinfo(struct mesh_path *mpath, u8 *next_hop,
        if (next_hop_sta)
                memcpy(next_hop, next_hop_sta->sta.addr, ETH_ALEN);
        else
-               memset(next_hop, 0, ETH_ALEN);
+               eth_zero_addr(next_hop);
 
        memset(pinfo, 0, sizeof(*pinfo));
 
index b606b53..f9b0758 100644 (file)
@@ -1742,7 +1742,7 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)
 
        ieee80211_ibss_disconnect(sdata);
        ifibss->ssid_len = 0;
-       memset(ifibss->bssid, 0, ETH_ALEN);
+       eth_zero_addr(ifibss->bssid);
 
        /* remove beacon */
        kfree(sdata->u.ibss.ie);
index 0c8b2a7..49a44bc 100644 (file)
@@ -520,7 +520,7 @@ int ieee80211_fill_mesh_addresses(struct ieee80211_hdr *hdr, __le16 *fc,
        } else {
                *fc |= cpu_to_le16(IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS);
                /* 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->addr3, meshda, ETH_ALEN);
                memcpy(hdr->addr4, meshsa, ETH_ALEN);
index 10ac632..9f6f356 100644 (file)
@@ -2033,7 +2033,7 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
                ieee80211_flush_queues(local, sdata, false);
 
        /* 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 */
        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);
                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);
                sdata->u.mgd.flags = 0;
                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);
                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);
                sdata->u.mgd.flags = 0;
                mutex_lock(&sdata->local->mtx);
@@ -4474,7 +4474,7 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata,
        return 0;
 
  err_clear:
-       memset(ifmgd->bssid, 0, ETH_ALEN);
+       eth_zero_addr(ifmgd->bssid);
        ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BSSID);
        ifmgd->auth_data = NULL;
  err_free:
@@ -4817,7 +4817,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
 
        return 0;
  err_clear:
-       memset(ifmgd->bssid, 0, ETH_ALEN);
+       eth_zero_addr(ifmgd->bssid);
        ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BSSID);
        ifmgd->assoc_data = NULL;
  err_free: