Merge pull request #13 from olerem/buildfixes
[open-ath9k-htc-firmware.git] / target_firmware / wlan / ratectrl_11n_ln.c
index 5e123764c4f3f8194b8df1a768c78d7236b477dc..de8655016d2761327c8b6c63b7771795d40a38a6 100755 (executable)
@@ -246,14 +246,14 @@ rcSibSetValidRates(const RATE_TABLE_11N *pRateTable,
        A_UINT8 i, j, hi = 0;
        A_UINT8 singleStream = (capflag & WLAN_RC_DS_FLAG) ? 0 : 1;
        A_UINT32 valid;
-       struct atheros_node *pSib = ATH_NODE_ATHEROS(an);
        
        /* Use intersection of working rates and valid rates */
        for (i = 0; i < pRateSet->rs_nrates; i++) {
                for (j = 0; j < pRateTable->rateCount; j++) {
                        A_UINT32 phy = pRateTable->info[j].phy;
-
 #ifdef MAGPIE_MERLIN
+                       struct atheros_node *pSib = ATH_NODE_ATHEROS(an);
+
                        if (pSib->stbc) {
                                valid = pRateTable->info[j].validSTBC;
                        } else if (singleStream) {
@@ -300,14 +300,14 @@ rcSibSetValidHtRates(const RATE_TABLE_11N *pRateTable,
        A_UINT8 i, j, hi = 0;
        A_UINT8 singleStream = (capflag & WLAN_RC_DS_FLAG) ? 0 : 1;
        A_UINT8 valid;
-       struct atheros_node *pSib = ATH_NODE_ATHEROS(an);
     
        /* Use intersection of working rates and valid rates */
        for (i = 0; i <  ((struct ieee80211_rateset *)pMcsSet)->rs_nrates; i++) {
                for (j = 0; j < pRateTable->rateCount; j++) {
                        A_UINT32 phy = pRateTable->info[j].phy;
-
 #ifdef MAGPIE_MERLIN
+                       struct atheros_node *pSib = ATH_NODE_ATHEROS(an);
+
                        if (pSib->stbc) {
                                valid = pRateTable->info[j].validSTBC;
                        } else if (singleStream) {
@@ -1161,7 +1161,7 @@ ath_rate_newstate(struct ath_softc_tgt *sc,
        struct atheros_softc *asc = (struct atheros_softc *) sc->sc_rc;
 
        asc->tx_chainmask = sc->sc_ic.ic_tx_chainmask;
-       ath_rate_newassoc(sc, ni, 1, capflag, rs);    
+       ath_rate_newassoc(sc, ATH_NODE_TARGET(ni), 1, capflag, rs);
 }
 
 static void