From 4ad087ece695ecfad6b3142d5b90c24601279dc3 Mon Sep 17 00:00:00 2001 From: gaurank kathpalia Date: Sat, 8 Jun 2019 21:19:07 +0530 Subject: [PATCH] qcacld-3.0: Fix P2P-GO restart fail issue in unsafe channel event Currently the driver checks MCC/SCC with the present connections, and band interference in restart case of both SAP, and P2P-GO, which can lead to p2p-go fail, as supplicant which is the initiator of the switch channel does not care about MCC, and wants the driver to restart the p2p-go in the channel given. Fix is to overide the checks for P2P-GO only, and restart the vdev in the given channel by supplicant. Change-Id: I5db1da5452272696d80128e16b9e0ee50aa0de28 CRs-Fixed: 2466292 --- core/hdd/src/wlan_hdd_hostapd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index fd2c29cc381f..9ff2d99b5313 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -2886,6 +2886,7 @@ int hdd_softap_set_channel_change(struct net_device *dev, int target_channel, struct hdd_station_ctx *sta_ctx; uint8_t conc_rule1 = 0; uint8_t scc_on_lte_coex = 0; + bool is_p2p_go_session = false; hdd_ctx = WLAN_HDD_GET_CTX(adapter); ret = wlan_hdd_validate_context(hdd_ctx); @@ -2988,11 +2989,15 @@ int hdd_softap_set_channel_change(struct net_device *dev, int target_channel, /* * Post the Channel Change request to SAP. */ + + if (wlan_vdev_mlme_get_opmode(adapter->vdev) == QDF_P2P_GO_MODE) + is_p2p_go_session = true; + status = wlansap_set_channel_change_with_csa( WLAN_HDD_GET_SAP_CTX_PTR(adapter), (uint32_t)target_channel, target_bw, - forced && !scc_on_lte_coex); + (forced && !scc_on_lte_coex) || is_p2p_go_session); if (QDF_STATUS_SUCCESS != status) { hdd_err("SAP set channel failed for channel: %d, bw: %d",