All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] wireless: Fix WARN_ON() with ieee802.11b
@ 2008-02-02 22:53 Ivo van Doorn
  2008-02-03  1:39 ` Nick Kossifidis
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ivo van Doorn @ 2008-02-02 22:53 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, Johannes Berg

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>

---
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 0dcccbf..5304c62 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -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);

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-02-03 12:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-02 22:53 [PATCH] wireless: Fix WARN_ON() with ieee802.11b Ivo van Doorn
2008-02-03  1:39 ` Nick Kossifidis
2008-02-03 10:21 ` Johannes Berg
2008-02-03 11:21   ` Ivo van Doorn
2008-02-03 12:38     ` Johannes Berg
2008-02-03 12:42 ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.