2009-12-14 17:21:38

by ASIC Felix

[permalink] [raw]
Subject: mac80211 or ath9k? No connect to other band after resume

Hi,

I found a suspend/resume bug.
Kernel 2.6.32-wl-45997-gf02c03a master-2009-12-07

To reproduce:
- connect to 2G network (my office)
- pm-suspend
- resume (at home, wpa_supplicant.conf only has 5G home network)
- laptop only scans 2G, never sees 5G AP
- workaround:
/etc/init.d/network stop
rmmod bla bla bla
modprobe ath9k
/etc/init.d/network start
- now laptop reconnects


Thanks for your work folks!
Felix



2009-12-16 04:24:32

by ASIC Felix

[permalink] [raw]
Subject: Re: mac80211 or ath9k? No connect to other band after resume

On Mon, 2009-12-14 at 18:24 +0100, Johannes Berg wrote:
> On Mon, 2009-12-14 at 09:21 -0800, ASIC Felix wrote:
> > Hi,
> >
> > I found a suspend/resume bug.
> > Kernel 2.6.32-wl-45997-gf02c03a master-2009-12-07
> >
> > To reproduce:
> > - connect to 2G network (my office)
> > - pm-suspend
> > - resume (at home, wpa_supplicant.conf only has 5G home network)
> > - laptop only scans 2G, never sees 5G AP
> > - workaround:
> > /etc/init.d/network stop
> > rmmod bla bla bla
> > modprobe ath9k
> > /etc/init.d/network start
> > - now laptop reconnects
>
> I'd guess regulatory -- enable debugging for that please.
>
> johannes


yep, does looke like regulatory after pm-suspend, mcgrof?
Felix


PM: Finishing wakeup.
Restarting tasks ...
hub 5-0:1.0: over-current change on port 3
done.
hub 5-0:1.0: over-current change on port 4
hub 2-0:1.0: over-current change on port 1
hub 2-0:1.0: over-current change on port 2
usb 3-2: reset full speed USB device using uhci_hcd and address 3
cfg80211: Calling CRDA for country: US
cfg80211: Current regulatory domain intersected:
(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
(2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
tg3 0000:02:00.0: PME# disabled
ath9k: Two wiphys trying to scan at the same time

] /etc/init.d/network stop
] rmmod blbalba; modprobe ath9k
] /etc/init.d/network start

