diff options
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r-- | net/mac80211/main.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index df7e9a810b88..6d8710327d14 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -886,12 +886,14 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) | |||
886 | 886 | ||
887 | local->mdev->select_queue = ieee80211_select_queue; | 887 | local->mdev->select_queue = ieee80211_select_queue; |
888 | 888 | ||
889 | /* add one default STA interface */ | 889 | /* add one default STA interface if supported */ |
890 | result = ieee80211_if_add(local, "wlan%d", NULL, | 890 | if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_STATION)) { |
891 | NL80211_IFTYPE_STATION, NULL); | 891 | result = ieee80211_if_add(local, "wlan%d", NULL, |
892 | if (result) | 892 | NL80211_IFTYPE_STATION, NULL); |
893 | printk(KERN_WARNING "%s: Failed to add default virtual iface\n", | 893 | if (result) |
894 | wiphy_name(local->hw.wiphy)); | 894 | printk(KERN_WARNING "%s: Failed to add default virtual iface\n", |
895 | wiphy_name(local->hw.wiphy)); | ||
896 | } | ||
895 | 897 | ||
896 | rtnl_unlock(); | 898 | rtnl_unlock(); |
897 | 899 | ||