]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: fix BSS comparison
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Mon, 30 Apr 2012 07:23:36 +0000 (10:23 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 9 May 2012 01:53:56 +0000 (21:53 -0400)
commitf1f6c1390d8f7bafad30f4b2887b07d8809d4d23
treeee63bb53677f27f2de3db2c6801b78d5a8ce2a27
parent2fcc606ffa1215457a45a9a6397f2023a45faa19
cfg80211: fix BSS comparison

Since the BSS table is organized in a RB tree, the BSSs need to be
comparable. This means that we must define a < and > operator to
the BSS object.
compare_ethr_addr isn't enough since it returns only a binary value.

Since Felix's

cfg80211: use compare_ether_addr on MAC addresses instead of memcmp

    Because of the constant size and guaranteed 16 bit alignment, the inline
    compare_ether_addr function is much cheaper than calling memcmp.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The BSS table is corrupted: rb_find_bss can't find the bss.
As a result BSSes are duplicated in the BSS table, and we get stuck
while probing an AP before associating (in STA mode).

Change-Id: I85928756f4328028230832c1565ece7f412f3843
CC: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/wireless/scan.c