Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] ath9k: fix checks for first subframe delimiter padding
@ 2011-08-29 10:51 Felix Fietkau
  2011-08-29 11:04 ` Vasanthakumar Thiagarajan
  0 siblings, 1 reply; 3+ messages in thread
From: Felix Fietkau @ 2011-08-29 10:51 UTC (permalink / raw)
  To: linux-wireless; +Cc: linville, mcgrof, Rajkumar Manoharan

The commit "ath9k_hw: Fix exceed transmission burst-time of 5GHz" added
a padding of 60 delimiters on the first subframe to work around an issue
on AR9380, but it lacked the checks to prevent it from being applied to
pre-AR9380, enterprise AR9380 or AR9580+

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/reg.h  |    1 +
 drivers/net/wireless/ath/ath9k/xmit.c |    4 +++-
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h
index a3b8bbc..989514a 100644
--- a/drivers/net/wireless/ath/ath9k/reg.h
+++ b/drivers/net/wireless/ath/ath9k/reg.h
@@ -1131,6 +1131,7 @@ enum {
 #define AR_INTR_PRIO_ASYNC_ENABLE (AR_SREV_9340(ah) ? 0x4094 : 0x40d4)
 #define AR_ENT_OTP		  0x40d8
 #define AR_ENT_OTP_CHAIN2_DISABLE               0x00020000
+#define AR_ENT_OTP_MIN_PKT_SIZE_DISABLE		0x00800000
 #define AR_ENT_OTP_MPSD		0x00800000
 
 #define AR_CH0_BB_DPLL1		 0x16180
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 5e29829..ad3fcd2 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -692,7 +692,9 @@ static int ath_compute_num_delims(struct ath_softc *sc, struct ath_atx_tid *tid,
 	 * Add delimiter when using RTS/CTS with aggregation
 	 * and non enterprise AR9003 card
 	 */
-	if (first_subfrm)
+	if (first_subfrm && (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) &&
+	    !AR_SREV_9580_10_OR_LATER(sc->sc_ah) &&
+	    (sc->sc_ah->ent_mode & AR_ENT_OTP_MIN_PKT_SIZE_DISABLE))
 		ndelim = max(ndelim, FIRST_DESC_NDELIMS);
 
 	/*
-- 
1.7.3.2


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

* Re: [PATCH] ath9k: fix checks for first subframe delimiter padding
  2011-08-29 10:51 [PATCH] ath9k: fix checks for first subframe delimiter padding Felix Fietkau
@ 2011-08-29 11:04 ` Vasanthakumar Thiagarajan
  2011-08-29 11:11   ` Vasanthakumar Thiagarajan
  0 siblings, 1 reply; 3+ messages in thread
From: Vasanthakumar Thiagarajan @ 2011-08-29 11:04 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: linux-wireless, linville, rodrigue, Rajkumar Manoharan

On Mon, Aug 29, 2011 at 12:51:01PM +0200, Felix Fietkau wrote:
> The commit "ath9k_hw: Fix exceed transmission burst-time of 5GHz" added
> a padding of 60 delimiters on the first subframe to work around an issue
> on AR9380, but it lacked the checks to prevent it from being applied to
> pre-AR9380, enterprise AR9380 or AR9580+
> 
> Signed-off-by: Felix Fietkau <nbd@openwrt.org>
> Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
> ---
>  drivers/net/wireless/ath/ath9k/reg.h  |    1 +
>  drivers/net/wireless/ath/ath9k/xmit.c |    4 +++-
>  2 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h
> index a3b8bbc..989514a 100644
> --- a/drivers/net/wireless/ath/ath9k/reg.h
> +++ b/drivers/net/wireless/ath/ath9k/reg.h
> @@ -1131,6 +1131,7 @@ enum {
>  #define AR_INTR_PRIO_ASYNC_ENABLE (AR_SREV_9340(ah) ? 0x4094 : 0x40d4)
>  #define AR_ENT_OTP		  0x40d8
>  #define AR_ENT_OTP_CHAIN2_DISABLE               0x00020000
> +#define AR_ENT_OTP_MIN_PKT_SIZE_DISABLE		0x00800000
>  #define AR_ENT_OTP_MPSD		0x00800000

Looks like AR_ENT_OTP_MPSD was defined for this purpose,
unfortunately it so difficult to understand anything from this
macro. Can you also this redundant definition?

Vasanth

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

* Re: [PATCH] ath9k: fix checks for first subframe delimiter padding
  2011-08-29 11:04 ` Vasanthakumar Thiagarajan
@ 2011-08-29 11:11   ` Vasanthakumar Thiagarajan
  0 siblings, 0 replies; 3+ messages in thread
From: Vasanthakumar Thiagarajan @ 2011-08-29 11:11 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: linux-wireless, linville, rodrigue, Rajkumar Manoharan

On Mon, Aug 29, 2011 at 04:34:28PM +0530, Vasanthakumar Thiagarajan wrote:
> On Mon, Aug 29, 2011 at 12:51:01PM +0200, Felix Fietkau wrote:
> > The commit "ath9k_hw: Fix exceed transmission burst-time of 5GHz" added
> > a padding of 60 delimiters on the first subframe to work around an issue
> > on AR9380, but it lacked the checks to prevent it from being applied to
> > pre-AR9380, enterprise AR9380 or AR9580+
> > 
> > Signed-off-by: Felix Fietkau <nbd@openwrt.org>
> > Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
> > ---
> >  drivers/net/wireless/ath/ath9k/reg.h  |    1 +
> >  drivers/net/wireless/ath/ath9k/xmit.c |    4 +++-
> >  2 files changed, 4 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h
> > index a3b8bbc..989514a 100644
> > --- a/drivers/net/wireless/ath/ath9k/reg.h
> > +++ b/drivers/net/wireless/ath/ath9k/reg.h
> > @@ -1131,6 +1131,7 @@ enum {
> >  #define AR_INTR_PRIO_ASYNC_ENABLE (AR_SREV_9340(ah) ? 0x4094 : 0x40d4)
> >  #define AR_ENT_OTP		  0x40d8
> >  #define AR_ENT_OTP_CHAIN2_DISABLE               0x00020000
> > +#define AR_ENT_OTP_MIN_PKT_SIZE_DISABLE		0x00800000
> >  #define AR_ENT_OTP_MPSD		0x00800000
> 
> Looks like AR_ENT_OTP_MPSD was defined for this purpose,
> unfortunately it so difficult to understand anything from this
> macro. Can you also this redundant definition?

I mean, Can you also remove this redundant definition?, thanks.

Vasanth

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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-29 10:51 [PATCH] ath9k: fix checks for first subframe delimiter padding Felix Fietkau
2011-08-29 11:04 ` Vasanthakumar Thiagarajan
2011-08-29 11:11   ` Vasanthakumar Thiagarajan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox