From 779b89c7577de4d7615e2975341fc8ffc580ca09 Mon Sep 17 00:00:00 2001 From: Koen Vandeputte Date: Mon, 5 Nov 2018 11:31:12 +0100 Subject: 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 --- ...k-use-authentication-messages-for-late-ac.patch | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 package/kernel/mac80211/patches/552-ath9k-dynack-use-authentication-messages-for-late-ac.patch (limited to 'package/kernel/mac80211/patches/552-ath9k-dynack-use-authentication-messages-for-late-ac.patch') diff --git a/package/kernel/mac80211/patches/552-ath9k-dynack-use-authentication-messages-for-late-ac.patch b/package/kernel/mac80211/patches/552-ath9k-dynack-use-authentication-messages-for-late-ac.patch new file mode 100644 index 0000000000..831c534762 --- /dev/null +++ b/package/kernel/mac80211/patches/552-ath9k-dynack-use-authentication-messages-for-late-ac.patch @@ -0,0 +1,27 @@ +From: Lorenzo Bianconi +Date: Fri, 2 Nov 2018 21:49:55 +0100 +Subject: [PATCH] ath9k: dynack: use authentication messages for 'late' ack + +In order to properly support dynack in ad-hoc mode running +wpa_supplicant, take into account authentication frames for +'late ack' detection. This patch has been tested on devices +mounted on offshore high-voltage stations connected through +~24Km link + +Reported-by: Koen Vandeputte +Tested-by: Koen Vandeputte +Signed-off-by: Lorenzo Bianconi +--- + +--- a/drivers/net/wireless/ath/ath9k/dynack.c ++++ b/drivers/net/wireless/ath/ath9k/dynack.c +@@ -187,7 +187,8 @@ void ath_dynack_sample_tx_ts(struct ath_ + /* late ACK */ + if (ts->ts_status & ATH9K_TXERR_XRETRY) { + if (ieee80211_is_assoc_req(hdr->frame_control) || +- ieee80211_is_assoc_resp(hdr->frame_control)) { ++ ieee80211_is_assoc_resp(hdr->frame_control) || ++ ieee80211_is_auth(hdr->frame_control)) { + ath_dbg(common, DYNACK, "late ack\n"); + ath9k_hw_setslottime(ah, (LATEACK_TO - 3) / 2); + ath9k_hw_set_ack_timeout(ah, LATEACK_TO); -- cgit v1.2.3