]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/mac80211/mesh_hwmp.c
fastboot: make the raid autodetect code wait for all devices to init
[karo-tx-linux.git] / net / mac80211 / mesh_hwmp.c
index 15a5c99270a815149311931e11077ffdc1a702bc..501c7831adb4469627c8b7cd0a8c3b067478ff3b 100644 (file)
@@ -223,7 +223,7 @@ static u32 airtime_link_metric_get(struct ieee80211_local *local,
        /* 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->txrate_idx].bitrate;
+       rate = sband->bitrates[sta->last_txrate_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) ;