提交 8dffff21 编写于 作者: J Johannes Berg 提交者: John W. Linville

mac80211: only create default STA interface if supported

Drivers will support this, obviously, but this forces them to
set it up properly.

(This includes the fix posted as "mac80211: fix ifmodes check" and
tested in wireless-testing by Hin-Tak and others. -- JWL)
Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
Reported-by: NLarry Finger <Larry.Finger@lwfinger.net>
Tested-by: NHin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 0f202aa2
......@@ -886,12 +886,14 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
local->mdev->select_queue = ieee80211_select_queue;
/* add one default STA interface */
/* add one default STA interface if supported */
if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_STATION)) {
result = ieee80211_if_add(local, "wlan%d", NULL,
NL80211_IFTYPE_STATION, NULL);
if (result)
printk(KERN_WARNING "%s: Failed to add default virtual iface\n",
wiphy_name(local->hw.wiphy));
}
rtnl_unlock();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册