summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/main.c
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vasanth@atheros.com>2009-08-26 21:08:43 +0530
committerJohn W. Linville <linville@tuxdriver.com>2009-08-28 14:40:48 -0400
commitf985ad12b595094839fddaf757fcf5d853ed3d7f (patch)
treef485fc5812004b9d7261e4b87882480ce247e232 /drivers/net/wireless/ath/ath9k/main.c
parent4a7f13eef508012bd1b0ffbb24b807e3494f31cd (diff)
downloadblackbird-obmc-linux-f985ad12b595094839fddaf757fcf5d853ed3d7f.tar.gz
blackbird-obmc-linux-f985ad12b595094839fddaf757fcf5d853ed3d7f.zip
ath9k: Split ath9k_hw_btcoex_enable() into two logical pieces
This function currently does initialization + enable the btcoex support. Split it into two logical functions which does the above operations separately. Btcoex initialization is done during attach time and enabling this feature is done in start(). Also, add code to disable btcoex support in stop(). Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index eb8d673cde59..878d3be7c717 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1509,8 +1509,8 @@ static int ath_init_softc(u16 devid, struct ath_softc *sc)
ARRAY_SIZE(ath9k_5ghz_chantable);
}
- if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_BT_COEX)
- ath9k_hw_btcoex_enable(sc->sc_ah);
+ if (ah->caps.hw_caps & ATH9K_HW_CAP_BT_COEX)
+ ath9k_hw_btcoex_init(ah);
return 0;
bad2:
@@ -1992,6 +1992,10 @@ static int ath9k_start(struct ieee80211_hw *hw)
ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, 0);
+ if ((sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_BT_COEX) &&
+ !(sc->sc_flags & SC_OP_BTCOEX_ENABLED))
+ ath9k_hw_btcoex_enable(sc->sc_ah);
+
mutex_unlock:
mutex_unlock(&sc->mutex);
@@ -2138,6 +2142,9 @@ static void ath9k_stop(struct ieee80211_hw *hw)
wiphy_rfkill_stop_polling(sc->hw->wiphy);
+ if (sc->sc_flags & SC_OP_BTCOEX_ENABLED)
+ ath9k_hw_btcoex_disable(sc->sc_ah);
+
/* disable HAL and put h/w to sleep */
ath9k_hw_disable(sc->sc_ah);
ath9k_hw_configpcipowersave(sc->sc_ah, 1);
OpenPOWER on IntegriCloud