ath9k: fix drv_tx_last_beacon on AR9003 by processing beacon tx status
authorFelix Fietkau <nbd@openwrt.org>
Mon, 27 Feb 2012 18:58:42 +0000 (19:58 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 5 Mar 2012 20:20:48 +0000 (15:20 -0500)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/beacon.c
drivers/net/wireless/ath/ath9k/xmit.c

index 6d1e465..43882f9 100644 (file)
@@ -91,7 +91,7 @@ static void ath_beacon_setup(struct ath_softc *sc, struct ath_vif *avp,
        info.txpower = MAX_RATE_POWER;
        info.keyix = ATH9K_TXKEYIX_INVALID;
        info.keytype = ATH9K_KEY_TYPE_CLEAR;
-       info.flags = ATH9K_TXDESC_NOACK;
+       info.flags = ATH9K_TXDESC_NOACK | ATH9K_TXDESC_INTREQ;
 
        info.buf_addr[0] = bf->bf_buf_addr;
        info.buf_len[0] = roundup(skb->len, 4);
index 5dd27d2..9f78501 100644 (file)
@@ -2296,9 +2296,12 @@ void ath_tx_edma_tasklet(struct ath_softc *sc)
                        break;
                }
 
-               /* Skip beacon completions */
-               if (ts.qid == sc->beacon.beaconq)
+               /* Process beacon completions separately */
+               if (ts.qid == sc->beacon.beaconq) {
+                       sc->beacon.tx_processed = true;
+                       sc->beacon.tx_last = !(ts.ts_status & ATH9K_TXERR_MASK);
                        continue;
+               }
 
                txq = &sc->tx.txq[ts.qid];