]> git.baikalelectronics.ru Git - kernel.git/commit
ath9k: fix BSSID mask calculation
authorFelix Fietkau <nbd@openwrt.org>
Tue, 14 Sep 2010 16:37:19 +0000 (18:37 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 14 Sep 2010 20:14:26 +0000 (16:14 -0400)
commitd4ab8fcf7f84b0441ef1502f370433084a4843e9
treefd31575a505b3affea5b4fe7ae0bd40f2d70419a
parent6bbe8003b9bd0ac129954f5d5da198b58fb8a54c
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>
drivers/net/wireless/ath/ath9k/ath9k.h
drivers/net/wireless/ath/ath9k/main.c
drivers/net/wireless/ath/ath9k/virtual.c