Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a27cc68b authored by David S. Miller's avatar David S. Miller
Browse files

Merge tag 'mac80211-for-davem-2015-08-14' of...

Merge tag 'mac80211-for-davem-2015-08-14' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211



Johannes Berg says:

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

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 2902bc66 f5eeb5fa
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -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)