From b3f26cc4f5833624a224e0047d40cdf23f2a98f2 Mon Sep 17 00:00:00 2001 From: Liangwei Dong Date: Tue, 11 Oct 2016 04:37:00 -0400 Subject: [PATCH] qcacld-3.0: Fix P2P GO vdev start failure qcacld-2.0 to qcacld-3.0 propagation 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 (cherry picked from commit 696a5a4e110482bcf873b6c657fe621aa2dd8b8e) --- core/hdd/src/wlan_hdd_hostapd.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index e9738a16664e..42fe0fd2e0b6 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -7896,6 +7896,16 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy, return -EINVAL; } } + if (pAdapter->device_mode == QDF_P2P_GO_MODE) { + hdd_adapter_t *p2p_adapter; + p2p_adapter = hdd_get_adapter(pHddCtx, QDF_P2P_DEVICE_MODE); + if (p2p_adapter) { + hdd_info("cancel active p2p device ROC before GO " + "starting"); + wlan_hdd_cancel_existing_remain_on_channel( + p2p_adapter); + } + } if ((pAdapter->device_mode == QDF_SAP_MODE) || (pAdapter->device_mode == QDF_P2P_GO_MODE)