]> err.no Git - linux-2.6/commitdiff
wireless: Fix WARN_ON() with ieee802.11b
authorIvo van Doorn <ivdoorn@gmail.com>
Sat, 2 Feb 2008 22:53:10 +0000 (23:53 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 29 Feb 2008 20:19:33 +0000 (15:19 -0500)
When the driver registers a IEEE80211_BAND_2GHZ band,
it can either be 802.11b or 802.11g. But when 802.11b rates
are registered "want" will be 3 (since 4 rates are being registered,
and each of those 4 rates will decrease "want").
Since this is a correct situation, there is no need to trigger
a WARN_ON() for this.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/wireless/util.c

index e6046901055ad4690c3736ab330271516ae8cd2c..77336c22fcf2e618a7838fd666adbe519f1708e4 100644 (file)
@@ -80,7 +80,7 @@ static void set_mandatory_flags_band(struct ieee80211_supported_band *sband,
                                sband->bitrates[i].flags |=
                                        IEEE80211_RATE_ERP_G;
                }
-               WARN_ON(want != 0 && want != 6);
+               WARN_ON(want != 0 && want != 3 && want != 6);
                break;
        case IEEE80211_NUM_BANDS:
                WARN_ON(1);