modify esp8089 wifi driver for p2p fuction
This commit is contained in:
@@ -1768,7 +1768,9 @@ struct esp_pub * esp_pub_alloc_mac80211(struct device *dev)
|
||||
ret = -ENOMEM;
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0))
|
||||
hw->wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
|
||||
#endif
|
||||
epub = hw->priv;
|
||||
memset(epub, 0, sizeof(*epub));
|
||||
epub->hw = hw;
|
||||
|
||||
@@ -975,7 +975,18 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
|
||||
wiphy_warn(local->hw.wiphy,
|
||||
"Failed to add default virtual iface\n");
|
||||
}
|
||||
|
||||
// ESP8089 register p2p0 IFTYPE_STA
|
||||
#ifdef CONFIG_ESP8089
|
||||
if (local->hw.wiphy->interface_modes &(BIT(NL80211_IFTYPE_P2P_GO) |
|
||||
BIT(NL80211_IFTYPE_P2P_CLIENT))) {
|
||||
result = ieee80211_if_add(local, "p2p%d", NULL,
|
||||
NL80211_IFTYPE_STATION, NULL);
|
||||
if (result)
|
||||
wiphy_warn(local->hw.wiphy,
|
||||
"Failed to add default virtual iface\n");
|
||||
}
|
||||
|
||||
#endif
|
||||
rtnl_unlock();
|
||||
|
||||
local->network_latency_notifier.notifier_call =
|
||||
|
||||
@@ -1283,7 +1283,10 @@ int cfg80211_can_use_iftype_chan(struct cfg80211_registered_device *rdev,
|
||||
continue;
|
||||
} else if (wdev_iter->netdev) {
|
||||
if (!netif_running(wdev_iter->netdev))
|
||||
continue;
|
||||
{
|
||||
continue;
|
||||
}
|
||||
continue;
|
||||
} else {
|
||||
WARN_ON(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user