iwlegacy: fix BUG_ON(info->control.rates[0].idx < 0)
authorStanislaw Gruszka <sgruszka@redhat.com>
Fri, 26 Aug 2011 15:24:59 +0000 (17:24 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 29 Aug 2011 18:26:32 +0000 (14:26 -0400)
commit7c2510120e9b43b0caf32c3786a6ab831f7d9e87
tree475d9d6ac58c645628263125b67dd9d67f2df267
parent1c1bdd324cd50ac55f7ebf95ef249d946c6e4361
iwlegacy: fix BUG_ON(info->control.rates[0].idx < 0)

When trying to connect to 5GHz we can provide negative index to
mac80211 what trigger BUG_ON. Reason of iwl-3945-rs malfunction
on 5GHz is unknown and needs further investigation. For now, to
do not trigger a bug, correct value and just print WARNING.

Address bug:
https://bugzilla.redhat.com/show_bug.cgi?id=730653

Reported-and-tested-by: Jan Teichmann <jan.teichmann@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlegacy/iwl-3945-rs.c