Commit e27513fb authored by Ben Greear's avatar Ben Greear Committed by Johannes Berg

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: default avatarBen Greear <greearb@candelatech.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 5cd8926b
...@@ -1583,6 +1583,10 @@ struct ieee80211_tx_control { ...@@ -1583,6 +1583,10 @@ struct ieee80211_tx_control {
* a virtual monitor interface when monitor interfaces are the only * a virtual monitor interface when monitor interfaces are the only
* active interfaces. * active interfaces.
* *
* @IEEE80211_HW_NO_AUTO_VIF: The driver would like for no wlanX to
* be created. It is expected user-space will create vifs as
* desired (and thus have them named as desired).
*
* @IEEE80211_HW_QUEUE_CONTROL: The driver wants to control per-interface * @IEEE80211_HW_QUEUE_CONTROL: The driver wants to control per-interface
* queue mapping in order to use different queues (not just one per AC) * queue mapping in order to use different queues (not just one per AC)
* for different virtual interfaces. See the doc section on HW queue * for different virtual interfaces. See the doc section on HW queue
...@@ -1629,7 +1633,8 @@ enum ieee80211_hw_flags { ...@@ -1629,7 +1633,8 @@ enum ieee80211_hw_flags {
IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<12, IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<12,
IEEE80211_HW_MFP_CAPABLE = 1<<13, IEEE80211_HW_MFP_CAPABLE = 1<<13,
IEEE80211_HW_WANT_MONITOR_VIF = 1<<14, IEEE80211_HW_WANT_MONITOR_VIF = 1<<14,
/* free slots */ IEEE80211_HW_NO_AUTO_VIF = 1<<15,
/* free slot */
IEEE80211_HW_SUPPORTS_UAPSD = 1<<17, IEEE80211_HW_SUPPORTS_UAPSD = 1<<17,
IEEE80211_HW_REPORTS_TX_ACK_STATUS = 1<<18, IEEE80211_HW_REPORTS_TX_ACK_STATUS = 1<<18,
IEEE80211_HW_CONNECTION_MONITOR = 1<<19, IEEE80211_HW_CONNECTION_MONITOR = 1<<19,
......
...@@ -1023,7 +1023,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) ...@@ -1023,7 +1023,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
} }
/* add one default STA interface if supported */ /* 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, result = ieee80211_if_add(local, "wlan%d", NULL,
NL80211_IFTYPE_STATION, NULL); NL80211_IFTYPE_STATION, NULL);
if (result) if (result)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment