use minimal unmasked rate for multicast frames.
[open-ath9k-htc-firmware.git] / target_firmware / wlan / if_owl.c
index da65461a21dd72dbceafd7efbb62aeb8bca167ad..6dda78cef6b11c340fada4b4b900a118bed2ee50 100755 (executable)
@@ -969,9 +969,13 @@ ath_tgt_tx_send_normal(struct ath_softc_tgt *sc, struct ath_tx_buf *bf)
                                      rcs, &isProbe);
                ath_hal_memcpy(bf->bf_rcs, rcs, sizeof(rcs));
        } else {
+               struct ath_vap_target *avp;
+
+               avp = &sc->sc_vap[bf->vap_index];
+
                mrcs[1].tries = mrcs[2].tries = mrcs[3].tries = 0;
                mrcs[1].rix = mrcs[2].rix = mrcs[3].rix = 0;
-               mrcs[0].rix   = 0;
+               mrcs[0].rix = ath_get_minrateidx(sc, avp);
                mrcs[0].tries = 1;
                mrcs[0].flags = 0;
                ath_hal_memcpy(bf->bf_rcs, mrcs, sizeof(mrcs));
@@ -1023,13 +1027,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++;