linux/drivers/net/wireless
Johannes Berg 5cff20e6c5 mac80211: tell driver when idle
When we aren't doing anything in mac80211, we can turn off
much of the hardware, depending on the driver/hw. Not doing
anything, aka being idle, means:

 * no monitor interfaces
 * no AP/mesh/wds interfaces
 * any station interfaces are in DISABLED state
 * any IBSS interfaces aren't trying to be in a network
 * we aren't trying to scan

By creating a new function that verifies these conditions and calling
it at strategic points where the states of those conditions change,
we can easily make mac80211 tell the driver when we are idle to save
power.

Additionally, this fixes a small quirk where a recalculated powersave
state is passed to the driver even if the hardware is about to stopped
completely.

This patch intentionally doesn't touch radio_enabled because that is
currently implemented to be a soft rfkill which is inappropriate here
when we need to be able to wake up with low latency.

One thing I'm not entirely sure about is this:

  phy0: device no longer idle - in use
  wlan0: direct probe to AP 00:11:24:91:07:4d try 1
  wlan0 direct probe responded
  wlan0: authenticate with AP 00:11:24:91:07:4d
  wlan0: authenticated
> phy0: device now idle
> phy0: device no longer idle - in use
  wlan0: associate with AP 00:11:24:91:07:4d
  wlan0: RX AssocResp from 00:11:24:91:07:4d (capab=0x401 status=0 aid=1)
  wlan0: associated

Is it appropriate to go into idle state for a short time when we have
just authenticated, but not associated yet? This happens only with the
userspace SME, because we cannot really know how long it will wait
before asking us to associate. Would going idle after a short timeout
be more appropriate? We may need to revisit this, depending on what
happens.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-06 15:14:51 -04:00
..
ath ath9k: Fix handling of retry count of NO_ACK frames 2009-05-06 15:14:51 -04:00
b43 mac80211: unify config_interface and bss_info_changed 2009-05-06 15:14:36 -04:00
b43legacy mac80211: unify config_interface and bss_info_changed 2009-05-06 15:14:36 -04:00
hostap wireless: remove some (bogus?) 'may be used uninitialized' warnings 2009-04-24 15:41:41 -04:00
ipw2x00 ipw2x00: remove old compat_net_dev_ops code 2009-04-16 02:20:04 -07:00
iwlwifi iwlwifi: Fix handling of retry count of NO_ACK frames in iwl-{3945|agn}-rs 2009-05-06 15:14:51 -04:00
libertas libertas: fix format warning 2009-04-24 15:41:37 -04:00
libertas_tf mac80211: unify config_interface and bss_info_changed 2009-05-06 15:14:36 -04:00
orinoco orinoco: correct timeout logic in __orinoco_hw_set_tkip_key() 2009-04-16 10:39:17 -04:00
p54 p54usb: rework driver for resume 2009-05-06 15:14:41 -04:00
prism54 dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
rt2x00 rt2x00: Implement support for 802.11n 2009-05-06 15:14:50 -04:00
rtl818x mac80211: unify config_interface and bss_info_changed 2009-05-06 15:14:36 -04:00
zd1211rw mac80211: unify config_interface and bss_info_changed 2009-05-06 15:14:36 -04:00
adm8211.c mac80211: unify config_interface and bss_info_changed 2009-05-06 15:14:36 -04:00
adm8211.h
airo_cs.c airo_cs: checkpatch.pl cleanups 2009-03-16 18:09:35 -04:00
airo.c airo: queue SIOCSIWAUTH-requested auth mode change for next commit 2009-04-16 10:39:10 -04:00
airo.h
arlan-main.c Merge branch 'linus' into percpu-cpumask-x86-for-linus-2 2009-03-28 04:26:01 +01:00
arlan-proc.c
arlan.h
at76c50x-usb.c mac80211: unify config_interface and bss_info_changed 2009-05-06 15:14:36 -04:00
at76c50x-usb.h
atmel_cs.c
atmel_pci.c
atmel.c atmel: fix netdev ops conversion 2009-04-21 02:08:51 -07:00
atmel.h
i82586.h
i82593.h
Kconfig rndis_wlan: select CFG80211 in Kconfig 2009-04-22 16:57:21 -04:00
mac80211_hwsim.c mac80211: tell driver when idle 2009-05-06 15:14:51 -04:00
Makefile atheros: put atheros wireless drivers into ath/ 2009-04-22 16:54:38 -04:00
mwl8k.c mac80211: unify config_interface and bss_info_changed 2009-05-06 15:14:36 -04:00
netwave_cs.c netwave: convert to net_device_ops 2009-03-21 22:43:57 -07:00
ray_cs.c raylan: convert to net_device_ops 2009-03-21 22:51:19 -07:00
ray_cs.h
rayctl.h
rndis_wlan.c rndis_wlan: fix initialization order for workqueue&workers 2009-04-28 15:59:48 -04:00
strip.c strip: convert to net_device_ops 2009-03-21 22:43:57 -07:00
wavelan_cs.c wavelan: convert to net_device_ops 2009-03-21 22:43:59 -07:00
wavelan_cs.h
wavelan_cs.p.h wavelan: convert to internal net_device_stats 2009-03-21 22:43:58 -07:00
wavelan.c wireless: convert wavelan to net_device_ops 2009-03-27 00:46:46 -07:00
wavelan.h
wavelan.p.h wireless: convert wavelan to net_device_ops 2009-03-27 00:46:46 -07:00
wl3501_cs.c wl3501: convert to net_device_ops 2009-03-21 22:51:20 -07:00
wl3501.h wl3501: convert to internal net_device_stats 2009-03-21 22:51:19 -07:00
zd1201.c wireless: remove duplicated .ndo_set_mac_address 2009-03-29 13:52:21 -07:00
zd1201.h zd1201: convert to internal net_device_stats 2009-03-21 22:51:20 -07:00