aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/mci.c
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>2012-11-20 08:00:01 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-11-21 14:16:01 -0500
commit2884561a6472d6f9c960ccf2250a72ca058167a1 (patch)
treecd4b95eae71371652ae97e074166ec7befc6f107 /drivers/net/wireless/ath/ath9k/mci.c
parentb88083bfb37297330240a478bef76316ee3f1b9b (diff)
ath9k: stomp audio profiles on weak signal strength
On lower WLAN signal strength, WLAN downlink traffic might suffer from retransmissions. At the mean time, playing SCO/A2DP profiles is affecting WLAN stability. In such scenario, by stomping SCO/A2DP BT traffic completely for a BTCOEX period, gives WLAN traffic an oppertunity to recover PHY rate. It also improves WLAN stability at lower RSSI without sacificing BT traffic. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/mci.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/mci.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/mci.c b/drivers/net/wireless/ath/ath9k/mci.c
index ece192d77355..706378ea3ba2 100644
--- a/drivers/net/wireless/ath/ath9k/mci.c
+++ b/drivers/net/wireless/ath/ath9k/mci.c
@@ -729,12 +729,30 @@ void ath9k_mci_set_txpower(struct ath_softc *sc, bool setchannel,
729 ath9k_hw_set_txpowerlimit(ah, sc->config.txpowlimit, false); 729 ath9k_hw_set_txpowerlimit(ah, sc->config.txpowlimit, false);
730} 730}
731 731
732static void ath9k_mci_stomp_audio(struct ath_softc *sc)
733{
734 struct ath_hw *ah = sc->sc_ah;
735 struct ath_btcoex *btcoex = &sc->btcoex;
736 struct ath_mci_profile *mci = &btcoex->mci;
737
738 if (!mci->num_sco && !mci->num_a2dp)
739 return;
740
741 if (ah->stats.avgbrssi > 25) {
742 btcoex->stomp_audio = 0;
743 return;
744 }
745
746 btcoex->stomp_audio++;
747}
732void ath9k_mci_update_rssi(struct ath_softc *sc) 748void ath9k_mci_update_rssi(struct ath_softc *sc)
733{ 749{
734 struct ath_hw *ah = sc->sc_ah; 750 struct ath_hw *ah = sc->sc_ah;
735 struct ath_btcoex *btcoex = &sc->btcoex; 751 struct ath_btcoex *btcoex = &sc->btcoex;
736 struct ath9k_hw_mci *mci_hw = &sc->sc_ah->btcoex_hw.mci; 752 struct ath9k_hw_mci *mci_hw = &sc->sc_ah->btcoex_hw.mci;
737 753
754 ath9k_mci_stomp_audio(sc);
755
738 if (!(mci_hw->config & ATH_MCI_CONFIG_CONCUR_TX)) 756 if (!(mci_hw->config & ATH_MCI_CONFIG_CONCUR_TX))
739 return; 757 return;
740 758