Skip to contentSkip to conversation

ath9k: Ensure we set FTP_STOMP_LOW weight when WLAN is idle

RFC New Mohammed Shafi Shajakhan 1 participant 1 message Sep 12, 2012 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

RFC 1/1 ath9k: Ensure we set FTP_STOMP_LOW weight when WLAN is idle

From: Mohammed Shafi Shajakhan <[email protected]>

We WLAN is idle we can some better bandwidth to FTP by setting STOMP_LOW_FTP where stomping the FTP BT is pretty much reduced when compared to setting STOMP_LOW weight. we calculate WLAN is idle by taking into account of the rx data packets, so ensure that we take into account of data packets(ignore beacons).

Also update bt_wait_time even if the chip is NETWORK SLEEP mode. This should help BT throughput when WLAN is idle, when everything else is fine :)

---
 drivers/net/wireless/ath/ath9k/gpio.c |    2 +-
 drivers/net/wireless/ath/ath9k/recv.c |    5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath9k/gpio.c +1 -1
index 45f2422..09d517e 100644
@@ -198,6 +198,7 @@ static void ath_btcoex_period_timer(unsigned long data)
 
 	spin_lock_irqsave(&sc->sc_pm_lock, flags);
 	if (sc->sc_ah->power_mode == ATH9K_PM_NETWORK_SLEEP) {
+		btcoex->bt_wait_time += btcoex->btcoex_period;
 		spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
 		goto skip_hw_wakeup;
 	}
@@ -208,7 +209,6 @@ static void ath_btcoex_period_timer(unsigned long data)
 		ath_detect_bt_priority(sc);
 	is_btscan = test_bit(BT_OP_SCAN, &btcoex->op_flags);
 
-	btcoex->bt_wait_time += btcoex->btcoex_period;
 	if (btcoex->bt_wait_time > ATH_BTCOEX_RX_WAIT_TIME) {
 		if (ar9003_mci_state(ah, MCI_STATE_NEED_FTP_STOMP) &&
 		    (mci->num_pan || mci->num_other_acl))
drivers/net/wireless/ath/ath9k/recv.c +4 -1
index 4480c0c..9b2a8cc 100644
@@ -1105,7 +1105,10 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
 		else
 			rs.is_mybeacon = false;
 
-		sc->rx.num_pkts++;
+		if (ieee80211_is_data_present(hdr->frame_control) &&
+		    !ieee80211_is_qos_nullfunc(hdr->frame_control))
+			sc->rx.num_pkts++;
+
 		ath_debug_stat_rx(sc, &rs);
 
 		/*
Signature · 1 line
1.7.0.4