4c8deeebbb
This bug has been bugging me for quite some time. I finally sat down with enough coffee to figure it out. The short of it - rounding up to the next intval multiple of the TSF value only works if the AP is transmitting all its beacons on an interval of the TSF. If it isn't - for example, doing staggered beacons on a multi-VAP setup with a single hardware TSF - then weird things occur. The long of it - When powersave is enabled, the MAC and PHY are partially powered off. They can't receive any packets (or transmit, for that matter.) The target beacon timer programming will wake up the MAC/PHY just before the beacon is supposed to be received (well, strictly speaking, at DTIM so it can see the TIM - traffic information map - telling the STA whether any traffic is there for it) and it happens automatically. However, this relies on the target beacon time being programmed correctly. If it isn't then the hardware will wake up and not hear any beacons - and then it'll be asleep for said beacons. After enough of this, net80211 will give up and assume the AP went away. This should fix both TSFOOR interrupts and disconnects from APs with powersave enabled. The annoying bit is that it only happens if APs stagger things or start on a non-zero TSF. So, this would sometimes be fine and sometimes not be fine. What: * I don't know (yet) why the code rounds up to the next intval. For now, just disable rounding it and trust the value we get. TODO: * If we do see a beacon miss in STA mode then we should transition out of sleep for a while so we can hear beacons to resync against. I'd love a patch from someone to enable that particular behaviour. Note - that doesn't require that net80211 brings the chip out of sleep state - only that we wake the chip up through to full-on and then let it go to sleep again when we've seen a beacon. The wifi stack and AP can still completely just stay believing we're in sleep mode. Tested: * AR9485, STA mode, powersave enabled MFC after: 1 week Relnotes: Yes |
||
---|---|---|
.. | ||
ath_dfs/null | ||
ath_hal | ||
ath_rate | ||
ah_osdep.c | ||
ah_osdep.h | ||
if_ath_ahb.c | ||
if_ath_alq.c | ||
if_ath_alq.h | ||
if_ath_beacon.c | ||
if_ath_beacon.h | ||
if_ath_btcoex_mci.c | ||
if_ath_btcoex_mci.h | ||
if_ath_btcoex.c | ||
if_ath_btcoex.h | ||
if_ath_debug.c | ||
if_ath_debug.h | ||
if_ath_descdma.c | ||
if_ath_descdma.h | ||
if_ath_ioctl.c | ||
if_ath_ioctl.h | ||
if_ath_keycache.c | ||
if_ath_keycache.h | ||
if_ath_led.c | ||
if_ath_led.h | ||
if_ath_lna_div.c | ||
if_ath_lna_div.h | ||
if_ath_misc.h | ||
if_ath_pci_devlist.h | ||
if_ath_pci.c | ||
if_ath_rx_edma.c | ||
if_ath_rx_edma.h | ||
if_ath_rx.c | ||
if_ath_rx.h | ||
if_ath_spectral.c | ||
if_ath_spectral.h | ||
if_ath_sysctl.c | ||
if_ath_sysctl.h | ||
if_ath_tdma.c | ||
if_ath_tdma.h | ||
if_ath_tsf.h | ||
if_ath_tx_edma.c | ||
if_ath_tx_edma.h | ||
if_ath_tx_ht.c | ||
if_ath_tx_ht.h | ||
if_ath_tx.c | ||
if_ath_tx.h | ||
if_ath.c | ||
if_athdfs.h | ||
if_athioctl.h | ||
if_athrate.h | ||
if_athvar.h |