From: Felix Fietkau <nbd@openwrt.org>
To: linux-wireless@vger.kernel.org
Cc: linville@tuxdriver.com, mcgrof@qca.qualcomm.com
Subject: [PATCH v2 2/8] ath9k_hw: increase ACK timeout for half/quarter channels
Date: Mon, 16 Apr 2012 23:09:19 +0200 [thread overview]
Message-ID: <1334610565-37399-2-git-send-email-nbd@openwrt.org> (raw)
In-Reply-To: <1334610565-37399-1-git-send-email-nbd@openwrt.org>
For some reason the MAC timing is a bit off when waiting for ACKs, so add
some extra delay to the ACK timeout values. Significantly reduces the
number of retransmissions in my tests.
Also disable the 2.4 GHz ACK timeout workaround in half/quarter mode, it
is not required there.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
drivers/net/wireless/ath/ath9k/hw.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 122447c..0b16e30 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -971,7 +971,7 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah)
struct ath_common *common = ath9k_hw_common(ah);
struct ieee80211_conf *conf = &common->hw->conf;
const struct ath9k_channel *chan = ah->curchan;
- int acktimeout, ctstimeout;
+ int acktimeout, ctstimeout, ack_offset = 0;
int slottime;
int sifstime;
int rx_lat = 0, tx_lat = 0, eifs = 0;
@@ -1005,6 +1005,7 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah)
tx_lat += 11;
sifstime *= 2;
+ ack_offset = 16;
slottime = 13;
} else if (IS_CHAN_QUARTER_RATE(chan)) {
eifs = 340;
@@ -1014,6 +1015,7 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah)
tx_lat += 22;
sifstime *= 4;
+ ack_offset = 32;
slottime = 21;
} else {
if (AR_SREV_9287(ah) && AR_SREV_9287_13_OR_LATER(ah)) {
@@ -1031,7 +1033,7 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah)
}
/* As defined by IEEE 802.11-2007 17.3.8.6 */
- acktimeout = slottime + sifstime + 3 * ah->coverage_class;
+ acktimeout = slottime + sifstime + 3 * ah->coverage_class + ack_offset;
ctstimeout = acktimeout;
/*
@@ -1041,7 +1043,8 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah)
* BA frames in some implementations, but it has been found to fix ACK
* timeout issues in other cases as well.
*/
- if (conf->channel && conf->channel->band == IEEE80211_BAND_2GHZ) {
+ if (conf->channel && conf->channel->band == IEEE80211_BAND_2GHZ &&
+ !IS_CHAN_HALF_RATE(chan) && !IS_CHAN_QUARTER_RATE(chan)) {
acktimeout += 64 - sifstime - ah->slottime;
ctstimeout += 48 - sifstime - ah->slottime;
}
--
1.7.3.2
next prev parent reply other threads:[~2012-04-16 21:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-16 21:09 [PATCH v2 1/8] ath9k_hw: use standard SIFS time as reference for half/quarter channels Felix Fietkau
2012-04-16 21:09 ` Felix Fietkau [this message]
2012-04-16 21:09 ` [PATCH v2 3/8] ath9k_hw: set the PHY mode for half/quarter channels on AR9003 Felix Fietkau
2012-04-16 21:09 ` [PATCH v2 4/8] ath9k_hw: increase symbol overlap window for half/quarter channels Felix Fietkau
2012-04-16 21:09 ` [PATCH v2 5/8] ath9k_hw: fix and clean up PHY activation delay Felix Fietkau
2012-04-16 21:09 ` [PATCH v2 6/8] ath9k_hw: disable Tx IQ calibration on half/quarter channels Felix Fietkau
2012-04-16 21:09 ` [PATCH v2 7/8] ath9k_hw: disable fast channel change when changing from/to half/quarter mode Felix Fietkau
2012-04-16 21:09 ` [PATCH v2 8/8] ath9k_hw: increase tx abort timeout for half/quarter channels Felix Fietkau
2012-04-17 4:01 ` [PATCH v2 7/8] ath9k_hw: disable fast channel change when changing from/to half/quarter mode Sujith Manoharan
2012-04-17 11:06 ` Felix Fietkau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1334610565-37399-2-git-send-email-nbd@openwrt.org \
--to=nbd@openwrt.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mcgrof@qca.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).