diff options
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ar9170/main.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/base.c | 17 |
2 files changed, 12 insertions, 19 deletions
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c index 257c734733d1..b43d4b006d7e 100644 --- a/drivers/net/wireless/ath/ar9170/main.c +++ b/drivers/net/wireless/ath/ar9170/main.c | |||
@@ -2045,21 +2045,17 @@ out: | |||
2045 | return err; | 2045 | return err; |
2046 | } | 2046 | } |
2047 | 2047 | ||
2048 | static u64 ar9170_op_prepare_multicast(struct ieee80211_hw *hw, int mc_count, | 2048 | static u64 ar9170_op_prepare_multicast(struct ieee80211_hw *hw, |
2049 | struct dev_addr_list *mclist) | 2049 | struct netdev_hw_addr_list *mc_list) |
2050 | { | 2050 | { |
2051 | u64 mchash; | 2051 | u64 mchash; |
2052 | int i; | 2052 | struct netdev_hw_addr *ha; |
2053 | 2053 | ||
2054 | /* always get broadcast frames */ | 2054 | /* always get broadcast frames */ |
2055 | mchash = 1ULL << (0xff >> 2); | 2055 | mchash = 1ULL << (0xff >> 2); |
2056 | 2056 | ||
2057 | for (i = 0; i < mc_count; i++) { | 2057 | netdev_hw_addr_list_for_each(ha, mc_list) |
2058 | if (WARN_ON(!mclist)) | 2058 | mchash |= 1ULL << (ha->addr[5] >> 2); |
2059 | break; | ||
2060 | mchash |= 1ULL << (mclist->dmi_addr[5] >> 2); | ||
2061 | mclist = mclist->next; | ||
2062 | } | ||
2063 | 2059 | ||
2064 | return mchash; | 2060 | return mchash; |
2065 | } | 2061 | } |
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index b142a78ed1e5..53a2340f52bc 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
@@ -230,7 +230,7 @@ static void ath5k_remove_interface(struct ieee80211_hw *hw, | |||
230 | struct ieee80211_vif *vif); | 230 | struct ieee80211_vif *vif); |
231 | static int ath5k_config(struct ieee80211_hw *hw, u32 changed); | 231 | static int ath5k_config(struct ieee80211_hw *hw, u32 changed); |
232 | static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw, | 232 | static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw, |
233 | int mc_count, struct dev_addr_list *mc_list); | 233 | struct netdev_hw_addr_list *mc_list); |
234 | static void ath5k_configure_filter(struct ieee80211_hw *hw, | 234 | static void ath5k_configure_filter(struct ieee80211_hw *hw, |
235 | unsigned int changed_flags, | 235 | unsigned int changed_flags, |
236 | unsigned int *new_flags, | 236 | unsigned int *new_flags, |
@@ -2999,22 +2999,20 @@ unlock: | |||
2999 | } | 2999 | } |
3000 | 3000 | ||
3001 | static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw, | 3001 | static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw, |
3002 | int mc_count, struct dev_addr_list *mclist) | 3002 | struct netdev_hw_addr_list *mc_list) |
3003 | { | 3003 | { |
3004 | u32 mfilt[2], val; | 3004 | u32 mfilt[2], val; |
3005 | int i; | ||
3006 | u8 pos; | 3005 | u8 pos; |
3006 | struct netdev_hw_addr *ha; | ||
3007 | 3007 | ||
3008 | mfilt[0] = 0; | 3008 | mfilt[0] = 0; |
3009 | mfilt[1] = 1; | 3009 | mfilt[1] = 1; |
3010 | 3010 | ||
3011 | for (i = 0; i < mc_count; i++) { | 3011 | netdev_hw_addr_list_for_each(ha, mc_list) { |
3012 | if (!mclist) | ||
3013 | break; | ||
3014 | /* calculate XOR of eight 6-bit values */ | 3012 | /* calculate XOR of eight 6-bit values */ |
3015 | val = get_unaligned_le32(mclist->dmi_addr + 0); | 3013 | val = get_unaligned_le32(ha->addr + 0); |
3016 | pos = (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; | 3014 | pos = (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; |
3017 | val = get_unaligned_le32(mclist->dmi_addr + 3); | 3015 | val = get_unaligned_le32(ha->addr + 3); |
3018 | pos ^= (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; | 3016 | pos ^= (val >> 18) ^ (val >> 12) ^ (val >> 6) ^ val; |
3019 | pos &= 0x3f; | 3017 | pos &= 0x3f; |
3020 | mfilt[pos / 32] |= (1 << (pos % 32)); | 3018 | mfilt[pos / 32] |= (1 << (pos % 32)); |
@@ -3022,8 +3020,7 @@ static u64 ath5k_prepare_multicast(struct ieee80211_hw *hw, | |||
3022 | * but not sure, needs testing, if we do use this we'd | 3020 | * but not sure, needs testing, if we do use this we'd |
3023 | * neet to inform below to not reset the mcast */ | 3021 | * neet to inform below to not reset the mcast */ |
3024 | /* ath5k_hw_set_mcast_filterindex(ah, | 3022 | /* ath5k_hw_set_mcast_filterindex(ah, |
3025 | * mclist->dmi_addr[5]); */ | 3023 | * ha->addr[5]); */ |
3026 | mclist = mclist->next; | ||
3027 | } | 3024 | } |
3028 | 3025 | ||
3029 | return ((u64)(mfilt[1]) << 32) | mfilt[0]; | 3026 | return ((u64)(mfilt[1]) << 32) | mfilt[0]; |