mac80211: add p2p interface

Change-Id: Id17f68b9ccae0e216dd1892a3a841c3fe2e03acd
Signed-off-by: Weiguo Hu <hwg@rock-chips.com>
This commit is contained in:
huweiguo
2018-07-26 11:32:45 +08:00
committed by Tao Huang
parent e654e0bd6a
commit 69b01aa897

View File

@@ -1083,6 +1083,15 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
"Failed to add default virtual iface\n");
}
if (local->hw.wiphy->interface_modes & (BIT(NL80211_IFTYPE_P2P_GO) |
BIT(NL80211_IFTYPE_P2P_CLIENT)) &&
!ieee80211_hw_check(hw, NO_AUTO_VIF)) {
result = ieee80211_if_add(local, "p2p%d", NET_NAME_ENUM, NULL,
NL80211_IFTYPE_STATION, NULL);
if (result)
wiphy_warn(local->hw.wiphy, "Failed to add p2p iface\n");
}
rtnl_unlock();
#ifdef CONFIG_INET