aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/brcm80211/brcmfmac
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2015-03-02 22:54:49 -0500
committerDavid S. Miller <davem@davemloft.net>2015-03-03 17:01:36 -0500
commit93803b3385c653bc6fd391c0de00ef811b3dadc0 (patch)
treee235b7e13f190356597758d2f498ce4e79d6d5a8 /drivers/net/wireless/brcm80211/brcmfmac
parent519983b129477cb8e0bbea334c72ecd4486b2d21 (diff)
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>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac')
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c12
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/flowring.c2
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/p2p.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
index b59b8c6c42ab..06727a61b438 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
@@ -700,7 +700,7 @@ s32 brcmf_notify_escan_complete(struct brcmf_cfg80211_info *cfg,
700 /* Do a scan abort to stop the driver's scan engine */ 700 /* Do a scan abort to stop the driver's scan engine */
701 brcmf_dbg(SCAN, "ABORT scan in firmware\n"); 701 brcmf_dbg(SCAN, "ABORT scan in firmware\n");
702 memset(&params_le, 0, sizeof(params_le)); 702 memset(&params_le, 0, sizeof(params_le));
703 memset(params_le.bssid, 0xFF, ETH_ALEN); 703 eth_broadcast_addr(params_le.bssid);
704 params_le.bss_type = DOT11_BSSTYPE_ANY; 704 params_le.bss_type = DOT11_BSSTYPE_ANY;
705 params_le.scan_type = 0; 705 params_le.scan_type = 0;
706 params_le.channel_num = cpu_to_le32(1); 706 params_le.channel_num = cpu_to_le32(1);
@@ -866,7 +866,7 @@ static void brcmf_escan_prep(struct brcmf_cfg80211_info *cfg,
866 char *ptr; 866 char *ptr;
867 struct brcmf_ssid_le ssid_le; 867 struct brcmf_ssid_le ssid_le;
868 868
869 memset(params_le->bssid, 0xFF, ETH_ALEN); 869 eth_broadcast_addr(params_le->bssid);
870 params_le->bss_type = DOT11_BSSTYPE_ANY; 870 params_le->bss_type = DOT11_BSSTYPE_ANY;
871 params_le->scan_type = 0; 871 params_le->scan_type = 0;
872 params_le->channel_num = 0; 872 params_le->channel_num = 0;
@@ -1375,8 +1375,8 @@ brcmf_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *ndev,
1375 BRCMF_ASSOC_PARAMS_FIXED_SIZE; 1375 BRCMF_ASSOC_PARAMS_FIXED_SIZE;
1376 memcpy(profile->bssid, params->bssid, ETH_ALEN); 1376 memcpy(profile->bssid, params->bssid, ETH_ALEN);
1377 } else { 1377 } else {
1378 memset(join_params.params_le.bssid, 0xFF, ETH_ALEN); 1378 eth_broadcast_addr(join_params.params_le.bssid);
1379 memset(profile->bssid, 0, ETH_ALEN); 1379 eth_zero_addr(profile->bssid);
1380 } 1380 }
1381 1381
1382 /* Channel */ 1382 /* Channel */
@@ -1850,7 +1850,7 @@ brcmf_cfg80211_connect(struct wiphy *wiphy, struct net_device *ndev,
1850 if (sme->bssid) 1850 if (sme->bssid)
1851 memcpy(&ext_join_params->assoc_le.bssid, sme->bssid, ETH_ALEN); 1851 memcpy(&ext_join_params->assoc_le.bssid, sme->bssid, ETH_ALEN);
1852 else 1852 else
1853 memset(&ext_join_params->assoc_le.bssid, 0xFF, ETH_ALEN); 1853 eth_broadcast_addr(ext_join_params->assoc_le.bssid);
1854 1854
1855 if (cfg->channel) { 1855 if (cfg->channel) {
1856 ext_join_params->assoc_le.chanspec_num = cpu_to_le32(1); 1856 ext_join_params->assoc_le.chanspec_num = cpu_to_le32(1);
@@ -1895,7 +1895,7 @@ brcmf_cfg80211_connect(struct wiphy *wiphy, struct net_device *ndev,
1895 if (sme->bssid) 1895 if (sme->bssid)
1896 memcpy(join_params.params_le.bssid, sme->bssid, ETH_ALEN); 1896 memcpy(join_params.params_le.bssid, sme->bssid, ETH_ALEN);
1897 else 1897 else
1898 memset(join_params.params_le.bssid, 0xFF, ETH_ALEN); 1898 eth_broadcast_addr(join_params.params_le.bssid);
1899 1899
1900 if (cfg->channel) { 1900 if (cfg->channel) {
1901 join_params.params_le.chanspec_list[0] = cpu_to_le16(chanspec); 1901 join_params.params_le.chanspec_list[0] = cpu_to_le16(chanspec);
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/flowring.c b/drivers/net/wireless/brcm80211/brcmfmac/flowring.c
index 910fbb561469..eb1325371d3a 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/flowring.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/flowring.c
@@ -236,7 +236,7 @@ void brcmf_flowring_delete(struct brcmf_flowring *flow, u8 flowid)
236 brcmf_flowring_block(flow, flowid, false); 236 brcmf_flowring_block(flow, flowid, false);
237 hash_idx = ring->hash_id; 237 hash_idx = ring->hash_id;
238 flow->hash[hash_idx].ifidx = BRCMF_FLOWRING_INVALID_IFIDX; 238 flow->hash[hash_idx].ifidx = BRCMF_FLOWRING_INVALID_IFIDX;
239 memset(flow->hash[hash_idx].mac, 0, ETH_ALEN); 239 eth_zero_addr(flow->hash[hash_idx].mac);
240 flow->rings[flowid] = NULL; 240 flow->rings[flowid] = NULL;
241 241
242 skb = skb_dequeue(&ring->skblist); 242 skb = skb_dequeue(&ring->skblist);
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c
index effb48ebd864..98d82ec52de1 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c
@@ -697,7 +697,7 @@ static s32 brcmf_p2p_escan(struct brcmf_p2p_info *p2p, u32 num_chans,
697 else 697 else
698 sparams->scan_type = 1; 698 sparams->scan_type = 1;
699 699
700 memset(&sparams->bssid, 0xFF, ETH_ALEN); 700 eth_broadcast_addr(sparams->bssid);
701 if (ssid.SSID_len) 701 if (ssid.SSID_len)
702 memcpy(sparams->ssid_le.SSID, ssid.SSID, ssid.SSID_len); 702 memcpy(sparams->ssid_le.SSID, ssid.SSID, ssid.SSID_len);
703 sparams->ssid_le.SSID_len = cpu_to_le32(ssid.SSID_len); 703 sparams->ssid_le.SSID_len = cpu_to_le32(ssid.SSID_len);