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

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
...@@ -177,8 +177,8 @@ void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd, ...@@ -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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment