Skip to content

Commit

Permalink
Merge tag 'mac80211-for-davem-2015-08-14' of git://git.kernel.org/pub…
Browse files Browse the repository at this point in the history
…/scm/linux/kernel/git/jberg/mac80211

Johannes Berg says:

====================
We have a single bugfix for an invalid memory read.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Aug 17, 2015
2 parents 2902bc6 + f5eeb5f commit a27cc68
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions net/mac80211/rc80211_minstrel.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,15 @@ int minstrel_get_tp_avg(struct minstrel_rate *mr, int prob_ewma)
static inline void
minstrel_sort_best_tp_rates(struct minstrel_sta_info *mi, int i, u8 *tp_list)
{
int j = MAX_THR_RATES;
struct minstrel_rate_stats *tmp_mrs = &mi->r[j - 1].stats;
int j;
struct minstrel_rate_stats *tmp_mrs;
struct minstrel_rate_stats *cur_mrs = &mi->r[i].stats;

while (j > 0 && (minstrel_get_tp_avg(&mi->r[i], cur_mrs->prob_ewma) >
minstrel_get_tp_avg(&mi->r[tp_list[j - 1]], tmp_mrs->prob_ewma))) {
j--;
for (j = MAX_THR_RATES; j > 0; --j) {
tmp_mrs = &mi->r[tp_list[j - 1]].stats;
if (minstrel_get_tp_avg(&mi->r[i], cur_mrs->prob_ewma) <=
minstrel_get_tp_avg(&mi->r[tp_list[j - 1]], tmp_mrs->prob_ewma))
break;
}

if (j < MAX_THR_RATES - 1)
Expand Down

0 comments on commit a27cc68

Please sign in to comment.