X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=target_firmware%2Fwlan%2Fratectrl_11n_ln.c;h=de10a2757055ccd91d232d1f1aea07560165be1c;hb=666302581d93fe7f7c5d56d1ff05c670c37077a0;hp=b3462d3da6a3d97f21a90ab47999e1f0507b99f0;hpb=44e1163a8b078272bb068b77b0144a3d47ab1320;p=open-ath9k-htc-firmware.git diff --git a/target_firmware/wlan/ratectrl_11n_ln.c b/target_firmware/wlan/ratectrl_11n_ln.c index b3462d3..de10a27 100755 --- a/target_firmware/wlan/ratectrl_11n_ln.c +++ b/target_firmware/wlan/ratectrl_11n_ln.c @@ -369,7 +369,7 @@ rcSibUpdate_ht(struct ath_softc_tgt *sc, struct ath_node_target *an, rcInitValidTxMask(pRc); for (i = 0; i < WLAN_RC_PHY_MAX; i++) { - for (j = 0; j < MAX_TX_RATE_PHY; j++) { + for (j = 0; j < MAX_TX_RATE_TBL; j++) { mPhyCtrlState.validPhyRateIndex[i][j] = 0; } mPhyCtrlState.validPhyRateCount[i] = 0; @@ -1164,33 +1164,3 @@ ath_rate_newassoc_11n(struct ath_softc_tgt *sc, struct ath_node_target *an, int rcSibUpdate_ht(sc, an, capflag, 0, rs); } } - -void ath_rate_mcs2rate(struct ath_softc_tgt *sc,a_uint8_t sgi, a_uint8_t ht40, - a_uint8_t rateCode, a_uint32_t *txrate, a_uint32_t *rxrate) -{ - int idx; - struct atheros_softc *asc = (struct atheros_softc*)sc->sc_rc; - RATE_TABLE_11N *pRateTable = (RATE_TABLE_11N *)asc->hwRateTable[sc->sc_curmode]; - a_uint32_t rateKbps = 0; - - *txrate = asc->currentTxRateKbps; - - /* look 11NA table for rateKbps*/ - for (idx = 0; idx < pRateTable->rateCount && !rateKbps; ++idx) { - if (pRateTable->info[idx].rateCode == rateCode) { - if(ht40 && sgi) { - if(pRateTable->info[idx].valid == TRUE_40 && - pRateTable->info[idx].phy == WLAN_RC_PHY_HT_40_DS_HGI) - rateKbps = pRateTable->info[idx].rateKbps; - } else if (ht40) { - if (pRateTable->info[idx].valid == TRUE_40)/* HT40 only*/ - rateKbps = pRateTable->info[idx].rateKbps; - } else { - if (pRateTable->info[idx].valid != FALSE) - rateKbps = pRateTable->info[idx].rateKbps; - } - } - } - - *rxrate = rateKbps; -}