tg3 0000:02:00.0: PME# enabled
ath9k 0000:04:02.0: PCI INT A disabled
ath9k: Driver unloaded
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: World regulatory domain updated:
(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
(2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
(2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
(2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
(5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
(5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
ath9k 0000:04:02.0: PCI INT A -> GSI 21 (level, low) -> IRQ 21
ath: EEPROM regdomain: 0x0
ath: EEPROM indicates default country code should be used
ath: doing EEPROM country->regdmn map search
ath: country maps to regdmn code: 0x3a
ath: Country alpha2 being used: US
ath: Regpair used: 0x3a
phy0: Selected rate control algorithm 'ath9k_rate_control'
cfg80211: Calling CRDA for country: US
Registered led device: ath9k-phy0::radio
Registered led device: ath9k-phy0::assoc
Registered led device: ath9k-phy0::tx
Registered led device: ath9k-phy0::rx
phy0: Atheros AR9280 Rev:2 mem=0xfad00000, irq=21
cfg80211: Regulatory domain changed to country: US
(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
(2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
(5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
(5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
(5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
(5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
(5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
tg3 0000:02:00.0: PME# disabled
cfg80211: Found new beacon on frequency: 5180 MHz (Ch 36) on phy0
wlan0: direct probe to AP 00:24:01:45:51:41 (try 1)
wlan0: direct probe responded
wlan0: authenticate with AP 00:24:01:45:51:41 (try 1)
wlan0: authenticated
wlan0: associate with AP 00:24:01:45:51:41 (try 1)
wlan0: RX AssocResp from 00:24:01:45:51:41 (capab=0x111 status=0 aid=2)
wlan0: associated
martian source 255.255.255.255 from 192.168.10.1, on dev wlan0
ll header: ff:ff:ff:ff:ff:ff:00:24:01:45:51:3f:08:00
martian source 255.255.255.255 from 192.168.10.1, on dev wlan0
ll header: ff:ff:ff:ff:ff:ff:00:24:01:45:51:3f:08:00
martian source 255.255.255.255 from 192.168.10.1, on dev wlan0
ll header: ff:ff:ff:ff:ff:ff:00:24:01:45:51:3f:08:00



2009-12-16 06:09:26

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: mac80211 or ath9k? No connect to other band after resume

On Tue, Dec 15, 2009 at 8:24 PM, ASIC Felix <[email protected]> wrote:
> On Mon, 2009-12-14 at 18:24 +0100, Johannes Berg wrote:
>> On Mon, 2009-12-14 at 09:21 -0800, ASIC Felix wrote:
>> > Hi,
>> >
>> > I found a suspend/resume bug.
>> > Kernel 2.6.32-wl-45997-gf02c03a master-2009-12-07
>> >
>> > To reproduce:
>> > - connect to 2G network (my office)
>> > - pm-suspend
>> > - resume (at home, wpa_supplicant.conf only has 5G home network)
>> > - laptop only scans 2G, never sees 5G AP
>> > - workaround:
>> >     /etc/init.d/network stop
>> >     rmmod bla bla bla
>> >     modprobe ath9k
>> >     /etc/init.d/network start
>> > - now laptop reconnects
>>
>> I'd guess regulatory -- enable debugging for that please.
>>
>> johannes
>
>
> yep, does looke like regulatory after pm-suspend, mcgrof?

So right now cfg80211 doesn't support roaming between countries. This
means for example if channel you have a card that *does* allow passive
scan scan on channel 13, connect to an AP with country IE info that
disables channel 13 (US), suspend, go to JP, resume and find out your
AP there is on channel 13 you won't be able to connect to it yet. This
definitely can be addressed and I've noted its not supported in
cfg80211 code but I haven't yet gotten around to it.

Your logs do not give me the information to confirm this is indeed the
issue, but your statement above indicates that you connect to the 2.4
GHz network at work, and on 5 GHz at home. Note that even if your AP
at work did not have any 5 GHz channels on the country IE it outputs
you will still be able to connect on 5 GHz APs because the cfg80211
treats such country IEs as non-regulatory-complete if a complete band
is missing and your own regulatory's cards rules are kept.

But -- if your AP at work which is on the 2.4 GHz spits out a Country
IE with 2 GHz channels and at least one 5 GHz channel and you connect
to it, we will assume it knows what its talking about and only enable
only those 5 GHz channels it told us to use.

The logs you posted do not give enough info though to properly debug
this. Please enable on your kernel:

CONFIG_CFG80211_REG_DEBUG=y

recompile and post the logs of the CRDA stuff based on the country IE
when you connect at work. You can also use the patch I'm about to post
for iw to just scan on the freq you know your AP is on and paste that
info (except the BSSID if you care about that.

I also need the output of:

'iw list'

both before you connect at work, once you connect at work. I assume
the output will be the same when you resume and get home. Then tell me
the exact channel / frequency both APs you are using are on.

Luis

2009-12-14 17:27:05

by ASIC Felix

[permalink] [raw]
Subject: Re: mac80211 or ath9k? No connect to other band after resume

On Mon, 2009-12-14 at 18:24 +0100, Johannes Berg wrote:
> On Mon, 2009-12-14 at 09:21 -0800, ASIC Felix wrote:
> > Hi,
> >
> > I found a suspend/resume bug.
> > Kernel 2.6.32-wl-45997-gf02c03a master-2009-12-07
> >
> > To reproduce:
> > - connect to 2G network (my office)
> > - pm-suspend
> > - resume (at home, wpa_supplicant.conf only has 5G home network)
> > - laptop only scans 2G, never sees 5G AP
> > - workaround:
> > /etc/init.d/network stop
> > rmmod bla bla bla
> > modprobe ath9k
> > /etc/init.d/network start
> > - now laptop reconnects
>
> I'd guess regulatory -- enable debugging for that please.


will do.

Felix


2009-12-14 17:24:18

by Johannes Berg

[permalink] [raw]
Subject: Re: mac80211 or ath9k? No connect to other band after resume

On Mon, 2009-12-14 at 09:21 -0800, ASIC Felix wrote:
> Hi,
>
> I found a suspend/resume bug.
> Kernel 2.6.32-wl-45997-gf02c03a master-2009-12-07
>
> To reproduce:
> - connect to 2G network (my office)
> - pm-suspend
> - resume (at home, wpa_supplicant.conf only has 5G home network)
> - laptop only scans 2G, never sees 5G AP
> - workaround:
> /etc/init.d/network stop
> rmmod bla bla bla
> modprobe ath9k
> /etc/init.d/network start
> - now laptop reconnects

I'd guess regulatory -- enable debugging for that please.

johannes


Attachments:
signature.asc (801.00 B)
This is a digitally signed message part