remove ath_rate_mcs2rate
[open-ath9k-htc-firmware.git] / target_firmware / wlan / ratectrl_11n_ln.c
index 8b88f6ec84de9ed82b47d91d34c89249ce36127f..277b1843c1f669770bc1c68f96edbf7071f36620 100755 (executable)
@@ -56,8 +56,6 @@
 #include "ratectrl.h"
 #include "ratectrl11n.h"
 
-INLINE A_RSSI median(A_RSSI a, A_RSSI b, A_RSSI c);
-
 static void ath_rate_newassoc_11n(struct ath_softc_tgt *sc, struct ath_node_target *an, int isnew, 
                                  unsigned int capflag, struct ieee80211_rate *rs);
 
@@ -421,32 +419,6 @@ rcSibUpdate_ht(struct ath_softc_tgt *sc, struct ath_node_target *an,
        rcSortValidRates(pRateTable, pRc);
 }
 
-
-
-/*
- * Return the median of three numbers
- */
-INLINE A_RSSI median(A_RSSI a, A_RSSI b, A_RSSI c)
-{
-       if (a >= b) {
-               if (b >= c) {
-                       return b;
-               } else if (a > c) {
-                       return c;
-               } else {
-                       return a;
-               }
-       } else {
-               if (a >= c) {
-                       return a;
-               } else if (b >= c) {
-                       return c;
-               } else {
-                       return b;
-               }
-       }
-}
-
 static A_UINT8
 rcRateFind_ht(struct ath_softc_tgt *sc, struct atheros_node *pSib,
              const RATE_TABLE_11N *pRateTable, A_BOOL probeAllowed, A_BOOL *isProbing)
@@ -1068,12 +1040,6 @@ ath_rate_attach(struct ath_softc_tgt *sc)
        return &asc->arc;
 }
 
-void
-ath_rate_detach(struct ath_ratectrl *rc)
-{
-       adf_os_mem_free(rc);
-}
-
 void
 ath_rate_findrate(struct ath_softc_tgt *sc,
                   struct ath_node_target *an,
@@ -1198,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;
-}