Bläddra i källkod

qcacld-3.0: Do not update the phymode of SAP after SAP is started

In ACS, SAP phymode is updated as per the ACS request, but actual
phymode is calculated during start bss, which check the IEs etc.
In pe session the ht/vht/he/eht capability flags are not updated
as per the new phymode/dot11mode and thus even if phymode is
11ac, he flag is set and send he caps to firmware.

So once SAP is started, don't allow phymode update from ACS.
Also update the ht/vht/he/eht capability as per the new dot11mode
so that there is no mismatch in dot11mode and
ht/vht/he/eht capability flag.

CRs-Fixed: 3696205
Change-Id: I73e5f8ed0fbdc17b423bcba6fd3cbf2acc221fc2
(cherry picked from commit a3b98ba725ebacda1a33d98a8bd0e4e331bb0517)
Abhishek Singh 1 år sedan
förälder
incheckning
cf53bdbed6
2 ändrade filer med 39 tillägg och 4 borttagningar
  1. 36 2
      core/mac/src/pe/lim/lim_process_sme_req_messages.c
  2. 3 2
      core/sap/src/sap_module.c

+ 36 - 2
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -9516,6 +9516,30 @@ static void lim_abort_channel_change(struct mac_context *mac_ctx,
 	lim_sys_process_mmh_msg_api(mac_ctx, &sch_msg);
 }
 
+#ifdef WLAN_FEATURE_11AX
+static inline void
+lim_update_he_capable(struct pe_session *session, uint8_t dot11mode)
+{
+	session->he_capable = IS_DOT11_MODE_HE(dot11mode);
+}
+#else
+static inline void
+lim_update_he_capable(struct pe_session *session, uint8_t dot11mode)
+{}
+#endif
+#ifdef WLAN_FEATURE_11BE
+static inline void
+lim_update_eht_capable(struct pe_session *session, uint8_t dot11mode)
+{
+	session->eht_capable = IS_DOT11_MODE_EHT(dot11mode);
+}
+#else
+static inline void
+lim_update_eht_capable(struct pe_session *session, uint8_t dot11mode)
+{}
+#endif
+
+
 /**
  * lim_process_sme_channel_change_request() - process sme ch change req
  *
@@ -9597,10 +9621,20 @@ static void lim_process_sme_channel_change_request(struct mac_context *mac_ctx,
 		session_entry->channelChangeReasonCode =
 			LIM_SWITCH_CHANNEL_MONITOR;
 
-	pe_nofl_debug("SAP CSA: %d ---> %d, ch_bw %d, nw_type %d, dot11mode %d",
+	pe_nofl_debug("SAP CSA: %d ---> %d, ch_bw %d, nw_type %d, dot11mode %d, old dot11mode %d",
 		      session_entry->curr_op_freq, target_freq,
 		      ch_change_req->ch_width, ch_change_req->nw_type,
-		      ch_change_req->dot11mode);
+		      ch_change_req->dot11mode, session_entry->dot11mode);
+
+	/* Update ht/vht/he/eht capability as per the new dot11mode */
+	if (ch_change_req->dot11mode != session_entry->dot11mode) {
+		session_entry->htCapability =
+			IS_DOT11_MODE_HT(ch_change_req->dot11mode);
+		session_entry->vhtCapability =
+			IS_DOT11_MODE_VHT(ch_change_req->dot11mode);
+		lim_update_he_capable(session_entry, ch_change_req->dot11mode);
+		lim_update_eht_capable(session_entry, ch_change_req->dot11mode);
+	}
 
 	if (IS_DOT11_MODE_HE(ch_change_req->dot11mode) &&
 		((QDF_MONITOR_MODE == session_entry->opmode) ||

+ 3 - 2
core/sap/src/sap_module.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
@@ -2848,7 +2848,8 @@ QDF_STATUS wlansap_acs_chselect(struct sap_context *sap_context,
 
 	sap_context->acs_cfg = &config->acs_cfg;
 	sap_context->ch_width_orig = config->acs_cfg.ch_width;
-	sap_context->phyMode = config->acs_cfg.hw_mode;
+	if (sap_context->fsm_state != SAP_STARTED)
+		sap_context->phyMode = config->acs_cfg.hw_mode;
 
 	/*
 	 * Now, configure the scan and ACS channel params