Only increment xretries statistic for unicast frames 97/head
authorFrancois Gervais <fgervais@distech-controls.com>
Wed, 21 Sep 2016 18:33:41 +0000 (14:33 -0400)
committerFrancois Gervais <fgervais@distech-controls.com>
Wed, 21 Sep 2016 20:14:41 +0000 (16:14 -0400)
It looks like the ar5416 only has the AR_ExcessiveRetries flag
to let the outside know it didn't receive an ACK.

So in case of broadcast/multicast it gets set even though it's
not "excessive retry" per se. These frames just don't
acknowledge/retry in a 802.11 transmission.

This patch makes sure broadcast/multicast transmissions won't
increment the xretries statistic.

target_firmware/wlan/if_owl.c

index 35b037c471a85667be03779cd3f724a8bcad0e1e..a25d8d316aed213e0c23ee63d3681ced7586dfe3 100755 (executable)
@@ -1026,13 +1026,15 @@ static void
 ath_update_stats(struct ath_softc_tgt *sc, struct ath_tx_buf *bf)
 {
        struct ath_tx_desc *ds = bf->bf_desc;
+       struct ieee80211_frame *wh = ATH_SKB2_WH(bf->bf_skb);
        u_int32_t sr, lr;
 
        if (ds->ds_txstat.ts_status == 0) {
                if (ds->ds_txstat.ts_rate & HAL_TXSTAT_ALTRATE)
                        sc->sc_tx_stats.ast_tx_altrate++;
        } else {
-               if (ds->ds_txstat.ts_status & HAL_TXERR_XRETRY)
+               if (ds->ds_txstat.ts_status & HAL_TXERR_XRETRY &&
+                   !IEEE80211_IS_MULTICAST(wh->i_addr1))
                        sc->sc_tx_stats.ast_tx_xretries++;
                if (ds->ds_txstat.ts_status & HAL_TXERR_FIFO)
                        sc->sc_tx_stats.ast_tx_fifoerr++;