Lines Matching refs:sc

119 static void ath_mci_update_scheme(struct ath_softc *sc)  in ath_mci_update_scheme()  argument
121 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in ath_mci_update_scheme()
122 struct ath_btcoex *btcoex = &sc->btcoex; in ath_mci_update_scheme()
124 struct ath9k_hw_mci *mci_hw = &sc->sc_ah->btcoex_hw.mci; in ath_mci_update_scheme()
160 btcoex->duty_cycle = AR_SREV_9565(sc->sc_ah) ? 40 : 35; in ath_mci_update_scheme()
186 if (IS_CHAN_2GHZ(sc->sc_ah->curchan)) { in ath_mci_update_scheme()
187 if (IS_CHAN_HT(sc->sc_ah->curchan)) in ath_mci_update_scheme()
193 ath9k_btcoex_timer_pause(sc); in ath_mci_update_scheme()
194 ath9k_hw_btcoex_disable(sc->sc_ah); in ath_mci_update_scheme()
196 if (IS_CHAN_5GHZ(sc->sc_ah->curchan)) in ath_mci_update_scheme()
206 ath9k_hw_btcoex_enable(sc->sc_ah); in ath_mci_update_scheme()
207 ath9k_btcoex_timer_resume(sc); in ath_mci_update_scheme()
210 static void ath_mci_cal_msg(struct ath_softc *sc, u8 opcode, u8 *rx_payload) in ath_mci_cal_msg() argument
212 struct ath_hw *ah = sc->sc_ah; in ath_mci_cal_msg()
221 ath9k_queue_reset(sc, RESET_TYPE_MCI); in ath_mci_cal_msg()
227 ar9003_mci_send_message(sc->sc_ah, MCI_GPM, 0, payload, in ath_mci_cal_msg()
238 struct ath_softc *sc = container_of(work, struct ath_softc, mci_work); in ath9k_mci_work() local
240 ath_mci_update_scheme(sc); in ath9k_mci_work()
256 static void ath_mci_set_concur_txprio(struct ath_softc *sc) in ath_mci_set_concur_txprio() argument
258 struct ath_btcoex *btcoex = &sc->btcoex; in ath_mci_set_concur_txprio()
292 ath9k_hw_btcoex_set_concur_txprio(sc->sc_ah, stomp_txprio); in ath_mci_set_concur_txprio()
295 static u8 ath_mci_process_profile(struct ath_softc *sc, in ath_mci_process_profile() argument
298 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in ath_mci_process_profile()
299 struct ath_btcoex *btcoex = &sc->btcoex; in ath_mci_process_profile()
326 ath_mci_set_concur_txprio(sc); in ath_mci_process_profile()
330 static u8 ath_mci_process_status(struct ath_softc *sc, in ath_mci_process_status() argument
333 struct ath_btcoex *btcoex = &sc->btcoex; in ath_mci_process_status()
360 ath_mci_set_concur_txprio(sc); in ath_mci_process_status()
367 static void ath_mci_msg(struct ath_softc *sc, u8 opcode, u8 *rx_payload) in ath_mci_msg() argument
369 struct ath_hw *ah = sc->sc_ah; in ath_mci_msg()
372 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in ath_mci_msg()
379 ath_mci_flush_profile(&sc->btcoex.mci); in ath_mci_msg()
408 update_scheme += ath_mci_process_profile(sc, &profile_info); in ath_mci_msg()
424 update_scheme += ath_mci_process_status(sc, &profile_status); in ath_mci_msg()
431 ieee80211_queue_work(sc->hw, &sc->mci_work); in ath_mci_msg()
434 int ath_mci_setup(struct ath_softc *sc) in ath_mci_setup() argument
436 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in ath_mci_setup()
437 struct ath_mci_coex *mci = &sc->mci_coex; in ath_mci_setup()
441 buf->bf_addr = dmam_alloc_coherent(sc->dev, in ath_mci_setup()
459 ret = ar9003_mci_setup(sc->sc_ah, mci->gpm_buf.bf_paddr, in ath_mci_setup()
467 INIT_WORK(&sc->mci_work, ath9k_mci_work); in ath_mci_setup()
473 void ath_mci_cleanup(struct ath_softc *sc) in ath_mci_cleanup() argument
475 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in ath_mci_cleanup()
476 struct ath_hw *ah = sc->sc_ah; in ath_mci_cleanup()
483 void ath_mci_intr(struct ath_softc *sc) in ath_mci_intr() argument
485 struct ath_mci_coex *mci = &sc->mci_coex; in ath_mci_intr()
486 struct ath_hw *ah = sc->sc_ah; in ath_mci_intr()
495 ar9003_mci_get_interrupt(sc->sc_ah, &mci_int, &mci_int_rxmsg); in ath_mci_intr()
580 ath_mci_cal_msg(sc, subtype, (u8 *)pgpm); in ath_mci_intr()
584 ath_mci_msg(sc, opcode, (u8 *)pgpm); in ath_mci_intr()
627 ath_mci_msg(sc, MCI_GPM_COEX_NOOP, NULL); in ath_mci_intr()
631 void ath_mci_enable(struct ath_softc *sc) in ath_mci_enable() argument
633 struct ath_common *common = ath9k_hw_common(sc->sc_ah); in ath_mci_enable()
638 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_MCI) in ath_mci_enable()
639 sc->sc_ah->imask |= ATH9K_INT_MCI; in ath_mci_enable()
642 void ath9k_mci_update_wlan_channels(struct ath_softc *sc, bool allow_all) in ath9k_mci_update_wlan_channels() argument
644 struct ath_hw *ah = sc->sc_ah; in ath9k_mci_update_wlan_channels()
692 void ath9k_mci_set_txpower(struct ath_softc *sc, bool setchannel, in ath9k_mci_set_txpower() argument
695 struct ath_hw *ah = sc->sc_ah; in ath9k_mci_set_txpower()
696 struct ath9k_hw_mci *mci_hw = &sc->sc_ah->btcoex_hw.mci; in ath9k_mci_set_txpower()
708 struct ath9k_hw_cal_data *caldata = &sc->cur_chan->caldata; in ath9k_mci_set_txpower()
722 ath9k_hw_set_txpowerlimit(ah, sc->cur_chan->txpower, false); in ath9k_mci_set_txpower()
725 static void ath9k_mci_stomp_audio(struct ath_softc *sc) in ath9k_mci_stomp_audio() argument
727 struct ath_hw *ah = sc->sc_ah; in ath9k_mci_stomp_audio()
728 struct ath_btcoex *btcoex = &sc->btcoex; in ath9k_mci_stomp_audio()
741 void ath9k_mci_update_rssi(struct ath_softc *sc) in ath9k_mci_update_rssi() argument
743 struct ath_hw *ah = sc->sc_ah; in ath9k_mci_update_rssi()
744 struct ath_btcoex *btcoex = &sc->btcoex; in ath9k_mci_update_rssi()
745 struct ath9k_hw_mci *mci_hw = &sc->sc_ah->btcoex_hw.mci; in ath9k_mci_update_rssi()
747 ath9k_mci_stomp_audio(sc); in ath9k_mci_update_rssi()
757 ath9k_mci_set_txpower(sc, false, true); in ath9k_mci_update_rssi()
764 ath9k_mci_set_txpower(sc, false, false); in ath9k_mci_update_rssi()