From 911c07dd2becbda3707e4369f967dfcd7ecd7b0e Mon Sep 17 00:00:00 2001 From: Liangwei Dong Date: Mon, 30 May 2016 03:03:41 -0400 Subject: qcacld-2.0: Fix P2P GO vdev start failure In case of P2P device and P2P GO using seperated interface, if P2P Device interface listen (remain on channel) with long duration is active, P2P GO interface vdev start command will be timeout. In shared interface case, driver will cancel existing P2P listen during interface type changing from P2P device to P2P GO in __wlan_hdd_cfg80211_change_iface. There is no such issue. This fix is to extend the canceling logic just before P2P GO starting to avoid the vdev start timeout in first case. Change-Id: I5c5903bc5eded417ede670025c241daf73b96700 CRs-Fixed: 1022238 --- CORE/HDD/src/wlan_hdd_cfg80211.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index a3947a83bb65..73acba12fa08 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -14159,6 +14159,15 @@ static int __wlan_hdd_cfg80211_add_beacon(struct wiphy *wiphy, hddLog(VOS_TRACE_LEVEL_DEBUG, FL("Reached max concurrent connections")); return -EINVAL; } + if (pAdapter->device_mode == WLAN_HDD_P2P_GO) { + hdd_adapter_t *pP2pAdapter = NULL; + pP2pAdapter = hdd_get_adapter(pHddCtx, WLAN_HDD_P2P_DEVICE); + if (pP2pAdapter) { + hddLog(VOS_TRACE_LEVEL_DEBUG, + FL("cancel active p2p device ROC before GO starting")); + wlan_hdd_cancel_existing_remain_on_channel(pP2pAdapter); + } + } if ((pAdapter->device_mode == WLAN_HDD_SOFTAP) || (pAdapter->device_mode == WLAN_HDD_P2P_GO)) { @@ -14242,6 +14251,15 @@ static int __wlan_hdd_cfg80211_set_beacon(struct wiphy *wiphy, hddLog(LOGE, FL("Command not allowed in FTM mode")); return -EINVAL; } + if (pAdapter->device_mode == WLAN_HDD_P2P_GO) { + hdd_adapter_t *pP2pAdapter = NULL; + pP2pAdapter = hdd_get_adapter(pHddCtx, WLAN_HDD_P2P_DEVICE); + if (pP2pAdapter) { + hddLog(VOS_TRACE_LEVEL_DEBUG, + FL("cancel active p2p device ROC before GO starting")); + wlan_hdd_cancel_existing_remain_on_channel(pP2pAdapter); + } + } if ((pAdapter->device_mode == WLAN_HDD_SOFTAP) || (pAdapter->device_mode == WLAN_HDD_P2P_GO)) { @@ -14550,6 +14568,15 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy, hddLog(VOS_TRACE_LEVEL_DEBUG, FL("Reached max concurrent connections")); return -EINVAL; } + if (pAdapter->device_mode == WLAN_HDD_P2P_GO) { + hdd_adapter_t *pP2pAdapter = NULL; + pP2pAdapter = hdd_get_adapter(pHddCtx, WLAN_HDD_P2P_DEVICE); + if (pP2pAdapter) { + hddLog(VOS_TRACE_LEVEL_DEBUG, + FL("cancel active p2p device ROC before GO starting")); + wlan_hdd_cancel_existing_remain_on_channel(pP2pAdapter); + } + } if ((pAdapter->device_mode == WLAN_HDD_SOFTAP) || (pAdapter->device_mode == WLAN_HDD_P2P_GO) @@ -14684,6 +14711,15 @@ static int __wlan_hdd_cfg80211_change_beacon(struct wiphy *wiphy, pAdapter->device_mode == WLAN_HDD_P2P_GO)) { return -EOPNOTSUPP; } + if (pAdapter->device_mode == WLAN_HDD_P2P_GO) { + hdd_adapter_t *pP2pAdapter = NULL; + pP2pAdapter = hdd_get_adapter(pHddCtx, WLAN_HDD_P2P_DEVICE); + if (pP2pAdapter) { + hddLog(VOS_TRACE_LEVEL_DEBUG, + FL("cancel active p2p device ROC before GO starting")); + wlan_hdd_cancel_existing_remain_on_channel(pP2pAdapter); + } + } old = pAdapter->sessionCtx.ap.beacon; -- cgit v1.2.3