From 9fe3506c1b25c5fe703a36e30fee0dbf6e7f1e5a Mon Sep 17 00:00:00 2001 From: Sheenam Monga Date: Fri, 19 Jan 2024 13:33:24 +0530 Subject: [PATCH] qcacld-3.0: Reset sap mandatory channel list on stop_ap Currently, sap mandatory channel list is not reset during stop_ap. If selected band changes and gEnableSAPManadatoryChanList is enabled then new band frequencies may be discarded via pcl modification based on sap mandatory channels and sap may come up on frequency which is not as per the selected band. Fix is to reset sap mandatory channels when sap stops. So that if sap starts again with different band previous mandatory channels are not considered. Change-Id: Ibb70acc921558ca48c6385950adf5e48a55d20ef CRs-Fixed: 3708549 --- core/hdd/src/wlan_hdd_hostapd.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index d93eb605fb..122b2c4b19 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -7227,6 +7227,16 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy, goto exit; } + /* + * Reset sap mandatory channel list.If band is changed then + * frequencies of new selected band can be removed in pcl + * modification based on sap mandatory channel list. + */ + status = policy_mgr_reset_sap_mandatory_channels(hdd_ctx->psoc); + /* Don't go to exit in case of failure. Clean up & stop BSS */ + if (QDF_IS_STATUS_ERROR(status)) + hdd_err("failed to reset mandatory channels"); + /* * For STA+SAP/GO concurrency support from GUI, In case if * STOP AP/GO request comes just before the SAE authentication