All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath9k_hw: do not apply the 2.4 ghz ack timeout workaround to cts
@ 2011-08-27 23:52 Felix Fietkau
  2011-08-29  5:26 ` Rajkumar Manoharan
  0 siblings, 1 reply; 2+ messages in thread
From: Felix Fietkau @ 2011-08-27 23:52 UTC (permalink / raw)
  To: linux-wireless; +Cc: linville, rmanohar, mcgrof

It is only used to workaround interoperability issues related to longer
delays in receiving the block ack, so it is not necessary to apply it
to the CTS exchange.
Should improve throughput slightly, especially when there are lots
of retransmissions.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
 drivers/net/wireless/ath/ath9k/hw.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index a0d1147..3ccadeb 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -960,7 +960,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;
+	int acktimeout, ctstimeout;
 	int slottime;
 	int sifstime;
 	int rx_lat = 0, tx_lat = 0, eifs = 0;
@@ -1011,6 +1011,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;
+	ctstimeout = acktimeout;
 
 	/*
 	 * Workaround for early ACK timeouts, add an offset to match the
@@ -1025,7 +1026,7 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah)
 	ath9k_hw_set_sifs_time(ah, sifstime);
 	ath9k_hw_setslottime(ah, slottime);
 	ath9k_hw_set_ack_timeout(ah, acktimeout);
-	ath9k_hw_set_cts_timeout(ah, acktimeout);
+	ath9k_hw_set_cts_timeout(ah, ctstimeout);
 	if (ah->globaltxtimeout != (u32) -1)
 		ath9k_hw_set_global_txtimeout(ah, ah->globaltxtimeout);
 
-- 
1.7.3.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ath9k_hw: do not apply the 2.4 ghz ack timeout workaround to cts
  2011-08-27 23:52 [PATCH] ath9k_hw: do not apply the 2.4 ghz ack timeout workaround to cts Felix Fietkau
@ 2011-08-29  5:26 ` Rajkumar Manoharan
  0 siblings, 0 replies; 2+ messages in thread
From: Rajkumar Manoharan @ 2011-08-29  5:26 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: linux-wireless, linville, rodrigue

On Sun, Aug 28, 2011 at 01:52:10AM +0200, Felix Fietkau wrote:
> It is only used to workaround interoperability issues related to longer
> delays in receiving the block ack, so it is not necessary to apply it
> to the CTS exchange.
> Should improve throughput slightly, especially when there are lots
> of retransmissions.
> 
> Signed-off-by: Felix Fietkau <nbd@openwrt.org>
> ---
>  drivers/net/wireless/ath/ath9k/hw.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
> index a0d1147..3ccadeb 100644
> --- a/drivers/net/wireless/ath/ath9k/hw.c
> +++ b/drivers/net/wireless/ath/ath9k/hw.c
> @@ -960,7 +960,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;
> +	int acktimeout, ctstimeout;
>  	int slottime;
>  	int sifstime;
>  	int rx_lat = 0, tx_lat = 0, eifs = 0;
> @@ -1011,6 +1011,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;
> +	ctstimeout = acktimeout;
>  
>  	/*
>  	 * Workaround for early ACK timeouts, add an offset to match the
> @@ -1025,7 +1026,7 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah)
>  	ath9k_hw_set_sifs_time(ah, sifstime);
>  	ath9k_hw_setslottime(ah, slottime);
>  	ath9k_hw_set_ack_timeout(ah, acktimeout);
> -	ath9k_hw_set_cts_timeout(ah, acktimeout);
> +	ath9k_hw_set_cts_timeout(ah, ctstimeout);
>  	if (ah->globaltxtimeout != (u32) -1)
>  		ath9k_hw_set_global_txtimeout(ah, ah->globaltxtimeout);
>  
the cts timeout calculation does not include start delay factor.
And also it is always lesser than the INI values. Decreasing CTS timeout could
affect performance in congested network.

--
Rajkumar

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-29  5:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-27 23:52 [PATCH] ath9k_hw: do not apply the 2.4 ghz ack timeout workaround to cts Felix Fietkau
2011-08-29  5:26 ` Rajkumar Manoharan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.