#define SC_OP_WAIT_FOR_PSPOLL_DATA BIT(17)
#define SC_OP_WAIT_FOR_TX_ACK BIT(18)
#define SC_OP_BEACON_SYNC BIT(19)
-#define SC_OP_BTCOEX_ENABLED BIT(20)
#define SC_OP_BT_PRIORITY_DETECTED BIT(21)
struct ath_bus_ops {
(0x2 << (btcoex_info->btactive_gpio * 2)),
(0x3 << (btcoex_info->btactive_gpio * 2)));
- ah->ah_sc->sc_flags |= SC_OP_BTCOEX_ENABLED;
+ ah->btcoex_info.enabled = true;
}
void ath9k_hw_btcoex_disable(struct ath_hw *ah)
REG_WRITE(ah, AR_BT_COEX_MODE2, 0);
}
- ah->ah_sc->sc_flags &= ~SC_OP_BTCOEX_ENABLED;
+ ah->btcoex_info.enabled = false;
}
struct ath_btcoex_info {
enum ath_btcoex_scheme btcoex_scheme;
+ bool enabled;
u8 wlanactive_gpio;
u8 btactive_gpio;
u8 btpriority_gpio;
#endif
}
- if (ah->ah_sc->sc_flags & SC_OP_BTCOEX_ENABLED)
+ if (ah->btcoex_info.enabled)
ath9k_hw_btcoex_enable(ah);
return 0;
ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, 0);
if ((ah->btcoex_info.btcoex_scheme != ATH_BTCOEX_CFG_NONE) &&
- !(sc->sc_flags & SC_OP_BTCOEX_ENABLED)) {
+ !ah->btcoex_info.enabled) {
ath9k_hw_btcoex_init_weight(ah);
ath9k_hw_btcoex_enable(ah);
return; /* another wiphy still in use */
}
- if (sc->sc_flags & SC_OP_BTCOEX_ENABLED) {
+ if (ah->btcoex_info.enabled) {
ath9k_hw_btcoex_disable(ah);
if (ah->btcoex_info.btcoex_scheme == ATH_BTCOEX_CFG_3WIRE)
ath9k_btcoex_timer_pause(sc);