diff options
author | Vasanthakumar Thiagarajan <vasanth@atheros.com> | 2009-08-26 11:38:43 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-28 14:40:48 -0400 |
commit | f985ad12b595094839fddaf757fcf5d853ed3d7f (patch) | |
tree | f485fc5812004b9d7261e4b87882480ce247e232 /drivers/net/wireless/ath/ath9k/main.c | |
parent | 4a7f13eef508012bd1b0ffbb24b807e3494f31cd (diff) |
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.c | 11 |
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 eb8d673cde5..878d3be7c71 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) | |||
1509 | ARRAY_SIZE(ath9k_5ghz_chantable); | 1509 | ARRAY_SIZE(ath9k_5ghz_chantable); |
1510 | } | 1510 | } |
1511 | 1511 | ||
1512 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_BT_COEX) | 1512 | if (ah->caps.hw_caps & ATH9K_HW_CAP_BT_COEX) |
1513 | ath9k_hw_btcoex_enable(sc->sc_ah); | 1513 | ath9k_hw_btcoex_init(ah); |
1514 | 1514 | ||
1515 | return 0; | 1515 | return 0; |
1516 | bad2: | 1516 | bad2: |
@@ -1992,6 +1992,10 @@ static int ath9k_start(struct ieee80211_hw *hw) | |||
1992 | 1992 | ||
1993 | ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, 0); | 1993 | ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, 0); |
1994 | 1994 | ||
1995 | if ((sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_BT_COEX) && | ||
1996 | !(sc->sc_flags & SC_OP_BTCOEX_ENABLED)) | ||
1997 | ath9k_hw_btcoex_enable(sc->sc_ah); | ||
1998 | |||
1995 | mutex_unlock: | 1999 | mutex_unlock: |
1996 | mutex_unlock(&sc->mutex); | 2000 | mutex_unlock(&sc->mutex); |
1997 | 2001 | ||
@@ -2138,6 +2142,9 @@ static void ath9k_stop(struct ieee80211_hw *hw) | |||
2138 | 2142 | ||
2139 | wiphy_rfkill_stop_polling(sc->hw->wiphy); | 2143 | wiphy_rfkill_stop_polling(sc->hw->wiphy); |
2140 | 2144 | ||
2145 | if (sc->sc_flags & SC_OP_BTCOEX_ENABLED) | ||
2146 | ath9k_hw_btcoex_disable(sc->sc_ah); | ||
2147 | |||
2141 | /* disable HAL and put h/w to sleep */ | 2148 | /* disable HAL and put h/w to sleep */ |
2142 | ath9k_hw_disable(sc->sc_ah); | 2149 | ath9k_hw_disable(sc->sc_ah); |
2143 | ath9k_hw_configpcipowersave(sc->sc_ah, 1); | 2150 | ath9k_hw_configpcipowersave(sc->sc_ah, 1); |