Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39ec2997 authored by Vasanthakumar Thiagarajan's avatar Vasanthakumar Thiagarajan Committed by John W. Linville
Browse files

ath9k: Fix bug in delimiter padding computation



There is a roundng error in delimiter padding computation
which causes severe throughput drop with some of AR9003.

signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
Signed-off-by: default avatarVasanthakumar Thiagarajan <vasanth@atheros.com>
Cc:stable@kernel.org
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent bc206802
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -177,8 +177,8 @@ void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd,


/* returns delimiter padding required given the packet length */
/* returns delimiter padding required given the packet length */
#define ATH_AGGR_GET_NDELIM(_len)					\
#define ATH_AGGR_GET_NDELIM(_len)					\
	(((((_len) + ATH_AGGR_DELIM_SZ) < ATH_AGGR_MINPLEN) ?           \
       (((_len) >= ATH_AGGR_MINPLEN) ? 0 :                             \
	  (ATH_AGGR_MINPLEN - (_len) - ATH_AGGR_DELIM_SZ) : 0) >> 2)
        DIV_ROUND_UP(ATH_AGGR_MINPLEN - (_len), ATH_AGGR_DELIM_SZ))


#define BAW_WITHIN(_start, _bawsz, _seqno) \
#define BAW_WITHIN(_start, _bawsz, _seqno) \
	((((_seqno) - (_start)) & 4095) < (_bawsz))
	((((_seqno) - (_start)) & 4095) < (_bawsz))