From 778e267f00c6f178dbc909dd83618d2ae9e6c8fd Mon Sep 17 00:00:00 2001 From: Weiguang Ruan Date: Thu, 14 Jun 2018 15:48:14 +0800 Subject: [PATCH] wifi: mac80211 add p2p0 [5/6] PD#168467: wifi: mac80211 add p2p0 softmac wifi need mac80211 to register cfg80211 interfaeces wlan0 is default, add p2p0 for Android WIFI P2P Change-Id: I6fd48f85e010a1ec9e35954b85205634312c73d9 Signed-off-by: Weiguang Ruan --- net/mac80211/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 2bb6899..8cd0ee7 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -1099,6 +1099,14 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) wiphy_warn(local->hw.wiphy, "Failed to add default virtual iface\n"); } + /* add p2p interface for icomm wifi*/ + if (local->hw.wiphy->interface_modes & (BIT(NL80211_IFTYPE_P2P_GO) | + BIT(NL80211_IFTYPE_P2P_CLIENT))) { + 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 default virtual iface\n"); + } rtnl_unlock(); -- 2.7.4