Linux – really disable power save in linux wifi

debianhostapdlinuxpower-managementwireless-networking

I've got a laptop with an Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] (rev 34) (using iwlwifi kernel module). Although power_save (a module parameter) is disabled, I can see 802.11 control frames containing power management packets notifying the access point that it is going to sleep. The access point stops sending packets to the laptop until it sees another packet from the laptop.

How do I really stop the laptop from sending power save packets to the access point? (Or alternatively, how do I stop the access point from honouring them?)

I'm sure power_save is disabled, as when I enabled it, power save packets are sent far more frequently (almost every second).

The access point is running hostapd with an ath9k driver. Both the access point and laptop are running debian wheezy with the 686-pae 3.2 kernel. I've tried putting the 3.10 iwlwifi driver on the laptop, but there is no change.

EDIT: I tried on another laptop with another iwlwifi chipset Intel Corporation Centrino Ultimate-N 6300 (rev 35) and it doesn't exactly have this problem. Every power save packet is followed by a non-power-save QoS null packet, so the access point presumably stops sending packets for a fraction of a second.

EDIT: I tried another mini PCIe wifi card in the first laptop, but it appears to be locked down so another mini PCIe card cannot be detected by the OS.

Best Answer

I took a look at the source code for iwlwifi. In the header iwl-modparams.h there is this bit of code:

* struct iwl_mod_params
*
* Holds the module parameters
*
* @sw_crypto: using hardware encryption, default = 0
* @disable_11n: disable 11n capabilities, default = 0,
*      use IWL_DISABLE_HT_* constants
* @amsdu_size_8K: enable 8K amsdu size, default = 0
* @restart_fw: restart firmware, default = 1
* @wd_disable: enable stuck queue check, default = 0
* @bt_coex_active: enable bt coex, default = true
* @led_mode: system default, default = 0
* @power_save: disable power save, default = false
* @power_level: power level, default = 1
* @debug_level: levels are IWL_DL_*
* @ant_coupling: antenna coupling in dB, default = 0
*/

This suggests to me that the correct way to disable power saving is

insmod iwlwifi power_save=true

which is exactly the opposite of the output of modinfo. I would give it a try.

Related Question