mwifiex: add P2P interface

Due to firmware design, driver needs to add a default P2P interface
to implement find phase and action frame handshake.

Signed-off-by: Stone Piao <piaoyun@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Stone Piao
2012-09-25 20:23:40 -07:00
committed by John W. Linville
parent 7bff9c974e
commit 197f4a2ec9
3 changed files with 47 additions and 2 deletions

View File

@@ -369,6 +369,13 @@ static void mwifiex_fw_dpc(const struct firmware *firmware, void *context)
dev_err(adapter->dev, "cannot create default AP interface\n");
goto err_add_intf;
}
/* Create P2P interface by default */
if (!mwifiex_add_virtual_intf(adapter->wiphy, "p2p%d",
NL80211_IFTYPE_P2P_CLIENT, NULL, NULL)) {
dev_err(adapter->dev, "cannot create default P2P interface\n");
goto err_add_intf;
}
rtnl_unlock();
mwifiex_drv_get_driver_version(adapter, fmt, sizeof(fmt) - 1);