ath9k: fix ready time of the multicast buffer queue
authorFelix Fietkau <nbd@openwrt.org>
Sun, 9 Mar 2014 10:02:54 +0000 (11:02 +0100)
committerJiri Slaby <jslaby@suse.cz>
Thu, 15 May 2014 07:56:06 +0000 (09:56 +0200)
commit 3b3e0efb5c72c4fc940af50b33626b8a78a907dc upstream.

qi->tqi_readyTime is written directly to registers that expect
microseconds as unit instead of TU.
When setting the CABQ ready time, cur_conf->beacon_interval is in TU, so
convert it to microseconds before passing it to ath9k_hw.

This should hopefully fix some Tx DMA issues with buffered multicast
frames in AP mode.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/net/wireless/ath/ath9k/xmit.c

index ba39178a94abfaf2fbd4d9699ede2c4ab6ad9a72..00e3f49fcf9b97604efb78b449d654689a52ae55 100644 (file)
@@ -1718,7 +1718,7 @@ int ath_cabq_update(struct ath_softc *sc)
        else if (sc->config.cabqReadytime > ATH9K_READY_TIME_HI_BOUND)
                sc->config.cabqReadytime = ATH9K_READY_TIME_HI_BOUND;
 
-       qi.tqi_readyTime = (cur_conf->beacon_interval *
+       qi.tqi_readyTime = (TU_TO_USEC(cur_conf->beacon_interval) *
                            sc->config.cabqReadytime) / 100;
        ath_txq_update(sc, qnum, &qi);