Hardware: Asus WL-500g Premium with TP-Link TL-WN560G card, laptop with Intel 3945 card, Nokia N810.
Software: OpenWrt trunk with 2.6 kernel and MadWifi driver in AP mode, bridged to local network.
After changing wireless card in my Asus router from broadcom to atheros I started to see a problems with my Nokia N810 device. It frequently diassociates from AP, but didn't notice that, also stopes answer to pings, but can answer after a series of pings requests. I started to investigate this situation.
Facts:
- N810 disconnects from AP by inact timeout with:
Apr 27 17:03:51 OpenWrt user.debug kernel: wifi0/ath0[06:19:e0:8c:09:29]: 00:1d:6e:d5:7c:7e probe station due to inactivity
Apr 27 17:06:21 OpenWrt user.debug kernel: wifi0/ath0[06:19:e0:8c:09:29]: 00:1d:6e:d5:7c:7e probe station due to inactivity
Apr 27 17:06:36 OpenWrt user.debug kernel: wifi0/ath0[06:19:e0:8c:09:29]: 00:1d:6e:d5:7c:7e probe station due to inactivity
Apr 27 17:06:51 OpenWrt user.debug kernel: wifi0/ath0[06:19:e0:8c:09:29]: 00:1d:6e:d5:7c:7e station timed out due to inactivity (refcnt 9)
Apr 27 17:06:51 OpenWrt user.debug kernel: wifi0/ath0[06:19:e0:8c:09:29]: 00:1d:6e:d5:7c:7e send station deauthenticate (reason 2)
Apr 27 17:06:51 OpenWrt user.debug kernel: wifi0/ath0[06:19:e0:8c:09:29]: 00:1d:6e:d5:7c:7e station with aid 1 leaves (refcnt 13)
Apr 27 17:06:51 OpenWrt user.debug kernel: wifi0/ath0[06:19:e0:8c:09:29]: 00:1d:6e:d5:7c:7e node_cleanup_debug (ieee80211_node_leave2316): power save mode off, 0 STAs in PS mode
- N810 always answer to pings and other packets if it transmits data out through AP;
- N810 works excellent if it has disabled Power Saving mode;
After that I start running tcpdump on both ends (AP and N810):
- when N810 in PS, it often didn't recieve arp broadcast from network, and don't answer to arp requests for it;
- nothing changes after iwpriv ath0 uapsd 0, iwpriv ath0 wmm 0, and encryption set to none;
Then I put my laptop in Power Saving mode:
- with laptop I see exactly the same situation with arp requests;
- laptop didn't deassociate from AP, because of frequent changes in PS mode and resetting timeout:
Apr 27 17:11:52 OpenWrt user.debug kernel: wifi0/ath0[06:19:e0:8c:09:29]: 00:18:de:b8:be:7b power save mode on, 1 STAs in PS mode
Apr 27 17:11:53 OpenWrt user.debug kernel: wifi0/ath0[06:19:e0:8c:09:29]: 00:18:de:b8:be:7b power save mode off, 0 STAs in PS mode
Apr 27 17:11:53 OpenWrt user.debug kernel: wifi0/ath0[06:19:e0:8c:09:29]: 00:18:de:b8:be:7b power save mode on, 1 STAs in PS mode
Apr 27 17:11:54 OpenWrt user.debug kernel: wifi0/ath0[06:19:e0:8c:09:29]: 00:18:de:b8:be:7b power save mode off, 0 STAs in PS mode
Apr 27 17:11:54 OpenWrt user.debug kernel: wifi0/ath0[06:19:e0:8c:09:29]: 00:18:de:b8:be:7b power save mode on, 1 STAs in PS mode
- laptop also works excellent with disabled Power Saving;
To fix arp problem I added mac address to arp table of desktop computer in lan with permanent state. And it helps - madwifi always sends packet with direct address to PS STAs:
Apr 27 17:17:42 OpenWrt user.debug kernel: wifi0/ath0[06:19:e0:8c:09:29]: 00:1d:6e:d5:7c:7e save frame, 1 now queued
Apr 27 17:17:42 OpenWrt user.debug kernel: wifi0/ath0[06:19:e0:8c:09:29]: 06:19:e0:8c:09:29 ieee80211_beacon_update: TIM updated, pending 1, off 0, len 1
Apr 27 17:17:42 OpenWrt user.debug kernel: wifi0/ath0[06:19:e0:8c:09:29]: 00:1d:6e:d5:7c:7e recv ps-poll, send packet, queue empty
Apr 27 17:17:42 OpenWrt user.debug kernel: wifi0/ath0[06:19:e0:8c:09:29]: 00:1d:6e:d5:7c:7e power save mode off, 0 STAs in PS mode
Apr 27 17:17:42 OpenWrt user.debug kernel: wifi0/ath0[06:19:e0:8c:09:29]: 06:19:e0:8c:09:29 ieee80211_beacon_update: TIM updated, pending 0, off 0, len 1
Apr 27 17:17:42 OpenWrt user.debug kernel: wifi0/ath0[06:19:e0:8c:09:29]: 00:1d:6e:d5:7c:7e power save mode on, 1 STAs in PS mode
I try different versions of madwifi:
- r3314 with openwrt patches;
- r3314 without openwrt patches;
- r3480 without openwrt patches.
All works the same. I can't at the moment try latest trunk because of ticket 1910, but I think that it also has this problem.
I can give any logs and debugging testing if you say what you want to see.