Browse Source

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
Sheenam Monga 1 year ago
parent
commit
9fe3506c1b
1 changed files with 11 additions and 1 deletions
  1. 11 1
      core/hdd/src/wlan_hdd_hostapd.c

+ 11 - 1
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