diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2009-09-09 16:44:23 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-07 16:39:21 -0400 |
commit | 8c1b39547e2562f9aa0cc00b1a7d4cc325a46a4c (patch) | |
tree | fbf66e256a10f2e34bb1d13f5961ecf21bdcd899 /drivers/net/wireless/ath | |
parent | bc74bf8fc382b30df24c4e280fb84f3b1303958f (diff) |
ath9k: replaces SC_OP_BTCOEX_ENABLED with a bool
Whether or not bluetooth coex has been enabled is a hardware
state and only the hardware helpers will be able to set this.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/btcoex.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/btcoex.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 4 |
5 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index f001cc262660..891e71b10e5c 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -532,7 +532,6 @@ struct ath_led { | |||
532 | #define SC_OP_WAIT_FOR_PSPOLL_DATA BIT(17) | 532 | #define SC_OP_WAIT_FOR_PSPOLL_DATA BIT(17) |
533 | #define SC_OP_WAIT_FOR_TX_ACK BIT(18) | 533 | #define SC_OP_WAIT_FOR_TX_ACK BIT(18) |
534 | #define SC_OP_BEACON_SYNC BIT(19) | 534 | #define SC_OP_BEACON_SYNC BIT(19) |
535 | #define SC_OP_BTCOEX_ENABLED BIT(20) | ||
536 | #define SC_OP_BT_PRIORITY_DETECTED BIT(21) | 535 | #define SC_OP_BT_PRIORITY_DETECTED BIT(21) |
537 | 536 | ||
538 | struct ath_bus_ops { | 537 | struct ath_bus_ops { |
diff --git a/drivers/net/wireless/ath/ath9k/btcoex.c b/drivers/net/wireless/ath/ath9k/btcoex.c index 61a8e1d95bb9..91befc78a15b 100644 --- a/drivers/net/wireless/ath/ath9k/btcoex.c +++ b/drivers/net/wireless/ath/ath9k/btcoex.c | |||
@@ -164,7 +164,7 @@ void ath9k_hw_btcoex_enable(struct ath_hw *ah) | |||
164 | (0x2 << (btcoex_info->btactive_gpio * 2)), | 164 | (0x2 << (btcoex_info->btactive_gpio * 2)), |
165 | (0x3 << (btcoex_info->btactive_gpio * 2))); | 165 | (0x3 << (btcoex_info->btactive_gpio * 2))); |
166 | 166 | ||
167 | ah->ah_sc->sc_flags |= SC_OP_BTCOEX_ENABLED; | 167 | ah->btcoex_info.enabled = true; |
168 | } | 168 | } |
169 | 169 | ||
170 | void ath9k_hw_btcoex_disable(struct ath_hw *ah) | 170 | void ath9k_hw_btcoex_disable(struct ath_hw *ah) |
@@ -182,5 +182,5 @@ void ath9k_hw_btcoex_disable(struct ath_hw *ah) | |||
182 | REG_WRITE(ah, AR_BT_COEX_MODE2, 0); | 182 | REG_WRITE(ah, AR_BT_COEX_MODE2, 0); |
183 | } | 183 | } |
184 | 184 | ||
185 | ah->ah_sc->sc_flags &= ~SC_OP_BTCOEX_ENABLED; | 185 | ah->btcoex_info.enabled = false; |
186 | } | 186 | } |
diff --git a/drivers/net/wireless/ath/ath9k/btcoex.h b/drivers/net/wireless/ath/ath9k/btcoex.h index ed8d01d2f762..b2c3f7669852 100644 --- a/drivers/net/wireless/ath/ath9k/btcoex.h +++ b/drivers/net/wireless/ath/ath9k/btcoex.h | |||
@@ -64,6 +64,7 @@ struct ath_btcoex_config { | |||
64 | 64 | ||
65 | struct ath_btcoex_info { | 65 | struct ath_btcoex_info { |
66 | enum ath_btcoex_scheme btcoex_scheme; | 66 | enum ath_btcoex_scheme btcoex_scheme; |
67 | bool enabled; | ||
67 | u8 wlanactive_gpio; | 68 | u8 wlanactive_gpio; |
68 | u8 btactive_gpio; | 69 | u8 btactive_gpio; |
69 | u8 btpriority_gpio; | 70 | u8 btpriority_gpio; |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 6e33aadc161c..bbbd454fffef 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -2578,7 +2578,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, | |||
2578 | #endif | 2578 | #endif |
2579 | } | 2579 | } |
2580 | 2580 | ||
2581 | if (ah->ah_sc->sc_flags & SC_OP_BTCOEX_ENABLED) | 2581 | if (ah->btcoex_info.enabled) |
2582 | ath9k_hw_btcoex_enable(ah); | 2582 | ath9k_hw_btcoex_enable(ah); |
2583 | 2583 | ||
2584 | return 0; | 2584 | return 0; |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 9ac1ee0638f0..cd1bc9c27527 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -2199,7 +2199,7 @@ static int ath9k_start(struct ieee80211_hw *hw) | |||
2199 | ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, 0); | 2199 | ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, 0); |
2200 | 2200 | ||
2201 | if ((ah->btcoex_info.btcoex_scheme != ATH_BTCOEX_CFG_NONE) && | 2201 | if ((ah->btcoex_info.btcoex_scheme != ATH_BTCOEX_CFG_NONE) && |
2202 | !(sc->sc_flags & SC_OP_BTCOEX_ENABLED)) { | 2202 | !ah->btcoex_info.enabled) { |
2203 | ath9k_hw_btcoex_init_weight(ah); | 2203 | ath9k_hw_btcoex_init_weight(ah); |
2204 | ath9k_hw_btcoex_enable(ah); | 2204 | ath9k_hw_btcoex_enable(ah); |
2205 | 2205 | ||
@@ -2358,7 +2358,7 @@ static void ath9k_stop(struct ieee80211_hw *hw) | |||
2358 | return; /* another wiphy still in use */ | 2358 | return; /* another wiphy still in use */ |
2359 | } | 2359 | } |
2360 | 2360 | ||
2361 | if (sc->sc_flags & SC_OP_BTCOEX_ENABLED) { | 2361 | if (ah->btcoex_info.enabled) { |
2362 | ath9k_hw_btcoex_disable(ah); | 2362 | ath9k_hw_btcoex_disable(ah); |
2363 | if (ah->btcoex_info.btcoex_scheme == ATH_BTCOEX_CFG_3WIRE) | 2363 | if (ah->btcoex_info.btcoex_scheme == ATH_BTCOEX_CFG_3WIRE) |
2364 | ath9k_btcoex_timer_pause(sc); | 2364 | ath9k_btcoex_timer_pause(sc); |