aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorMohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>2012-10-08 12:00:51 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-10-29 15:18:50 -0400
commitbe41b052029f75a72df3c437a238bf9d574b6461 (patch)
tree53a940e7fced76a558d9019ac1067506335cc443 /drivers/net
parente0509d3bdd7365d06c9bf570bf9f118cae6cbd58 (diff)
ath9k: Ensure we set FTP_STOMP_LOW weight when WLAN is idle
When WLAN is idle ensure we downgrade to FTP_STOMP_LOW weight (from STOMP_LOW) to provide more bandwidth for BT FTP profile. WLAN's idleness can be estimated by taking into account of the rx data packets and just ignore beacons, qos nullfunc etc. Also update bt_wait_time even if the chip is in NETWORK SLEEP mode. This should help BT throughput when WLAN is idle. Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath9k/gpio.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/recv.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c
index bf4fb7db15eb..9e63a03330cb 100644
--- a/drivers/net/wireless/ath/ath9k/gpio.c
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
@@ -193,7 +193,6 @@ static void ath_mci_ftp_adjust(struct ath_softc *sc)
193 struct ath_mci_profile *mci = &btcoex->mci; 193 struct ath_mci_profile *mci = &btcoex->mci;
194 struct ath_hw *ah = sc->sc_ah; 194 struct ath_hw *ah = sc->sc_ah;
195 195
196 btcoex->bt_wait_time += btcoex->btcoex_period;
197 if (btcoex->bt_wait_time > ATH_BTCOEX_RX_WAIT_TIME) { 196 if (btcoex->bt_wait_time > ATH_BTCOEX_RX_WAIT_TIME) {
198 if (ar9003_mci_state(ah, MCI_STATE_NEED_FTP_STOMP) && 197 if (ar9003_mci_state(ah, MCI_STATE_NEED_FTP_STOMP) &&
199 (mci->num_pan || mci->num_other_acl)) 198 (mci->num_pan || mci->num_other_acl))
@@ -222,6 +221,7 @@ static void ath_btcoex_period_timer(unsigned long data)
222 221
223 spin_lock_irqsave(&sc->sc_pm_lock, flags); 222 spin_lock_irqsave(&sc->sc_pm_lock, flags);
224 if (sc->sc_ah->power_mode == ATH9K_PM_NETWORK_SLEEP) { 223 if (sc->sc_ah->power_mode == ATH9K_PM_NETWORK_SLEEP) {
224 btcoex->bt_wait_time += btcoex->btcoex_period;
225 spin_unlock_irqrestore(&sc->sc_pm_lock, flags); 225 spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
226 goto skip_hw_wakeup; 226 goto skip_hw_wakeup;
227 } 227 }
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index 83d16e7ed272..a04028bce28b 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -1105,7 +1105,10 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
1105 else 1105 else
1106 rs.is_mybeacon = false; 1106 rs.is_mybeacon = false;
1107 1107
1108 sc->rx.num_pkts++; 1108 if (ieee80211_is_data_present(hdr->frame_control) &&
1109 !ieee80211_is_qos_nullfunc(hdr->frame_control))
1110 sc->rx.num_pkts++;
1111
1109 ath_debug_stat_rx(sc, &rs); 1112 ath_debug_stat_rx(sc, &rs);
1110 1113
1111 /* 1114 /*