Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] mac80211: fix ifmodes check
Date: Thu, 11 Dec 2008 09:30:46 +0100	[thread overview]
Message-ID: <1228984246.15837.80.camel@johannes.berg> (raw)

In "mac80211: only create default STA interface if supported",
I tried to make sure a driver supported STA mode before adding
the default virtual interface. That had a stupid bug though
which Larry found: I didn't use BIT().

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
---
 net/mac80211/main.c |    2 +-
 1 filechanged, 1 insertion(+), 1 deletion(-)
	 
--- everything.orig/net/mac80211/main.c	2008-12-11 09:27:30.000000000 +0100
+++ everything/net/mac80211/main.c	2008-12-11 09:27:39.000000000 +0100
@@ -887,7 +887,7 @@ int ieee80211_register_hw(struct ieee802
 	local->mdev->select_queue = ieee80211_select_queue;
 
 	/* add one default STA interface if supported */
-	if (local->hw.wiphy->interface_modes & NL80211_IFTYPE_STATION) {
+	if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_STATION)) {
 		result = ieee80211_if_add(local, "wlan%d", NULL,
 					  NL80211_IFTYPE_STATION, NULL);
 		if (result)



                 reply	other threads:[~2008-12-11  8:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1228984246.15837.80.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=Larry.Finger@lwfinger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox