Search Linux Wireless

Re: ath9k and power management

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Apr 18, 2009 at 04:48, Vivek Natarajan <vivek.natraj@xxxxxxxxx> wrote:
> On Sat, Apr 18, 2009 at 1:27 AM, Davide Pesavento <davidepesa@xxxxxxxxx> wrote:
>> On Fri, Mar 27, 2009 at 16:27, Davide Pesavento <davidepesa@xxxxxxxxx> wrote:
>>> Hello,
>>>
>>> I'm running a 2.6.29-wl kernel, using ath9k and wpa_supplicant 0.6.9
>>> (with -Dnl80211).
>>> Enabling power management when connected (i.e. 'iwconfig wlan0 power
>>> on'), causes the currently established connection to break and the
>>> machine is no longer able to reconnect to the AP. Right after enabling
>>> pm, dmesg says:
>>>
>>> [ 2625.513233] wlan0: beacon loss from AP 00:1b:2f:35:14:78 - sending
>>> probe request
>>> [ 2627.513210] wlan0: no probe response from AP 00:1b:2f:35:14:78 -
>>> disassociating
>>> [ 2627.514430] phy0: Removed STA 00:1b:2f:35:14:78
>>> [ 2627.543407] phy0: Destroyed STA 00:1b:2f:35:14:78
>>> [ 2776.444279] ADDRCONF(NETDEV_UP): wlan0: link is not ready
>>> [ 2776.659861] wlan0: deauthenticating by local choice (reason=3)
>>> [ 2776.831004] ADDRCONF(NETDEV_UP): wlan0: link is not ready
>>>
>>> When I turn power management off again, wpa_supplicant is able to
>>> reconnect just fine.
>>> Is this a known bug? If ath9k doesn't support power management
>>> properly, wouldn't it be better to reject the userspace request right
>>> away?
>>>
>>
>> This is still unfixed on latest git (2.6.30-rc2-wl). The symptoms are
>> exactly the same as reported above.
>
> This is the power save mechanism used in ath9k:
> An interrupt is triggered just 4ms before the target beacon time
> so that the chip can wake up and receive the beacons. In all the
> latest chipsets like AR92XX, this is working fine.I wonder why
> AR54XX has some problems related to that.
> A quick look into the debug logs shows me that this wake up interrupt
> (TIM_TIMER) stops triggering after some time which leads to beacon
> loss and disconnection.
> Although there is an option of autosleep(in latest versions) where hw can
> wakeup automatically and receive beacon instead of a sw trigger call,
> the hw may sleep for a longer duration(sometimes)  and we may need to
> have some timer mechanism to verify if the hw is hung or not.
> I did not have much time to look into this somewhat older chipsets and
> I will try to debug more if I manage to get some free time.
>
> Thanks
> Vivek
>

I did some more testing with ATH_DBG_RESET and ATH_DBG_BEACON enabled.
Here is dmesg output:

< first I try to connect with PS disabled >

[17772.421740] ath9k: AWAKE -> AWAKE
[17772.658457] ath9k: AWAKE -> AWAKE
[17772.659600] ath9k: AWAKE -> AWAKE
[17772.661119] ath9k: ah->misc_mode 0x4
[17772.662783] ath9k: AWAKE -> AWAKE
[17772.663840] ath9k: AWAKE -> AWAKE
[17772.664968] ath9k: AWAKE -> AWAKE
[17772.666484] ath9k: ah->misc_mode 0x4
[17772.667711] wlan0: authenticate with AP 00:1b:2f:58:30:76
[17772.669950] wlan0: authenticated
[17772.669954] wlan0: associate with AP 00:1b:2f:58:30:76
[17772.673211] wlan0: RX AssocResp from 00:1b:2f:58:30:76 (capab=0x431
status=0 aid=2)
[17772.673215] wlan0: associated
[17772.673233] phy1: Allocated STA 00:1b:2f:58:30:76
[17772.673242] phy1: Inserted STA 00:1b:2f:58:30:76
[17772.673246] wmaster0: WMM queue=2 aci=0 acm=0 aifs=3 cWmin=15
cWmax=1023 txop=0
[17772.673256] wmaster0: WMM queue=3 aci=1 acm=0 aifs=7 cWmin=15
cWmax=1023 txop=0
[17772.673265] wmaster0: WMM queue=1 aci=2 acm=0 aifs=2 cWmin=7 cWmax=15 txop=94
[17772.673273] wmaster0: WMM queue=0 aci=3 acm=0 aifs=2 cWmin=3 cWmax=7 txop=47
[17772.673283] wlan0: switched to short barker preamble
(BSSID=00:1b:2f:58:30:76)
[17772.673286] wlan0: switched to short slot time (BSSID=00:1b:2f:58:30:76)
[17772.673312] ath9k: tsf: 5595 tsftu: 7
[17772.673315] ath9k: bmiss: 10 sleep: 100 cfp-period: 10000 maxdur: 0 next: 100
[17772.673333] ath9k: next DTIM 100
[17772.673336] ath9k: next beacon 100
[17772.673338] ath9k: beacon period 100
[17772.673341] ath9k: DTIM period 10000
[17772.673598] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

< ok, wpa_supplicant is connected >
< now I execute `iwconfig wlan0 power timeout 1` >

[17836.991721] ath9k: AWAKE -> NETWORK SLEEP
[17836.991742] ath9k: NETWORK SLEEP -> AWAKE
[17836.991838] ath9k: AWAKE -> AWAKE
[17837.011506] ath9k: AWAKE -> AWAKE
[17837.113945] ath9k: AWAKE -> AWAKE
[17837.216346] ath9k: AWAKE -> AWAKE
[17837.318753] ath9k: AWAKE -> AWAKE
[17837.410312] ath9k: AWAKE -> NETWORK SLEEP
[17837.410340] ath9k: NETWORK SLEEP -> AWAKE
[17837.410414] ath9k: AWAKE -> NETWORK SLEEP
[17837.474938] ath9k: NETWORK SLEEP -> AWAKE
[17837.475021] ath9k: AWAKE -> NETWORK SLEEP
[17837.475061] ath9k: NETWORK SLEEP -> AWAKE
[17837.475134] ath9k: AWAKE -> NETWORK SLEEP
[17837.571609] ath9k: NETWORK SLEEP -> AWAKE
[17837.571689] ath9k: AWAKE -> NETWORK SLEEP
[17837.671610] ath9k: NETWORK SLEEP -> AWAKE
[17837.671690] ath9k: AWAKE -> NETWORK SLEEP
[17837.671731] ath9k: NETWORK SLEEP -> AWAKE
[17837.671803] ath9k: AWAKE -> NETWORK SLEEP
[17837.774920] ath9k: NETWORK SLEEP -> AWAKE
[17837.774997] ath9k: AWAKE -> NETWORK SLEEP
[17837.871610] ath9k: NETWORK SLEEP -> AWAKE
[17837.871694] ath9k: AWAKE -> NETWORK SLEEP
[17837.971618] ath9k: NETWORK SLEEP -> AWAKE
[17837.971701] ath9k: AWAKE -> NETWORK SLEEP
[17838.071609] ath9k: NETWORK SLEEP -> AWAKE
[17838.071689] ath9k: AWAKE -> NETWORK SLEEP
[17838.171609] ath9k: NETWORK SLEEP -> AWAKE
[17838.171691] ath9k: AWAKE -> NETWORK SLEEP
[17838.271611] ath9k: NETWORK SLEEP -> AWAKE
[17838.271694] ath9k: AWAKE -> NETWORK SLEEP
[17838.271713] ath9k: NETWORK SLEEP -> AWAKE
[17838.271786] ath9k: AWAKE -> NETWORK SLEEP
[17838.271805] ath9k: NETWORK SLEEP -> AWAKE

< this bouncing between power states goes on for a bit more, until... >

[17840.684940] wlan0: beacon loss from AP 00:1b:2f:58:30:76 - sending
probe request
[17840.684984] ath9k: NETWORK SLEEP -> AWAKE
[17841.685023] ath9k: AWAKE -> AWAKE
[17841.685127] ath9k: AWAKE -> NETWORK SLEEP
[17841.687395] ath9k: NETWORK SLEEP -> AWAKE
[17841.722144] ath9k: AWAKE -> AWAKE
[17841.824534] ath9k: AWAKE -> AWAKE
[17841.926945] ath9k: AWAKE -> AWAKE
[17842.018507] ath9k: AWAKE -> NETWORK SLEEP
[17842.029339] ath9k: NETWORK SLEEP -> AWAKE
[17842.029428] ath9k: AWAKE -> AWAKE
[17842.131762] ath9k: AWAKE -> AWAKE
[17842.234162] ath9k: AWAKE -> AWAKE
[17842.336567] ath9k: AWAKE -> AWAKE
[17842.438969] ath9k: AWAKE -> AWAKE
[17842.530529] ath9k: AWAKE -> NETWORK SLEEP
[17842.530556] ath9k: NETWORK SLEEP -> AWAKE
[17842.530629] ath9k: AWAKE -> NETWORK SLEEP
[17842.571607] ath9k: NETWORK SLEEP -> AWAKE
[17842.571690] ath9k: AWAKE -> NETWORK SLEEP
[17842.571730] ath9k: NETWORK SLEEP -> AWAKE
[17842.571802] ath9k: AWAKE -> NETWORK SLEEP
[17842.671606] ath9k: NETWORK SLEEP -> AWAKE
[17842.671686] ath9k: AWAKE -> NETWORK SLEEP
[17842.671712] ath9k: NETWORK SLEEP -> AWAKE
[17842.671784] ath9k: AWAKE -> NETWORK SLEEP
[17842.771617] ath9k: NETWORK SLEEP -> AWAKE
[17842.771699] ath9k: AWAKE -> NETWORK SLEEP
[17842.771724] ath9k: NETWORK SLEEP -> AWAKE
[17842.771797] ath9k: AWAKE -> NETWORK SLEEP
[17842.871608] ath9k: NETWORK SLEEP -> AWAKE
[17842.871690] ath9k: AWAKE -> NETWORK SLEEP

< and then the whole thing starts over again for another couple of
times, with the hardware rapidly alternating its power state, until it
disconnects >

[17852.691611] wlan0: no probe response from AP 00:1b:2f:58:30:76 -
disassociating
[17852.691695] ath9k: AWAKE -> AWAKE
[17852.691782] phy1: Removed STA 00:1b:2f:58:30:76
[17852.731944] phy1: Destroyed STA 00:1b:2f:58:30:76
[17852.821730] ath9k: AWAKE -> AWAKE
[17852.888413] ath9k: AWAKE -> AWAKE
[17852.955081] ath9k: AWAKE -> AWAKE
[17853.021725] ath9k: AWAKE -> AWAKE
[17853.088395] ath9k: AWAKE -> AWAKE
[17853.155083] ath9k: AWAKE -> AWAKE
[17853.221726] ath9k: AWAKE -> AWAKE
[ ...above message repeated many times... ]
[17857.517104] ath9k: AWAKE -> NETWORK SLEEP
[17857.517117] ath9k: NETWORK SLEEP -> AWAKE
[17857.517280] ath9k: AWAKE -> AWAKE
[17857.518407] ath9k: AWAKE -> AWAKE
[17857.519923] ath9k: ah->misc_mode 0x4
[17857.521323] ath9k: AWAKE -> NETWORK SLEEP
[17857.521336] ath9k: NETWORK SLEEP -> AWAKE
[17857.521405] ath9k: AWAKE -> NETWORK SLEEP
[17857.521424] ath9k: NETWORK SLEEP -> AWAKE
[17857.521493] ath9k: AWAKE -> NETWORK SLEEP
[17857.521509] wlan0: authenticate with AP 00:1b:2f:58:30:76
[17857.521527] ath9k: NETWORK SLEEP -> AWAKE
[17857.522564] ath9k: AWAKE -> AWAKE
[17857.523684] ath9k: AWAKE -> AWAKE
[17857.525216] ath9k: ah->misc_mode 0x4
[17857.526329] ath9k: AWAKE -> AWAKE
[17857.527450] ath9k: AWAKE -> AWAKE
[17857.528972] ath9k: ah->misc_mode 0x4
[17857.529901] wlan0: authenticate with AP 00:1b:2f:58:30:76
[17857.532614] wlan0: authenticated
[17857.532618] wlan0: associate with AP 00:1b:2f:58:30:76
[17857.535619] wlan0: deauthenticated (Reason: 6)
[17858.534801] wlan0: dropped data frame to not associated station
00:1b:2f:58:30:76
[17858.534838] ath9k: AWAKE -> NETWORK SLEEP
[17858.534853] wlan0: direct probe to AP 00:1b:2f:58:30:76 try 1
[17858.534879] ath9k: NETWORK SLEEP -> AWAKE
[17858.538389] wlan0 direct probe responded
[17858.538394] wlan0: authenticate with AP 00:1b:2f:58:30:76
[17858.540608] wlan0: authenticated
[17858.540612] wlan0: associate with AP 00:1b:2f:58:30:76
[17858.543844] wlan0: RX ReassocResp from 00:1b:2f:58:30:76
(capab=0x431 status=0 aid=2)
[17858.543851] wlan0: associated
[17858.543885] phy1: Allocated STA 00:1b:2f:58:30:76
[17858.543897] phy1: Inserted STA 00:1b:2f:58:30:76
[17858.543900] wmaster0: WMM queue=2 aci=0 acm=0 aifs=3 cWmin=15
cWmax=1023 txop=0
[17858.543913] wmaster0: WMM queue=3 aci=1 acm=0 aifs=7 cWmin=15
cWmax=1023 txop=0
[17858.543922] wmaster0: WMM queue=1 aci=2 acm=0 aifs=2 cWmin=7 cWmax=15 txop=94
[17858.543931] wmaster0: WMM queue=0 aci=3 acm=0 aifs=2 cWmin=3 cWmax=7 txop=47
[17858.543944] wlan0: switched to short barker preamble
(BSSID=00:1b:2f:58:30:76)
[17858.543946] wlan0: switched to short slot time (BSSID=00:1b:2f:58:30:76)
[17858.544358] ath9k: tsf: 18236047462 tsftu: 17808642
[17858.544365] ath9k: bmiss: 10 sleep: 100 cfp-period: 10000 maxdur: 0
next: 17810100
[17858.544384] ath9k: next DTIM 17810100
[17858.544387] ath9k: next beacon 17808700
[17858.544390] ath9k: beacon period 100
[17858.544393] ath9k: DTIM period 10000
[17859.551695] ath9k: AWAKE -> AWAKE
[17859.551803] ath9k: AWAKE -> NETWORK SLEEP
[17859.553670] ath9k: NETWORK SLEEP -> AWAKE
[17859.626507] ath9k: AWAKE -> AWAKE
[17862.241612] ath9k: NETWORK SLEEP -> AWAKE
[17862.241693] ath9k: AWAKE -> NETWORK SLEEP
[17862.241719] ath9k: NETWORK SLEEP -> AWAKE
[17862.241792] ath9k: AWAKE -> NETWORK SLEEP
[17862.341627] ath9k: NETWORK SLEEP -> AWAKE
[17862.341710] ath9k: AWAKE -> NETWORK SLEEP
[17862.341732] ath9k: NETWORK SLEEP -> AWAKE
[17862.341805] ath9k: AWAKE -> NETWORK SLEEP
[17862.441623] ath9k: NETWORK SLEEP -> AWAKE
[17862.441703] ath9k: AWAKE -> NETWORK SLEEP
[17862.541625] ath9k: NETWORK SLEEP -> AWAKE
[ ...above messages repeated many times... ]
[17862.541706] ath9k: AWAKE -> NETWORK SLEEP
[17862.541727] ath9k: NETWORK SLEEP -> AWAKE
[17862.541800] ath9k: AWAKE -> NETWORK SLEEP
[17862.541818] ath9k: NETWORK SLEEP -> AWAKE
[17862.541900] ath9k: AWAKE -> NETWORK SLEEP
[17862.554921] wlan0: beacon loss from AP 00:1b:2f:58:30:76 - sending
probe request

< it is able to reconnect just for a moment, but immediately after
that it fails again in the same way >

Hope it might be useful!

Regards,
Davide
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux