Skip to content

Commit

Permalink
wireless: Fix WARN_ON() with ieee802.11b
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
  • Loading branch information
IvDoorn authored and linvjw committed Feb 29, 2008
1 parent 2c28b36 commit 406f238
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/wireless/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 406f238

Please sign in to comment.