summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/main.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-09-14 18:37:19 +0200
committerJohn W. Linville <linville@tuxdriver.com>2010-09-14 16:14:26 -0400
commit31a01645c0c7b46d7f74777cd2a66ddb2a22bbd9 (patch)
treefd31575a505b3affea5b4fe7ae0bd40f2d70419a /drivers/net/wireless/ath/ath9k/main.c
parent4a0e8ecca4eeed38d4b3b7a317a3aaab4dd3cacd (diff)
downloadtalos-obmc-linux-31a01645c0c7b46d7f74777cd2a66ddb2a22bbd9.tar.gz
talos-obmc-linux-31a01645c0c7b46d7f74777cd2a66ddb2a22bbd9.zip
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.c2
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 1165f909ef04..d3f96e4520f1 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,
sc->nvifs++;
if (ah->caps.hw_caps & ATH9K_HW_CAP_BSSIDMASK)
- ath9k_set_bssid_mask(hw);
+ ath9k_set_bssid_mask(hw, vif);
if (sc->nvifs > 1)
goto out; /* skip global settings for secondary vif */
OpenPOWER on IntegriCloud