mac80211: minstrel, fix memory corruption
commit5a28cafbab1d07e4161f00678b6a45620a2c2e4f
authorJiri Slaby <jirislaby@gmail.com>
Mon, 4 May 2009 16:04:55 +0000 (4 18:04 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 15 Jun 2009 16:40:12 +0000 (15 09:40 -0700)
treef445a3e6cd7856e118e2d78a0e32487a9ad17390
parent485e8e39a85e8178978252cd17f218e6787851ee
mac80211: minstrel, fix memory corruption

commit 8e532175277d9a5eae49768ed086555081f741a7 upstream.

minstrel doesn't count max rate count in fact, since it doesn't use
a loop variable `i' and hence allocs space only for bitrates found in
the first band.

Fix it by involving the `i' as an index so that it traverses all the
bands now and finds the real max bitrate count.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/mac80211/rc80211_minstrel.c