diff options
author | Joe Perches <joe@perches.com> | 2015-03-02 22:54:49 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-03 17:01:36 -0500 |
commit | 93803b3385c653bc6fd391c0de00ef811b3dadc0 (patch) | |
tree | e235b7e13f190356597758d2f498ce4e79d6d5a8 /drivers/net/wireless/ath/ath9k | |
parent | 519983b129477cb8e0bbea334c72ecd4486b2d21 (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/ath/ath9k')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index 92d5a6c5a225..564923c0df87 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c | |||
@@ -149,7 +149,7 @@ static void ath9k_htc_set_mac_bssid_mask(struct ath9k_htc_priv *priv, | |||
149 | * when matching addresses. | 149 | * when matching addresses. |
150 | */ | 150 | */ |
151 | iter_data.hw_macaddr = NULL; | 151 | iter_data.hw_macaddr = NULL; |
152 | memset(&iter_data.mask, 0xff, ETH_ALEN); | 152 | eth_broadcast_addr(iter_data.mask); |
153 | 153 | ||
154 | if (vif) | 154 | if (vif) |
155 | ath9k_htc_bssid_iter(&iter_data, vif->addr, vif); | 155 | ath9k_htc_bssid_iter(&iter_data, vif->addr, vif); |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 9ede991b8d76..93ed99a72542 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -994,7 +994,7 @@ void ath9k_calculate_iter_data(struct ath_softc *sc, | |||
994 | * BSSID mask when matching addresses. | 994 | * BSSID mask when matching addresses. |
995 | */ | 995 | */ |
996 | memset(iter_data, 0, sizeof(*iter_data)); | 996 | memset(iter_data, 0, sizeof(*iter_data)); |
997 | memset(&iter_data->mask, 0xff, ETH_ALEN); | 997 | eth_broadcast_addr(iter_data->mask); |
998 | iter_data->slottime = ATH9K_SLOT_TIME_9; | 998 | iter_data->slottime = ATH9K_SLOT_TIME_9; |
999 | 999 | ||
1000 | list_for_each_entry(avp, &ctx->vifs, list) | 1000 | list_for_each_entry(avp, &ctx->vifs, list) |
@@ -1139,7 +1139,7 @@ void ath9k_calculate_summary_state(struct ath_softc *sc, | |||
1139 | ctx->primary_sta = iter_data.primary_sta; | 1139 | ctx->primary_sta = iter_data.primary_sta; |
1140 | } else { | 1140 | } else { |
1141 | ctx->primary_sta = NULL; | 1141 | ctx->primary_sta = NULL; |
1142 | memset(common->curbssid, 0, ETH_ALEN); | 1142 | eth_zero_addr(common->curbssid); |
1143 | common->curaid = 0; | 1143 | common->curaid = 0; |
1144 | ath9k_hw_write_associd(sc->sc_ah); | 1144 | ath9k_hw_write_associd(sc->sc_ah); |
1145 | if (ath9k_hw_mci_is_enabled(sc->sc_ah)) | 1145 | if (ath9k_hw_mci_is_enabled(sc->sc_ah)) |