I'm unclear how well any of this works, but for reference some ideas around wifi power control in Linux.
iwconfig wlan0 power off
wifi.powersave = 3
The values for the powersave field are:
NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0): use the default value
NM_SETTING_WIRELESS_POWERSAVE_IGNORE (1): don't touch existing setting
NM_SETTING_WIRELESS_POWERSAVE_DISABLE (2): disable powersave
NM_SETTING_WIRELESS_POWERSAVE_ENABLE (3): enable powersave
Wireless powermanagement is run by a hook in pm-utils. You can turn it off in any of the following way:
Create a file in /etc/pm/config.d. I have named it blacklist:
gksu gedit /etc/pm/config.d/blacklist
and inside the file keep:
If you want to disable any other hooks, default hooks are located at /usr/lib/pm-utils/power.d/.
Or add the following line in /etc/network/interfaces to my wireless interface's settings:
post-up iwconfig wlan0 power off
Here's a complete example:
auto wlan0 iface wlan0 inet static address 192.168.1.2 network 192.168.1.0 netmask 255.255.255.0 broadcast 192.168.1.255 gateway 192.168.1.254 post-up iwconfig wlan0 power off wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Note that man interfaces says the behavior of post-up may change in the future.