linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mac80211 doesn't reassociate after failed ProbeResp
@ 2007-11-07  9:21 Stefano Brivio
  2007-11-07  9:42 ` Stefano Brivio
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Stefano Brivio @ 2007-11-07  9:21 UTC (permalink / raw)
  To: Michael Wu, Johannes Berg, Jiri Benc; +Cc: linux-wireless

I got a quite reproducible bug with mac80211. Sometimes, this happens
(phy0 is a b43 PHY):

Nov  7 02:06:23 morte [123784.591945] wlan0: No ProbeResp from current AP 00:14:c1:35:8d:eb - assume out of range
Nov  7 02:06:23 morte [123784.591968] phy0: Removed STA 00:14:c1:35:8d:eb

then, instead of trying to reassociate, mac80211 acts like this:
Nov  7 02:06:25 morte [123785.138041] wlan0: dropped data frame to not associated station 00:14:c1:35:8d:eb
Nov  7 02:06:25 morte [123785.138243] wlan0: dropped data frame to not associated station 00:14:c1:35:8d:eb
Nov  7 02:06:55 morte [123798.704732] wlan0: No STA entry for own AP 00:14:c1:35:8d:eb

I guess that's a mac80211 bug. I'll be happy to provide you with more
testing.


-- 
Ciao
Stefano

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mac80211 doesn't reassociate after failed ProbeResp
  2007-11-07  9:21 mac80211 doesn't reassociate after failed ProbeResp Stefano Brivio
@ 2007-11-07  9:42 ` Stefano Brivio
  2007-11-07 11:18   ` Stefano Brivio
  2007-11-07 10:49 ` Claudio Matsuoka
  2007-11-10  4:08 ` Stefano Brivio
  2 siblings, 1 reply; 6+ messages in thread
From: Stefano Brivio @ 2007-11-07  9:42 UTC (permalink / raw)
  To: Michael Wu, Johannes Berg, Jiri Benc; +Cc: linux-wireless

On Wed, 7 Nov 2007 10:21:58 +0100
Stefano Brivio <stefano.brivio@polimi.it> wrote:

> I got a quite reproducible bug with mac80211. Sometimes, this happens
> (phy0 is a b43 PHY):
> 
> Nov  7 02:06:23 morte [123784.591945] wlan0: No ProbeResp from current AP
> 00:14:c1:35:8d:eb - assume out of range Nov  7 02:06:23 morte
> [123784.591968] phy0: Removed STA 00:14:c1:35:8d:eb
> 
> then, instead of trying to reassociate, mac80211 acts like this:
> Nov  7 02:06:25 morte [123785.138041] wlan0: dropped data frame to not
> associated station 00:14:c1:35:8d:eb Nov  7 02:06:25 morte
> [123785.138243] wlan0: dropped data frame to not associated station
> 00:14:c1:35:8d:eb Nov  7 02:06:55 morte [123798.704732] wlan0: No STA
> entry for own AP 00:14:c1:35:8d:eb

BTW, what I have to do to get mac80211 to associate is to set a bogus ESSID
and then the correct one back, then it will associate.


-- 
Ciao
Stefano

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mac80211 doesn't reassociate after failed ProbeResp
  2007-11-07  9:21 mac80211 doesn't reassociate after failed ProbeResp Stefano Brivio
  2007-11-07  9:42 ` Stefano Brivio
@ 2007-11-07 10:49 ` Claudio Matsuoka
  2007-11-07 16:44   ` drago01
  2007-11-10  4:08 ` Stefano Brivio
  2 siblings, 1 reply; 6+ messages in thread
From: Claudio Matsuoka @ 2007-11-07 10:49 UTC (permalink / raw)
  To: Stefano Brivio; +Cc: Michael Wu, Johannes Berg, Jiri Benc, linux-wireless

On Wednesday 07 November 2007 07:21:58 Stefano Brivio wrote:

> then, instead of trying to reassociate, mac80211 acts like this:
> Nov  7 02:06:25 morte [123785.138041] wlan0: dropped data frame to not
> associated station 00:14:c1:35:8d:eb Nov  7 02:06:25 morte [123785.138243]

I confirm this problem with the b43, and also rtl8187 (which sometimes 
reassociates spontaneously, sometimes not).

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mac80211 doesn't reassociate after failed ProbeResp
  2007-11-07  9:42 ` Stefano Brivio
