]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
rndis_wlan: use ARRAY_SIZE instead of sizeof when adding 11g rates
authorScott Ashcroft <scott.ashcroft@talk21.com>
Tue, 27 May 2008 08:15:02 +0000 (11:15 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 3 Jun 2008 19:00:16 +0000 (15:00 -0400)
commit20ad4fd56255b455beb677dc097eb108d15f1d63
tree52618a2c7b0948c631cd30f55a8bdfb616f86f2a
parenta888d52d1eda77f08e09d38ac829353200240716
rndis_wlan: use ARRAY_SIZE instead of sizeof when adding 11g rates

While figuring out the TKIP problem I found a bug in the code which adds the 11g
rates. It's using sizeof instead of ARRAY_SIZE to terminate the for loop. This makes
it fall off the end of the rates array start into the frequency array instead. Running
"iwlist rate" should show the problem as there will always be 32 rates with the last
few being bogus.

The following patch will fix it.

Signed-off-by: Scott Ashcroft <scott.ashcroft@talk21.com>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rndis_wlan.c