From: "Lars Ericsson" <Lars_Ericsson@telia.com>
To: "'Johannes Berg'" <johannes@sipsolutions.net>
Cc: <linux-wireless@vger.kernel.org>
Subject: RE: Slow roaming in mac80211 (2.6.30).
Date: Thu, 23 Jul 2009 11:40:23 +0200 [thread overview]
Message-ID: <2E12E93FA1AB41BDA5C8A7292FCAC884@gotws1589> (raw)
In-Reply-To: <1248215454.11735.24.camel@johannes.local>
[-- Attachment #1: Type: text/plain, Size: 3626 bytes --]
Johannes,
> The real question is: why the hell is it probing the AP?
> I agree -- the spurious probing is strange. But I also have to admit
> that basically I don't care as long as it works -- most of this is just
> a side effect of how wireless extensions work.
I have further investigated the roaming issues and found two problems.
First ieee80211_rx_mgmt_deauth() and ieee80211_rx_mgmt_disassoc()
sets a retry state at the same time as they tells the wpa_supplicant
that the AP is gone.
Patch lae-mac80211-rm-direct-probe.patch addresses this problem.
Second problem address the auto scan function in
ieee80211_sta_config_auth(). When an incomplete AP information is
found, it start a new scan. This scan will delay the actions taken by
the wpa_supplicant for the scan period.
Patch lae-mac80211-rm-extra-scan-request.patch addresses this problem.
I do not have the knowledge to judge if the patch is correctly
applied/located, but they sure give the desired effect. Old roaming
time was 4,5 seconds for 13 channels and with the above patches it is
down to 400ms for 3 channels. See trace below.
> I would suggest you just use wpa_supplicant -Dnl80211, which
> should help
> a lot with this kind of things.
I need to patch the kernel for this, rigth ?
Where can I get appropriate patches?
/Lars
-----
[ 124.597307] wlan0: deauthenticated (Reason: 1)
[ 124.597341] LaE: [ieee80211_rx_mgmt_deauth] do not set
IEEE80211_STA_MLME_DIRECT_PROBE
[ 124.699253] [B] LaE: SCANRQUEST: SSID=AGV
[ 124.699298] LaE: [ieee80211_request_scan(568)] set IEEE80211_STA_REQ_SCAN
[ 124.699456] ieee80211_start_scan: enter
[ 124.919184] ieee80211_scan_completed: enter
[ 124.919577] [B] LaE: SCANRESULT: BSSID=00:08:21:31:53:87, SSID=AGV
, ch=11, , q= 0, l= 0(-56dBm), n= 0
[ 124.919655] [B] LaE: SCANRESULT: BSSID=00:08:21:31:53:87, SSID=
, ch=11, , q= 0, l= 0(-56dBm), n= 0
[ 124.919726] [B] LaE: SCANRESULT: BSSID=00:40:96:a0:e7:e7, SSID=AGV
, ch= 1, , q= 0, l= 0(-36dBm), n= 0
[ 124.919978] ieee80211_ioctl_siwauth: enter
[ 124.920053] ieee80211_ioctl_siwencodeext: enter
[ 124.920084] ieee80211_set_encryption: enter
[ 124.920177] ieee80211_ioctl_siwencodeext: enter
[ 124.920210] ieee80211_set_encryption: enter
[ 124.920262] ieee80211_ioctl_siwencodeext: enter
[ 124.920291] ieee80211_set_encryption: enter
[ 124.920341] ieee80211_ioctl_siwencodeext: enter
[ 124.920370] ieee80211_set_encryption: enter
[ 124.920421] ieee80211_ioctl_siwencodeext: enter
[ 124.920449] ieee80211_set_encryption: enter
[ 124.920667] ieee80211_ioctl_siwencodeext: enter
[ 124.920704] ieee80211_set_encryption: enter
[ 124.920774] ieee80211_ioctl_siwauth: enter
[ 124.921454] ieee80211_ioctl_siwgenie: enter
[ 124.921518] ieee80211_ioctl_siwauth: enter
[ 124.921560] ieee80211_ioctl_siwauth: enter
[ 124.921598] ieee80211_ioctl_siwauth: enter
[ 124.921637] ieee80211_ioctl_siwauth: enter
[ 124.921674] ieee80211_ioctl_siwauth: enter
[ 124.921712] ieee80211_ioctl_siwauth: enter
[ 124.921755] ieee80211_ioctl_siwfreq: enter freq=241200000
[ 124.951244] LaE: [ieee80211_sta_config_auth(1847)] disable
ieee80211_start_scan
[ 124.951456] ieee80211_ioctl_siwessid: enter ssid=AGV
[ 124.951553] LaE: [ieee80211_sta_config_auth(1847)] disable
ieee80211_start_scan
[ 124.951641] ieee80211_ioctl_siwap: enter AP=00:40:96:a0:e7:e7
[ 124.959261] wlan0: authenticate with AP 00:40:96:a0:e7:e7
[ 124.960678] wlan0: authenticated
[ 124.960717] wlan0: associate with AP 00:40:96:a0:e7:e7
[ 124.962865] wlan0: RX ReassocResp from 00:40:96:a0:e7:e7 (capab=0x431
status=0 aid=6)
[ 124.962907] wlan0: associated
[-- Attachment #2: lae-mac80211-rm-extra-scan-request.patch --]
[-- Type: application/octet-stream, Size: 618 bytes --]
diff -Nurp -x '*.o' -x '*.mod.*' -x '*.ko' a/net/mac80211/mlme.c linux-2.6.30.1/net/mac80211/mlme.c
--- a/net/mac80211/mlme.c 2009-07-21 15:48:29.000000000 +0200
+++ linux-2.6.30.1/net/mac80211/mlme.c 2009-07-23 10:14:29.000000000 +0200
@@ -1834,6 +1843,8 @@ static int ieee80211_sta_config_auth(str
ieee80211_rx_bss_put(local, bss);
ieee80211_sta_reset_auth(sdata);
return 0;
+ } else if (1) {
+ printk(KERN_DEBUG "LaE: [%s(%d)] disable ieee80211_start_scan \n", __func__, __LINE__ );
} else {
if (ifmgd->assoc_scan_tries < IEEE80211_ASSOC_SCANS_MAX_TRIES) {
ifmgd->assoc_scan_tries++;
[-- Attachment #3: lae-mac80211-rm-direct-probe.patch --]
[-- Type: application/octet-stream, Size: 1205 bytes --]
diff -Nurp -x '*.o' -x '*.mod.*' -x '*.ko' a/net/mac80211/mlme.c linux-2.6.30.1/net/mac80211/mlme.c
--- a/net/mac80211/mlme.c 2009-07-21 15:48:29.000000000 +0200
+++ linux-2.6.30.1/net/mac80211/mlme.c 2009-07-23 10:14:29.000000000 +0200
@@ -1191,6 +1194,9 @@ static void ieee80211_rx_mgmt_deauth(str
printk(KERN_DEBUG "%s: deauthenticated (Reason: %u)\n",
sdata->dev->name, reason_code);
+ if ( ifmgd->state == IEEE80211_STA_MLME_ASSOCIATED ) {
+ printk(KERN_DEBUG "LaE: [%s] do not set IEEE80211_STA_MLME_DIRECT_PROBE \n", __func__);
+ } else
if (!(ifmgd->flags & IEEE80211_STA_EXT_SME) &&
(ifmgd->state == IEEE80211_STA_MLME_AUTHENTICATE ||
ifmgd->state == IEEE80211_STA_MLME_ASSOCIATE ||
@@ -1225,6 +1231,9 @@ static void ieee80211_rx_mgmt_disassoc(s
printk(KERN_DEBUG "%s: disassociated (Reason: %u)\n",
sdata->dev->name, reason_code);
+ if ( ifmgd->state == IEEE80211_STA_MLME_ASSOCIATED ) {
+ printk(KERN_DEBUG "LaE: [%s] do not set IEEE80211_STA_MLME_ASSOCIATE \n", __func__);
+ } else
if (!(ifmgd->flags & IEEE80211_STA_EXT_SME) &&
ifmgd->state == IEEE80211_STA_MLME_ASSOCIATED) {
ifmgd->state = IEEE80211_STA_MLME_ASSOCIATE;
next prev parent reply other threads:[~2009-07-23 9:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-21 21:21 Slow roaming in mac80211 (2.6.30) Lars Ericsson
2009-07-21 22:30 ` Johannes Berg
2009-07-23 9:40 ` Lars Ericsson [this message]
2009-07-23 9:54 ` Johannes Berg
2009-07-22 8:18 ` Lam Yoke Khei
2009-07-22 8:55 ` Holger Schurig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2E12E93FA1AB41BDA5C8A7292FCAC884@gotws1589 \
--to=lars_ericsson@telia.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox