]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/mac80211/mesh_hwmp.c
wireless: move mesh config length constant
[linux-2.6-omap-h63xx.git] / net / mac80211 / mesh_hwmp.c
index 501c7831adb4469627c8b7cd0a8c3b067478ff3b..e8d573d592e709c87d0eddfed9e2f2c53774d4e3 100644 (file)
@@ -218,12 +218,16 @@ static u32 airtime_link_metric_get(struct ieee80211_local *local,
 
        if (sta->fail_avg >= 100)
                return MAX_METRIC;
+
+       if (sta->last_tx_rate.flags & IEEE80211_TX_RC_MCS)
+               return MAX_METRIC;
+
        err = (sta->fail_avg << ARITH_SHIFT) / 100;
 
        /* bitrate is in units of 100 Kbps, while we need rate in units of
         * 1Mbps. This will be corrected on tx_time computation.
         */
-       rate = sband->bitrates[sta->last_txrate_idx].bitrate;
+       rate = sband->bitrates[sta->last_tx_rate.idx].bitrate;
        tx_time = (device_constant + 10 * test_frame_len / rate);
        estimated_retx = ((1 << (2 * ARITH_SHIFT)) / (s_unit - err));
        result = (tx_time * estimated_retx) >> (2 * ARITH_SHIFT) ;