linux/drivers/net/wireless
Ido Yariv 645865fc37 wlcore: Fix sdio out-of-sync power state
wl12xx_sdio_power_off() manually powers down the card regardless of the
runtime pm state. If wl12xx_sdio_power_on() is called before the card
was suspended by runtime PM, it will not power up the card.

As part of the HW detection, the chip's power is toggled. Since this
happens in the context of probing sdio, the power reference counter will
be higher than zero. As a result, when wl12xx_sdio_power_off() is
called, the chip will be powered down while still having a positive
power reference counter. If the interface is quickly activated, the
driver might try to transfer data to a powered off chip.

Fix this by ensuring that wl12xx_sdio_power_on() explicitly powers on
the chip in case runtime pm claims the chip is already powered on. To
avoid cases in which it is not possible to determine if the chip was
really powered on (card's power reference counter is positive), operate
on the mmc_card instead of the function.

Also verify that the chip is indeed powered on before powering off, to
avoid wrong reference counter values in error cases.

Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-22 10:46:33 +03:00
..
ath Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem 2012-05-30 10:32:16 -04:00
b43 b43: use pci_is_pcie() instead of obsolete pci_dev.is_pcie 2012-05-16 12:46:33 -04:00
b43legacy ssb: remove rev from boardinfo 2012-05-16 12:45:20 -04:00
brcm80211 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem 2012-05-30 10:32:16 -04:00
hostap net/wireless: use module_pci_driver 2012-04-16 14:38:50 -04:00
ipw2x00 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next 2012-05-14 18:00:48 -04:00
iwlegacy drivers/net: Convert compare_ether_addr to ether_addr_equal 2012-05-10 23:33:01 -04:00
iwlwifi iwlwifi: fix memory leak if opmode fails to init 2012-05-25 11:12:41 -04:00
iwmc3200wifi drivers/net: iwmc3200 depends on EXPERIMENTAL 2012-04-21 15:28:47 -04:00
libertas USB 3.5-rc1 pull request 2012-05-22 15:50:46 -07:00
libertas_tf USB: Disable hub-initiated LPM for comms devices. 2012-05-18 15:42:55 -07:00
mwifiex mwifiex: remove set_channel cfg80211 hook 2012-05-16 13:08:25 -04:00
orinoco USB 3.5-rc1 pull request 2012-05-22 15:50:46 -07:00
p54 USB 3.5-rc1 pull request 2012-05-22 15:50:46 -07:00
prism54 prism54: replace open-coded ARRAY_SIZE with macro 2012-04-12 15:10:47 -04:00
rt2x00 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-05-24 11:54:29 -07:00
rtl818x USB 3.5-rc1 pull request 2012-05-22 15:50:46 -07:00
rtlwifi USB 3.5-rc1 pull request 2012-05-22 15:50:46 -07:00
ti wlcore: Fix sdio out-of-sync power state 2012-06-22 10:46:33 +03:00
zd1211rw USB: Disable hub-initiated LPM for comms devices. 2012-05-18 15:42:55 -07:00
adm8211.c net/wireless: use module_pci_driver 2012-04-16 14:38:50 -04:00
adm8211.h
airo_cs.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
airo.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
airo.h
at76c50x-usb.c USB 3.5-rc1 pull request 2012-05-22 15:50:46 -07:00
at76c50x-usb.h
atmel_cs.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
atmel_pci.c net/wireless: use module_pci_driver 2012-04-16 14:38:50 -04:00
atmel.c wireless, atmel: remove pointless test for NULL before release_firmware() call 2012-04-12 15:06:07 -04:00
atmel.h
Kconfig wireless/wl12xx/wl1251: move TI WLAN modules to a common ti subdirectory 2012-04-12 08:43:55 +03:00
mac80211_hwsim.c mac80211_hwsim: Fix rate control by correctly reporting transmission counts 2012-05-15 17:27:27 -04:00
mac80211_hwsim.h
Makefile wireless/wl12xx/wl1251: move TI WLAN modules to a common ti subdirectory 2012-04-12 08:43:55 +03:00
mwl8k.c drivers/net: Convert compare_ether_addr to ether_addr_equal 2012-05-10 23:33:01 -04:00
ray_cs.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
ray_cs.h
rayctl.h
rndis_wlan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-05-24 11:54:29 -07:00
wl3501_cs.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
wl3501.h
zd1201.c USB: Disable hub-initiated LPM for comms devices. 2012-05-18 15:42:55 -07:00
zd1201.h