From 087d75e7c9a1ab3ebec22130b4a6cef769e00a99 Mon Sep 17 00:00:00 2001 From: Liangwei Dong Date: Mon, 17 May 2021 15:25:16 +0800 Subject: [PATCH] qcacld-3.0: Fix sap started on unsupported channel In wlan_hdd_validate_operation_channel, "status" is override to QDF_STATUS_SUCCESS after "ucfg_mlme_get_sap_allow_all_channels" call. Reset "status" to QDF_STATUS_E_INVAL before checking with supported channel list, otherwise QDF_STATUS_SUCCESS will be returned for unsupported channel case. Change-Id: Ibc3396eb89634b0efc77262e90427510d26e0f39 CRs-Fixed: 2946475 --- core/hdd/src/wlan_hdd_cfg80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index f7c365686b45..8a5a74e18fed 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -17024,12 +17024,12 @@ QDF_STATUS wlan_hdd_validate_operation_channel(struct hdd_adapter *adapter, uint32_t i; struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); struct regulatory_channel *cur_chan_list; - QDF_STATUS status = QDF_STATUS_E_INVAL; + QDF_STATUS status; status = ucfg_mlme_get_sap_allow_all_channels(hdd_ctx->psoc, &value); if (status != QDF_STATUS_SUCCESS) hdd_err("Unable to fetch sap allow all channels"); - + status = QDF_STATUS_E_INVAL; if (value) { /* Validate the channel */ for (i = CHAN_ENUM_2412; i < NUM_CHANNELS; i++) {