diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-09-14 12:37:19 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-09-14 16:14:26 -0400 |
commit | 31a01645c0c7b46d7f74777cd2a66ddb2a22bbd9 (patch) | |
tree | fd31575a505b3affea5b4fe7ae0bd40f2d70419a /drivers/net/wireless/ath/ath9k/main.c | |
parent | 4a0e8ecca4eeed38d4b3b7a317a3aaab4dd3cacd (diff) |
ath9k: fix BSSID mask calculation
At the time the .add_interface driver op is called, the interface has not
been marked as running yet, so ieee80211_iterate_active_interfaces will
not pass it to the iterator function.
Because of this, the calculated BSSID mask is wrong, which breaks multi-BSS
operation.
Additionally, the current way of comparing all addresses against each other
is pointless, as the hardware only uses the hardware MAC address and the BSSID
mask for matching the destination address, so all the address array
reallocation is completely unnecessary.
This patch simplifies the logic by setting the initial mask bytes to 0xff
and removing all bits in the iterator call that don't match the hardware MAC
address. It also calls the iterator for the vif that was passed to
add_interface()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Tested-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 1165f909ef0..d3f96e4520f 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -1415,7 +1415,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, | |||
1415 | sc->nvifs++; | 1415 | sc->nvifs++; |
1416 | 1416 | ||
1417 | if (ah->caps.hw_caps & ATH9K_HW_CAP_BSSIDMASK) | 1417 | if (ah->caps.hw_caps & ATH9K_HW_CAP_BSSIDMASK) |
1418 | ath9k_set_bssid_mask(hw); | 1418 | ath9k_set_bssid_mask(hw, vif); |
1419 | 1419 | ||
1420 | if (sc->nvifs > 1) | 1420 | if (sc->nvifs > 1) |
1421 | goto out; /* skip global settings for secondary vif */ | 1421 | goto out; /* skip global settings for secondary vif */ |