summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2014-10-22 23:23:03 +0400
committerJohannes Berg <johannes.berg@intel.com>2014-10-27 10:48:32 +0300
commite27513fbd030d8558cfa9250bd62b2baf19dc114 (patch)
tree5f114b276c6223e2c2245c9ee6dab00bb76bae30 /net
parent5cd8926bbf47ee0eb51a266bd9614dd3f93c004f (diff)
downloadlinux-e27513fbd030d8558cfa9250bd62b2baf19dc114.tar.xz
mac80211: support creating wiphy w/out creating wlanX
This will be helpful when using the mac80211_hwsim wiphys and automated testing. Let user create the vifs as needed, and named as expected. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index b189122d4b20..7d40e3f0a77b 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_VIF)) {
result = ieee80211_if_add(local, "wlan%d", NULL,
NL80211_IFTYPE_STATION, NULL);
if (result)