From 3a3d32c5e2b4583617fa9119242a8a9a64a7324d Mon Sep 17 00:00:00 2001 From: sheenam monga Date: Thu, 15 Jul 2021 20:11:02 +0530 Subject: [PATCH] qcacld-3.0: Check valid freq for non-beaconing entities Currently, In Reassoc and fast reassoc command host validates freq from secondary channel list that may cause issue for some frequencies which may be valid for sta but invalid for sap. Fix is to validate freq from valid channel list Change-Id: I1ee81212425f7b4f997568b4fd92153231e349e8 CRs-Fixed: 2991541 --- core/hdd/src/wlan_hdd_ioctl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c index 82098e67c45b..9f3b4a5081dc 100644 --- a/core/hdd/src/wlan_hdd_ioctl.c +++ b/core/hdd/src/wlan_hdd_ioctl.c @@ -616,8 +616,7 @@ int hdd_reassoc(struct hdd_adapter *adapter, const uint8_t *bssid, ch_freq = sta_ctx->conn_info.chan_freq; } - if (QDF_STATUS_SUCCESS != - wlan_hdd_validate_operation_channel(adapter, ch_freq)) { + if (!sme_is_channel_valid(hdd_ctx->mac_handle, ch_freq)) { hdd_err("Invalid Ch freq: %d", ch_freq); ret = -EINVAL; goto exit; @@ -4595,8 +4594,7 @@ static int drv_cmd_fast_reassoc(struct hdd_adapter *adapter, } /* Check freq number is a valid freq number */ - if (freq && QDF_STATUS_SUCCESS != - wlan_hdd_validate_operation_channel(adapter, freq)) { + if (freq && !sme_is_channel_valid(mac_handle, freq)) { hdd_err("Invalid freq [%d]", freq); return -EINVAL; }