aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/ath/554-ath9k-dynack-move-debug-log-after-buffer-increments.patch
diff options
context:
space:
mode:
authorKoen Vandeputte <koen.vandeputte@ncentric.com>2018-11-05 11:31:12 +0100
committerKoen Vandeputte <koen.vandeputte@ncentric.com>2018-11-06 11:49:27 +0100
commit5ac34818f9c3ad46febc260f8ae348e05b9c8f00 (patch)
tree8f5b8dbb1f3532d9c3d525ebcbd3bcf97fcd5f0d /package/kernel/mac80211/patches/ath/554-ath9k-dynack-move-debug-log-after-buffer-increments.patch
parent860de2e1aa9deac7dce76b7f85cb5fcfbba00468 (diff)
downloadupstream-5ac34818f9c3ad46febc260f8ae348e05b9c8f00.tar.gz
upstream-5ac34818f9c3ad46febc260f8ae348e05b9c8f00.tar.bz2
upstream-5ac34818f9c3ad46febc260f8ae348e05b9c8f00.zip
ath9k: fix dynack in IBSS mode
Currently, dynack was only tested upstream using AP/STA mode. Testing it on IBSS, showed that late-ack detection was broken. This is caused due to dynack using Association Request/Response frames for late-ack detection, which IBSS does not use. Also allowing Authentication frames here solves this. A second issue also got fixed, which was also seen AP/STA mode: When a station was added, the estimated value would be exponentially averaged using 0 as a starting point. This means that on larger distances, the ack timeout was still not high enough before synchronizing would run out of late-ack's for estimation. Fix this by using the initial estimated value as a baseline and only start averaging in the following estimation rounds. Test setup: - 2x identical devices: RB912UAG-5HPnD + 19dB sector - IBSS - 2x2 802.11an (ar9340), HT20, long GI - RSSI's -70 / -71 - Real distance: 23910 meter Results (60s iperf runs): Fixed coverage class 54 (up to 24300m): * 21.5 Mbits/sec Dynack: * 28.9 Mbits/sec Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Diffstat (limited to 'package/kernel/mac80211/patches/ath/554-ath9k-dynack-move-debug-log-after-buffer-increments.patch')
-rw-r--r--package/kernel/mac80211/patches/ath/554-ath9k-dynack-move-debug-log-after-buffer-increments.patch88
1 files changed, 88 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/ath/554-ath9k-dynack-move-debug-log-after-buffer-increments.patch b/package/kernel/mac80211/patches/ath/554-ath9k-dynack-move-debug-log-after-buffer-increments.patch
new file mode 100644
index 0000000000..a1d612660b
--- /dev/null
+++ b/package/kernel/mac80211/patches/ath/554-ath9k-dynack-move-debug-log-after-buffer-increments.patch
@@ -0,0 +1,88 @@
+From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
+Date: Fri, 2 Nov 2018 21:49:56 +0100
+Subject: [PATCH] ath9k: dynack: move debug log after buffer increments
+
+Move debug log in ath_dynack_sample_tx_ts and ath_dynack_sample_ack_ts
+after timestamp buffer head/tail increments in order to make debugging
+more user friendly
+
+Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
+Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
+---
+
+--- a/drivers/net/wireless/ath/ath9k/dynack.c
++++ b/drivers/net/wireless/ath/ath9k/dynack.c
+@@ -171,11 +171,12 @@ static void ath_dynack_compute_to(struct
+ void ath_dynack_sample_tx_ts(struct ath_hw *ah, struct sk_buff *skb,
+ struct ath_tx_status *ts)
+ {
+- u8 ridx;
+ struct ieee80211_hdr *hdr;
+ struct ath_dynack *da = &ah->dynack;
+ struct ath_common *common = ath9k_hw_common(ah);
+ struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
++ u32 dur = ts->duration;
++ u8 ridx;
+
+ if ((info->flags & IEEE80211_TX_CTL_NO_ACK) || !da->enabled)
+ return;
+@@ -203,14 +204,13 @@ void ath_dynack_sample_tx_ts(struct ath_
+ ridx = ts->ts_rateindex;
+
+ da->st_rbf.ts[da->st_rbf.t_rb].tstamp = ts->ts_tstamp;
+- da->st_rbf.ts[da->st_rbf.t_rb].dur = ts->duration;
+ ether_addr_copy(da->st_rbf.addr[da->st_rbf.t_rb].h_dest, hdr->addr1);
+ ether_addr_copy(da->st_rbf.addr[da->st_rbf.t_rb].h_src, hdr->addr2);
+
+ if (!(info->status.rates[ridx].flags & IEEE80211_TX_RC_MCS)) {
+- u32 phy, sifs;
+ const struct ieee80211_rate *rate;
+ struct ieee80211_tx_rate *rates = info->status.rates;
++ u32 phy;
+
+ rate = &common->sbands[info->band].bitrates[rates[ridx].idx];
+ if (info->band == NL80211_BAND_2GHZ &&
+@@ -219,19 +219,18 @@ void ath_dynack_sample_tx_ts(struct ath_
+ else
+ phy = WLAN_RC_PHY_OFDM;
+
+- sifs = ath_dynack_get_sifs(ah, phy);
+- da->st_rbf.ts[da->st_rbf.t_rb].dur -= sifs;
++ dur -= ath_dynack_get_sifs(ah, phy);
+ }
+-
+- ath_dbg(common, DYNACK, "{%pM} tx sample %u [dur %u][h %u-t %u]\n",
+- hdr->addr1, da->st_rbf.ts[da->st_rbf.t_rb].tstamp,
+- da->st_rbf.ts[da->st_rbf.t_rb].dur, da->st_rbf.h_rb,
+- (da->st_rbf.t_rb + 1) % ATH_DYN_BUF);
++ da->st_rbf.ts[da->st_rbf.t_rb].dur = dur;
+
+ INCR(da->st_rbf.t_rb, ATH_DYN_BUF);
+ if (da->st_rbf.t_rb == da->st_rbf.h_rb)
+ INCR(da->st_rbf.h_rb, ATH_DYN_BUF);
+
++ ath_dbg(common, DYNACK, "{%pM} tx sample %u [dur %u][h %u-t %u]\n",
++ hdr->addr1, ts->ts_tstamp, dur, da->st_rbf.h_rb,
++ da->st_rbf.t_rb);
++
+ ath_dynack_compute_to(ah);
+
+ spin_unlock_bh(&da->qlock);
+@@ -258,14 +257,13 @@ void ath_dynack_sample_ack_ts(struct ath
+ spin_lock_bh(&da->qlock);
+ da->ack_rbf.tstamp[da->ack_rbf.t_rb] = ts;
+
+- ath_dbg(common, DYNACK, "rx sample %u [h %u-t %u]\n",
+- da->ack_rbf.tstamp[da->ack_rbf.t_rb],
+- da->ack_rbf.h_rb, (da->ack_rbf.t_rb + 1) % ATH_DYN_BUF);
+-
+ INCR(da->ack_rbf.t_rb, ATH_DYN_BUF);
+ if (da->ack_rbf.t_rb == da->ack_rbf.h_rb)
+ INCR(da->ack_rbf.h_rb, ATH_DYN_BUF);
+
++ ath_dbg(common, DYNACK, "rx sample %u [h %u-t %u]\n",
++ ts, da->ack_rbf.h_rb, da->ack_rbf.t_rb);
++
+ ath_dynack_compute_to(ah);
+
+ spin_unlock_bh(&da->qlock);