static void ath_rate_tx_complete_11n(struct ath_softc_tgt *sc, struct ath_node_target *an, struct ath_tx_desc *ds, struct ath_rc_series rcs[], int nframes, int nbad) { int finalTSIdx = ds->ds_txstat.ts_rate; int tx_status = 0; if ((ds->ds_txstat.ts_status & HAL_TXERR_XRETRY) || (ds->ds_txstat.ts_status & HAL_TXERR_FIFO) || (ds->ds_txstat.ts_flags & HAL_TX_DATA_UNDERRUN) || (ds->ds_txstat.ts_flags & HAL_TX_DELIM_UNDERRUN)) { tx_status = 1; } rcUpdate_11n(sc, an, ds->ds_txstat.ts_antenna, finalTSIdx, tx_status, rcs, nframes , nbad, ds->ds_txstat.ts_longretry); }
void ath_rate_tx_complete_11n(struct ath_softc *sc, struct ath_node *an, struct ath_tx_status *ts, struct ath_rc_series rcs[], u_int8_t ac, int nframes, int nbad, int rts_retry_limit) #endif { int finalTSIdx = ts->ts_rateindex; int tx_status = 0, is_underrun = 0; struct atheros_node *oan = ATH_NODE_ATHEROS(an); struct ath_vap *avp = oan->avp->athdev_vap; #ifdef ATH_SUPPORT_TxBF if (rcs[0].flags & ATH_RC_SOUNDING_FLAG) { /* indicate sounding sent*/ ts->ts_txbfstatus |= TxBF_STATUS_Sounding_Complete; } if (oan->lastTxmcs0cnt > MCS0_80_PERCENT ){ /* clear TxBF HW status to avoid trigger sounding*/ ts->ts_txbfstatus &= ~(AR_TxBF_Valid_HW_Status); } #endif if ((avp->av_config.av_fixed_rateset != IEEE80211_FIXED_RATE_NONE) || ts->ts_status & HAL_TXERR_FILT) { return; } #ifdef ATH_CHAINMASK_SELECT if (ts->ts_rssi > 0) { ATH_RSSI_LPF(an->an_chainmask_sel.tx_avgrssi, ts->ts_rssi); } #endif /* * If underrun error is seen assume it as an excessive retry only if prefetch * trigger level have reached the max (0x3f for 5416) * Adjust the long retry as if the frame was tried ATH_11N_TXMAXTRY times. This * affects how ratectrl updates PER for the failed rate. */ if ((HAL_IS_TX_UNDERRUN(ts)) && (ath_hal_gettxtriglevel(sc->sc_ah) >= sc->sc_rc->txTrigLevelMax)) { tx_status = 1; is_underrun = 1; } if (ts->ts_status & (HAL_TXERR_XRETRY |HAL_TXERR_FIFO)) { tx_status = 1; } RcUpdate_TxBF_STATS(sc, rcs, ts); #ifdef ATH_SUPPORT_VOWEXT #if ATH_SUPPORT_IQUE oan->rcFunc[ac].rcUpdate(sc, an, ts->ts_rssi, ac, finalTSIdx, tx_status, rcs, nframes , nbad, (is_underrun) ? ATH_11N_TXMAXTRY:ts->ts_longretry, 0 , nHeadFail, nTailFail); #else rcUpdate_11n(sc, an, ts->ts_rssi , ac, finalTSIdx, tx_status, rcs, nframes , nbad, (is_underrun) ? ATH_11N_TXMAXTRY:ts->ts_longretry, 0 , nHeadFail, nTailFail); #endif #else #if ATH_SUPPORT_IQUE oan->rcFunc[ac].rcUpdate(sc, an, ts->ts_rssi, ac, finalTSIdx, tx_status, rcs, nframes , nbad, (is_underrun) ? ATH_11N_TXMAXTRY:ts->ts_longretry, 0 ); #else rcUpdate_11n(sc, an, ts->ts_rssi , ac, finalTSIdx, tx_status, rcs, nframes , nbad, (is_underrun) ? ATH_11N_TXMAXTRY:ts->ts_longretry, 0 ); #endif #ifdef ATH_SUPPORT_TxBF if (oan->txbf_sounding_request){ ts->ts_txbfstatus |= TxBF_STATUS_Sounding_Request; oan->txbf_sounding_request = 0; } else { ts->ts_txbfstatus &= ~(TxBF_STATUS_Sounding_Request); } #endif #endif }