qcacld-3.0: Move p2p work around to change_iface
hdd_change_adapter_mode() contains a work around for an issue with userspace requesting station mode on a p2p adapter, expecting the wlan driver to instead change the adapter to p2p-device mode. Hoist this work around to the caller, __wlan_hdd_cfg80211_change_iface, so the rest of the code doesn't need to be aware of it. Change-Id: Ic71d6d99b1df7339dda892adcfb27605fa8dfc59 CRs-Fixed: 2332798
此提交包含在:
@@ -13025,18 +13025,7 @@ static int hdd_change_adapter_mode(struct hdd_adapter *adapter,
|
|||||||
|
|
||||||
hdd_stop_adapter(hdd_ctx, adapter);
|
hdd_stop_adapter(hdd_ctx, adapter);
|
||||||
hdd_deinit_adapter(hdd_ctx, adapter, true);
|
hdd_deinit_adapter(hdd_ctx, adapter, true);
|
||||||
|
adapter->device_mode = new_mode;
|
||||||
/* A userspace issue leads to it sending a 'change to station mode'
|
|
||||||
* request on a "p2p" device, expecting the driver do execute a 'change
|
|
||||||
* to p2p-device mode' request instead. The (unfortunate) work around
|
|
||||||
* here is implemented by overriding the new mode if the net_device name
|
|
||||||
* starts with "p2p" and the requested mode was station.
|
|
||||||
*/
|
|
||||||
if (strnstr(netdev->name, "p2p", 3) && new_mode == QDF_STA_MODE)
|
|
||||||
adapter->device_mode = QDF_P2P_DEVICE_MODE;
|
|
||||||
else
|
|
||||||
adapter->device_mode = new_mode;
|
|
||||||
|
|
||||||
memset(&adapter->session, 0, sizeof(adapter->session));
|
memset(&adapter->session, 0, sizeof(adapter->session));
|
||||||
hdd_set_station_ops(netdev);
|
hdd_set_station_ops(netdev);
|
||||||
|
|
||||||
@@ -13162,6 +13151,15 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy,
|
|||||||
if (QDF_IS_STATUS_ERROR(status))
|
if (QDF_IS_STATUS_ERROR(status))
|
||||||
return qdf_status_to_os_return(status);
|
return qdf_status_to_os_return(status);
|
||||||
|
|
||||||
|
/* A userspace issue leads to it sending a 'change to station mode'
|
||||||
|
* request on a "p2p" device, expecting the driver do execute a 'change
|
||||||
|
* to p2p-device mode' request instead. The (unfortunate) work around
|
||||||
|
* here is implemented by overriding the new mode if the net_device name
|
||||||
|
* starts with "p2p" and the requested mode was station.
|
||||||
|
*/
|
||||||
|
if (strnstr(ndev->name, "p2p", 3) && new_mode == QDF_STA_MODE)
|
||||||
|
new_mode = QDF_P2P_DEVICE_MODE;
|
||||||
|
|
||||||
hdd_debug("Changing mode for '%s' from %s to %s",
|
hdd_debug("Changing mode for '%s' from %s to %s",
|
||||||
ndev->name,
|
ndev->name,
|
||||||
qdf_opmode_str(adapter->device_mode),
|
qdf_opmode_str(adapter->device_mode),
|
||||||
@@ -13183,8 +13181,8 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy,
|
|||||||
/* Reset the current device mode bit mask */
|
/* Reset the current device mode bit mask */
|
||||||
policy_mgr_clear_concurrency_mode(hdd_ctx->psoc, adapter->device_mode);
|
policy_mgr_clear_concurrency_mode(hdd_ctx->psoc, adapter->device_mode);
|
||||||
|
|
||||||
if (adapter->device_mode != QDF_P2P_DEVICE_MODE ||
|
/* TDLS ignores p2p-device mode for concurrency considerations */
|
||||||
new_mode != QDF_STA_MODE) {
|
if (new_mode != QDF_P2P_DEVICE_MODE) {
|
||||||
hdd_debug("Disable tdls; new interface is coming up");
|
hdd_debug("Disable tdls; new interface is coming up");
|
||||||
hdd_notify_teardown_tdls_links(adapter->vdev);
|
hdd_notify_teardown_tdls_links(adapter->vdev);
|
||||||
}
|
}
|
||||||
|
新增問題並參考
封鎖使用者