mirror of https://gitee.com/openkylin/linux.git
Here's another last minute fix, for minstrel HT crashing
depending on the value of some uninitialised stack. -----BEGIN PGP SIGNATURE----- iQIcBAABCAAGBQJUa70EAAoJEDBSmw7B7bqr40gQAMgNUKILuYTyHZaKR7teV8aG uVFzrMdmNjCZIsxAuH1X8VNOJZEAB+Ro+lTybNjC/tTPyA+Yu3lDCQjSYiE8UOFk mDrNFG0tjZHGn3axceLIhujfPqXEks/wQ98tDEJU2eMLxS0nClwyTXjhc1IxzUBO /L2HlhGWADRZ6FIV7yhRO33KN1l3Q8oxW79ybJq/5JCcclfGBt3OpYvi7AW6M4iK qfgTfS6GbpcRRc4+HVA/cgYOFaRmMI71bvqMgvh8MgmqfQeRw+WSOaUiLx795CsR OKrIQgdpVp2JHwHkFXIgBy+EBBbXtCozvxKX3u+YKPabj4GC/6dkT370nuvv9hkz IzTxt+yNBTqJawum7vM6WypgT4wCZOR0JbY0vDW5jYLJnDfGJkYFbny7WtRtCVf7 xWzIixkyWLNFs6swbRdIKoU5GNw2fNe7az4fRoUqNtZGSPHiK7oD5sEkr81hWUV5 5XsifngqekfdVvIGTckpy2SAikxgkrtHOQFIGJz+PN1CjvDT++66Opr3AHnwWeSP IAjmoVOCiyIBzXlcsZJmAfPa4Hvk+NAPRKCx6N25q/+ESpOZRARWFRV3VuPeGzQW +SiC4V9VYWHvW9VPJ37WkAFYv5tPaLLyURdU7p6MSwuc0RCPgtcvXty2QFbjQLdf k0apC9DZydQPF2kre6Pv =L2Jb -----END PGP SIGNATURE----- Merge tag 'mac80211-for-john-2014-11-18' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg <johannes@sipsolutions.net> says: "Here's another last minute fix, for minstrel HT crashing depending on the value of some uninitialised stack." Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
commit
6158fb37d1
|
@ -252,19 +252,16 @@ minstrel_ht_sort_best_tp_rates(struct minstrel_ht_sta *mi, u8 index,
|
|||
cur_thr = mi->groups[cur_group].rates[cur_idx].cur_tp;
|
||||
cur_prob = mi->groups[cur_group].rates[cur_idx].probability;
|
||||
|
||||
tmp_group = tp_list[j - 1] / MCS_GROUP_RATES;
|
||||
tmp_idx = tp_list[j - 1] % MCS_GROUP_RATES;
|
||||
tmp_thr = mi->groups[tmp_group].rates[tmp_idx].cur_tp;
|
||||
tmp_prob = mi->groups[tmp_group].rates[tmp_idx].probability;
|
||||
|
||||
while (j > 0 && (cur_thr > tmp_thr ||
|
||||
(cur_thr == tmp_thr && cur_prob > tmp_prob))) {
|
||||
j--;
|
||||
do {
|
||||
tmp_group = tp_list[j - 1] / MCS_GROUP_RATES;
|
||||
tmp_idx = tp_list[j - 1] % MCS_GROUP_RATES;
|
||||
tmp_thr = mi->groups[tmp_group].rates[tmp_idx].cur_tp;
|
||||
tmp_prob = mi->groups[tmp_group].rates[tmp_idx].probability;
|
||||
}
|
||||
if (cur_thr < tmp_thr ||
|
||||
(cur_thr == tmp_thr && cur_prob <= tmp_prob))
|
||||
break;
|
||||
j--;
|
||||
} while (j > 0);
|
||||
|
||||
if (j < MAX_THR_RATES - 1) {
|
||||
memmove(&tp_list[j + 1], &tp_list[j], (sizeof(*tp_list) *
|
||||
|
|
Loading…
Reference in New Issue