linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: greearb@candelatech.com
To: linux-wireless@vger.kernel.org
Cc: johannes@sipsolutions.net, Ben Greear <greearb@candelatech.com>
Subject: [PATCH v2 4/6] cfg80211: support creating wiphy w/out creating wlanX.
Date: Mon, 20 Oct 2014 15:49:36 -0700	[thread overview]
Message-ID: <1413845378-27837-4-git-send-email-greearb@candelatech.com> (raw)
In-Reply-To: <1413845378-27837-1-git-send-email-greearb@candelatech.com>

From: Ben Greear <greearb@candelatech.com>

This will be helpful when using the mac80211_hwsim
wiphys and automated testing.  Let user create the
wlan devs as needed, and named as expected.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
 include/net/mac80211.h | 7 ++++++-
 net/mac80211/main.c    | 3 ++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index a206a56..a5236d2 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1579,6 +1579,10 @@ struct ieee80211_tx_control {
  *	a virtual monitor interface when monitor interfaces are the only
  *	active interfaces.
  *
+ * @IEEE80211_HW_NO_AUTO_VDEV: The driver would like for no wlanX to
+ *	be created.  It is expected user-space will create vdevs as
+ *      desired (and thus have them named as desired).
+ *
  * @IEEE80211_HW_QUEUE_CONTROL: The driver wants to control per-interface
  *	queue mapping in order to use different queues (not just one per AC)
  *	for different virtual interfaces. See the doc section on HW queue
@@ -1625,7 +1629,8 @@ enum ieee80211_hw_flags {
 	IEEE80211_HW_SUPPORTS_DYNAMIC_PS		= 1<<12,
 	IEEE80211_HW_MFP_CAPABLE			= 1<<13,
 	IEEE80211_HW_WANT_MONITOR_VIF			= 1<<14,
-	/* free slots */
+	IEEE80211_HW_NO_AUTO_VDEV			= 1<<15,
+	/* free slot */
 	IEEE80211_HW_SUPPORTS_UAPSD			= 1<<17,
 	IEEE80211_HW_REPORTS_TX_ACK_STATUS		= 1<<18,
 	IEEE80211_HW_CONNECTION_MONITOR			= 1<<19,
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index b189122..830bfec 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -1023,7 +1023,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
 	}
 
 	/* add one default STA interface if supported */
-	if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_STATION)) {
+	if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_STATION) &&
+	    !(hw->flags & IEEE80211_HW_NO_AUTO_VDEV)) {
 		result = ieee80211_if_add(local, "wlan%d", NULL,
 					  NL80211_IFTYPE_STATION, NULL);
 		if (result)
-- 
1.7.11.7


  parent reply	other threads:[~2014-10-20 22:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-20 22:49 [PATCH v2 1/6] cfg80211: support creating wiphy with suggested name greearb
2014-10-20 22:49 ` [PATCH v2 2/6] mac80211: allow creating wiphy devices " greearb
2014-10-21 19:34   ` Johannes Berg
2014-10-20 22:49 ` [PATCH v2 3/6] mac80211-hwsim: support creating radios with specific name greearb
2014-10-21 19:35   ` Johannes Berg
2014-10-20 22:49 ` greearb [this message]
2014-10-21 19:38   ` [PATCH v2 4/6] cfg80211: support creating wiphy w/out creating wlanX Johannes Berg
2014-10-20 22:49 ` [PATCH v2 5/6] mac80211-hwsim: " greearb
2014-10-21 19:39   ` Johannes Berg
2014-10-20 22:49 ` [PATCH v2 6/6] cfg80211: support configuring vdev mac addr on create greearb
2014-10-21 19:42   ` Johannes Berg
2014-10-21 19:31 ` [PATCH v2 1/6] cfg80211: support creating wiphy with suggested name Johannes Berg
2014-10-21 20:10   ` Ben Greear
2014-10-22 16:07     ` Ben Greear

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=1413845378-27837-4-git-send-email-greearb@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).