Hi LQ,
I'm working on an issue where my kernel is reporting wireless scan results that include BSS's that have expired. Here is my setup (please don't suggest upgrading the kernel, as that is not an option for me):
- Mainline Linux Kernel, 3.3
- WPA Supplicant 2.5
- Wireless Extension 29
- RTL8192cu Device Driver
I've already done some debugging, and have found a possible issue in the kernel (that I'm unsure how to solve at this point). Here is what my debugging has revealed.
In the file: net/mac80211/scan.c line 214 I see a BSS with a bssid matching my AP as being linked via ieee80211_scan_rx (with my cfg80211_registered_device I believe???). If I power off my AP, I no longer see this specific BSS as being received.
After 15 seconds (IEEE80211_SCAN_RESULT_EXPIRE in net/wireless/scan.c) of missing a beacon, I would expect this BSS to be unlinked at the end of the next scan via cfg80211_wext_giwscan->ieee80211_scan_results->cfg80211_bss_expire. However, in the function cfg80211_bss_expire, this particular BSS is not unlinked, because line 205 assert that the BSS is being held.
Looking into why it is held, I believe that the BSS is held once we authenticate at the MLME layer.
My question is, how do I get this BSS to be unheld (probably in the MLME layer) so my AP is no longer linked (as it clearly should not be linked after being powered off long enough)?
Could this be an error in my wpa_supplicant.conf or is it a kernel bug? If it's the latter, where can I search through specific patches to see if this issue has already been fixed, or does has anyone run into this issue and knows a solution? To me it seems like a kernel bug because the registered device still thinks that BSS is being held, but this is my first time diving into the wireless kernel code.
I've tried a few things to get this to work correctly with wpa_supplicant, but the only thing that I've done that has made the kernel give up on the current BSS is:
Code:
wpa_cli reassociate
Here is my wpa_supplicant configuration file in case that can help with some analysis.
Code:
# cat wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
country=US
network={
ssid="mywifi"
psk="password"
key_mgmt=WPA-PSK
eap=
}