mac80211: pid, fix memory corruption
authorJiri Slaby <jirislaby@gmail.com>
Mon, 4 May 2009 16:10:28 +0000 (18:10 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 4 May 2009 20:22:16 +0000 (16:22 -0400)
commit6909268dc93ae4b0b8e1ebb4b2fa70b1a47dd347
treed4410166db411f73939560f9cd9e1b7bdeae09c1
parent8e532175277d9a5eae49768ed086555081f741a7
mac80211: pid, fix memory corruption

pid doesn't count with some band having more bitrates than the one
associated the first time.
Fix that by counting the maximal available bitrate count and allocate
big enough space.

Secondly, fix touching uninitialized memory which causes panics.
Index sucked from this random memory points to the hell.
The fix is to sort the rates on each band change.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/rc80211_pid_algo.c