ath9k: Fix RFKILL bugs
authorSujith <Sujith.Manoharan@atheros.com>
Wed, 23 Sep 2009 08:19:12 +0000 (13:49 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 23 Sep 2009 15:35:54 +0000 (11:35 -0400)
commite31f7b96f0252e8da06df1bc7fd0f6dbc8cbec42
treea9b9220dc1621e7153e68c0e8f529846f700ceae
parent33e2fb2f2b5d3b2f491fccab0ead256e34447cc6
ath9k: Fix RFKILL bugs

This patch fixes 2 issues in RFKILL:

* Calling wiphy_rfkill_stop_polling() in ath9k_stop
  would mean that the driver cannot report HW status
  when the radio is re-enabled. Move this to ath_detach().

* Calling ath_radio_{enable/disable} without checking the current
  state results in ath_radio_enable() being called repeatedly
  for every invocation of rfkill_poll(). This is not needed
  in any case since wiphy_rfkill_set_hw_state() would call
  ->stop() if the radio has been disabled.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/main.c