mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
net: mac80211: Added p2p0 for ap mode in softmac
Change-Id: I364d7bc0a51907c9518f83e5a49697b00ee9cc11 Signed-off-by: Yao Xiao <xiaoyao@rock-chips.com>
This commit is contained in:
@@ -1406,6 +1406,18 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
|
||||
"Failed to add default virtual iface\n");
|
||||
}
|
||||
|
||||
/* add one default AP interface if supported */
|
||||
if (local->hw.wiphy->interface_modes & (BIT(NL80211_IFTYPE_P2P_GO) |
|
||||
BIT(NL80211_IFTYPE_P2P_CLIENT)) && !ieee80211_hw_check(hw, NO_AUTO_VIF)) {
|
||||
struct vif_params params = {0};
|
||||
|
||||
result = ieee80211_if_add(local, "p2p%d", NET_NAME_ENUM, NULL,
|
||||
NL80211_IFTYPE_STATION, ¶ms);
|
||||
if (result)
|
||||
wiphy_warn(local->hw.wiphy,
|
||||
"Failed to add p2p virtual iface\n");
|
||||
}
|
||||
|
||||
wiphy_unlock(hw->wiphy);
|
||||
rtnl_unlock();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user