LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 05-24-2016, 03:02 PM   #1
austinr1028
LQ Newbie
 
Registered: Oct 2015
Posts: 8

Rep: Reputation: Disabled
Exclamation Kernel 3.3 not registering missed beacons with connected Access Point


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=
}
 
Old 05-27-2016, 04:06 PM   #2
austinr1028
LQ Newbie
 
Registered: Oct 2015
Posts: 8

Original Poster
Rep: Reputation: Disabled
So after a lot of digging, I found that the issue was because of the kernel's rtlwifi driver. To me, it looks like the rtl8192cu driver was suppose to be responsible for handling missed beacons, by calling the function
Code:
ieee80211_beacon_loss
but that call is nowhere to be found. I removed support for
Code:
IEEE80211_HW_BEACON_FILTER
in the rtlwifi driver and the issue has been fixed.

This patch is essentially the same changes that I made, and the comments in this file are part of what led to me this answer. Another alternative solution that I found was using the Realtek 8192cu driver.
 
  


Reply

Tags
bssid, kernel 3, realtek, wifi, wpasupplicant


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to find IP addresses connected to an access point nix84 Linux - Networking 4 05-03-2016 04:56 PM
Wireless clients are not able to ping each other when connected to an Access Point nakul Linux - Wireless Networking 0 10-08-2012 02:18 AM
Need information about the access point to which my laptop is connected aloknrao Linux - Wireless Networking 1 04-09-2009 09:17 PM
finding out which access point we are connected to socialjazz Programming 2 04-09-2007 07:34 AM
response req ASAP- how to disable broadcast of beacons from access point? swapna_gg83 Linux - Wireless Networking 0 05-03-2006 12:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 06:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration