All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ivo van Doorn <ivdoorn@gmail.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org,
	Johannes Berg <johannes@sipsolutions.net>
Subject: [PATCH] wireless: Fix WARN_ON() with ieee802.11b
Date: Sat, 2 Feb 2008 23:53:10 +0100	[thread overview]
Message-ID: <200802022353.10286.IvDoorn@gmail.com> (raw)

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);

             reply	other threads:[~2008-02-02 22:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-02 22:53 Ivo van Doorn [this message]
2008-02-03  1:39 ` [PATCH] wireless: Fix WARN_ON() with ieee802.11b 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200802022353.10286.IvDoorn@gmail.com \
    --to=ivdoorn@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.