aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2014-12-08 13:58:58 -0500
committerJohn W. Linville <linville@tuxdriver.com>2014-12-08 13:58:58 -0500
commit81c412600f946fc1c8731685cb6c6fae8002043a (patch)
tree87bbdf52615ec4ee6003b69e74ea330ca1427e46 /net/mac80211
parentfc99dd0829fd4d080b78141ade9a79bcc3dcd160 (diff)
parent87141db0848aa20c43d453f5545efc8f390d4372 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/rc80211_minstrel_ht.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index b52996aca4f1..80452cfd2dc5 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -394,19 +394,16 @@ minstrel_ht_sort_best_tp_rates(struct minstrel_ht_sta *mi, u16 index,
394 cur_thr = mi->groups[cur_group].rates[cur_idx].cur_tp; 394 cur_thr = mi->groups[cur_group].rates[cur_idx].cur_tp;
395 cur_prob = mi->groups[cur_group].rates[cur_idx].probability; 395 cur_prob = mi->groups[cur_group].rates[cur_idx].probability;
396 396
397 tmp_group = tp_list[j - 1] / MCS_GROUP_RATES; 397 do {
398 tmp_idx = tp_list[j - 1] % MCS_GROUP_RATES;
399 tmp_thr = mi->groups[tmp_group].rates[tmp_idx].cur_tp;
400 tmp_prob = mi->groups[tmp_group].rates[tmp_idx].probability;
401
402 while (j > 0 && (cur_thr > tmp_thr ||
403 (cur_thr == tmp_thr && cur_prob > tmp_prob))) {
404 j--;
405 tmp_group = tp_list[j - 1] / MCS_GROUP_RATES; 398 tmp_group = tp_list[j - 1] / MCS_GROUP_RATES;
406 tmp_idx = tp_list[j - 1] % MCS_GROUP_RATES; 399 tmp_idx = tp_list[j - 1] % MCS_GROUP_RATES;
407 tmp_thr = mi->groups[tmp_group].rates[tmp_idx].cur_tp; 400 tmp_thr = mi->groups[tmp_group].rates[tmp_idx].cur_tp;
408 tmp_prob = mi->groups[tmp_group].rates[tmp_idx].probability; 401 tmp_prob = mi->groups[tmp_group].rates[tmp_idx].probability;
409 } 402 if (cur_thr < tmp_thr ||
403 (cur_thr == tmp_thr && cur_prob <= tmp_prob))
404 break;
405 j--;
406 } while (j > 0);
410 407
411 if (j < MAX_THR_RATES - 1) { 408 if (j < MAX_THR_RATES - 1) {
412 memmove(&tp_list[j + 1], &tp_list[j], (sizeof(*tp_list) * 409 memmove(&tp_list[j + 1], &tp_list[j], (sizeof(*tp_list) *