From 37e4ff877f8ce7eb3c6ec95c580b198d82735bab Mon Sep 17 00:00:00 2001 From: gaurank kathpalia Date: Mon, 22 Apr 2019 15:09:01 +0530 Subject: [PATCH] qcacld-3.0: Modify PCL based on SRD ini for P2P-GO Currently the driver does not update the PCL channel list based upon the SRD ini, and thus adds the SRD channels in the PCL for p2p-go, which can lead to p2p-go operation on a channel not expected. Fix is to remove the SRD channels from the PCL channel list, if the SRD ini is set. Change-Id: I8824fa38ef59976816a5e230982c551263da0c9c CRs-Fixed: 2437795 --- .../policy_mgr/src/wlan_policy_mgr_pcl.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c index 83f59109a93c..759ab8e00068 100644 --- a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c +++ b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c @@ -463,10 +463,10 @@ static QDF_STATUS policy_mgr_modify_sap_pcl_based_on_nol( } static QDF_STATUS -policy_mgr_modify_sap_pcl_based_on_srd(struct wlan_objmgr_psoc *psoc, - uint8_t *pcl_list_org, - uint8_t *weight_list_org, - uint32_t *pcl_len_org) +policy_mgr_modify_pcl_based_on_srd(struct wlan_objmgr_psoc *psoc, + uint8_t *pcl_list_org, + uint8_t *weight_list_org, + uint32_t *pcl_len_org) { uint32_t i, pcl_len = 0; uint8_t pcl_list[QDF_MAX_NUM_CHAN]; @@ -550,7 +550,7 @@ static QDF_STATUS policy_mgr_pcl_modification_for_sap( policy_mgr_debug("chan:%d weight:%d", pcl_channels[i], pcl_weight[i]); - status = policy_mgr_modify_sap_pcl_based_on_srd + status = policy_mgr_modify_pcl_based_on_srd (psoc, pcl_channels, pcl_weight, len); if (QDF_IS_STATUS_ERROR(status)) { policy_mgr_err("failed to get srd modified pcl for SAP"); @@ -585,6 +585,13 @@ static QDF_STATUS policy_mgr_pcl_modification_for_p2p_go( policy_mgr_err("failed to get modified pcl for GO"); return status; } + + status = policy_mgr_modify_pcl_based_on_srd + (psoc, pcl_channels, pcl_weight, len); + if (QDF_IS_STATUS_ERROR(status)) { + policy_mgr_err("failed to get srd modified pcl for P2P-GO"); + return status; + } policy_mgr_debug("modified pcl len:%d", *len); for (i = 0; i < *len; i++) policy_mgr_debug("chan:%d weight:%d",