mac80211: fix scan band off-by-one error
authorJohannes Berg <johannes@sipsolutions.net>
Mon, 28 Jan 2008 16:08:56 +0000 (17:08 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 29 Feb 2008 20:19:32 +0000 (15:19 -0500)
When checking for the next band to advance to, there
was an off-by-one error that could lead to an access
to an invalid array index. Additionally, the later
check for scan_band >= IEEE80211_NUM_BANDS is not
required since that will never be true.

This also improves the comments related to that code.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

No differences found