@ 2007-11-07 11:18   ` Stefano Brivio
  0 siblings, 0 replies; 6+ messages in thread
From: Stefano Brivio @ 2007-11-07 11:18 UTC (permalink / raw)
  To: Michael Wu, Johannes Berg, Jiri Benc; +Cc: linux-wireless

This fixes the issue for me. Note that this is a dirty hack and may break
roaming and everything badly. Will try to fix this better.

--- net/mac80211/ieee80211_sta.c~       2007-11-07 12:08:08.847346973 +0100
+++ net/mac80211/ieee80211_sta.c        2007-11-07 12:08:08.848346821 +0100
@@ -785,7 +785,7 @@
                                       "range\n",
                                       dev->name, print_mac(mac, ifsta->bssid));
                                disassoc = 1;
-                               sta_info_free(sta);
+//                             sta_info_free(sta);
                        } else
                                ieee80211_send_probe_req(dev, ifsta->bssid,
                                                         local->scan_ssid,


-- 
Ciao
Stefano

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mac80211 doesn't reassociate after failed ProbeResp
  2007-11-07 10:49 ` Claudio Matsuoka
@ 2007-11-07 16:44   ` drago01
  0 siblings, 0 replies; 6+ messages in thread
From: drago01 @ 2007-11-07 16:44 UTC (permalink / raw)
  To: Claudio Matsuoka
  Cc: Stefano Brivio, Michael Wu, Johannes Berg, Jiri Benc,
	linux-wireless

Claudio Matsuoka wrote:
> On Wednesday 07 November 2007 07:21:58 Stefano Brivio wrote:
>
>   
>> then, instead of trying to reassociate, mac80211 acts like this:
>> Nov  7 02:06:25 morte [123785.138041] wlan0: dropped data frame to not
>> associated station 00:14:c1:35:8d:eb Nov  7 02:06:25 morte [123785.138243]
>>     
>
> I confirm this problem with the b43, and also rtl8187 (which sometimes 
> reassociates spontaneously, sometimes not).
>
>   
I have also seen some reports where this happened with iwl3945/4965


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mac80211 doesn't reassociate after failed ProbeResp
  2007-11-07  9:21 mac80211 doesn't reassociate after failed ProbeResp Stefano Brivio
  2007-11-07  9:42 ` Stefano Brivio
  2007-11-07 10:49 ` Claudio Matsuoka
@ 2007-11-10  4:08 ` Stefano Brivio
  2 siblings, 0 replies; 6+ messages in thread
From: Stefano Brivio @ 2007-11-10  4:08 UTC (permalink / raw)
  To: Michael Wu, Johannes Berg, Jiri Benc; +Cc: linux-wireless

I tried another test. I switched my radio off for less than five seconds,
then on again. I then had to force reassociation manually. I think I hit
the following if-clause:

	if (time_after(jiffies,
		       sta->last_rx + IEEE80211_MONITORING_INTERVAL)) {

in ieee80211_sta.c, with IEEE80211_MONITORING_INTERVAL being 2 * HZ.

I would argue that this is far away from the acceptable behaviour for a
wireless stack. I'm sorry I can't provide a patch, but I really can't read
the code. Using an higher value for IEEE80211_MONITORING_INTERVAL could
result in decreased risks of peptic ulcer, but I don't think this is the
right fix. Any clues? Thanks.


-- 
Ciao
Stefano

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-11-10  4:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-07  9:21 mac80211 doesn't reassociate after failed ProbeResp Stefano Brivio
2007-11-07  9:42 ` Stefano Brivio
2007-11-07 11:18   ` Stefano Brivio
2007-11-07 10:49 ` Claudio Matsuoka
2007-11-07 16:44   ` drago01
2007-11-10  4:08 ` Stefano Brivio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).