From 76b5ff5f45f802d41cc2d2e083b16a2a27656ad4 Mon Sep 17 00:00:00 2001 From: Wu Gao Date: Fri, 21 Jun 2019 17:57:05 +0800 Subject: [PATCH] qcacld-3.0: Check channel number if there is SAP/GO Driver will reject with channel 0 when check channel ok for DNBS, without this fix, wlan_cfg80211_mgmt_tx API will fail when channel is zero. Change-Id: I89edc81c45104d0994cd65262c1f5545f0f6970f CRs-Fixed: 2476420 --- .../policy_mgr/src/wlan_policy_mgr_get_set_utils.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c index 84ddd53b6250..a2e32ef41519 100644 --- a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c +++ b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c @@ -3059,7 +3059,7 @@ QDF_STATUS policy_mgr_is_chan_ok_for_dnbs(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id[MAX_NUMBER_OF_CONC_CONNECTIONS]; struct wlan_objmgr_vdev *vdev; - if (!channel || !ok) { + if (!ok) { policy_mgr_err("Invalid parameter"); return QDF_STATUS_E_INVAL; } @@ -3080,6 +3080,11 @@ QDF_STATUS policy_mgr_is_chan_ok_for_dnbs(struct wlan_objmgr_psoc *psoc, return QDF_STATUS_SUCCESS; } + if (!channel) { + policy_mgr_err("channel is 0, cc count %d", cc_count); + return QDF_STATUS_E_INVAL; + } + for (i = 0; i < cc_count; i++) { vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id[i],