Ver Fonte

qcacld-3.0: Update 320 MHz flag in 6 GHz properly

Update 320 MHz flag in 6 GHz properly per BW support.

Change-Id: I13840fcabeb7604e9a038e98f59972f34e420cc4
CRs-Fixed: 3601669
Gururaj Pandurangi há 1 ano atrás
pai
commit
3844e356f7

+ 5 - 3
core/mac/src/include/parser_api.h

@@ -1545,13 +1545,14 @@ QDF_STATUS populate_dot11f_eht_caps(struct mac_context *mac_ctx,
  * @mac_ctx: Global MAC context
  * @is_2g: is 2G band
  * @eht_cap: pointer to EHT capability IE
+ * @session: pe session
  *
  * Populate the EHT capability IE based on band.
  */
 QDF_STATUS
 populate_dot11f_eht_caps_by_band(struct mac_context *mac_ctx,
-				 bool is_2g,
-				 tDot11fIEeht_cap *eht_cap);
+				 bool is_2g, tDot11fIEeht_cap *eht_cap,
+				 struct pe_session *session);
 
 /**
  * populate_dot11f_eht_operation() - pouldate EHT Operation IE
@@ -1659,7 +1660,8 @@ populate_dot11f_eht_caps(struct mac_context *mac_ctx,
 static inline QDF_STATUS
 populate_dot11f_eht_caps_by_band(struct mac_context *mac_ctx,
 				 bool is_2g,
-				 tDot11fIEeht_cap *eht_cap)
+				 tDot11fIEeht_cap *eht_cap,
+				 struct pe_session *session)
 {
 	return QDF_STATUS_SUCCESS;
 }

+ 1 - 1
core/mac/src/pe/lim/lim_utils.c

@@ -9008,7 +9008,7 @@ void lim_set_eht_caps(struct mac_context *mac, struct pe_session *session,
 	if (band == CDS_BAND_2GHZ)
 		is_band_2g = true;
 
-	populate_dot11f_eht_caps_by_band(mac, is_band_2g, &dot11_cap);
+	populate_dot11f_eht_caps_by_band(mac, is_band_2g, &dot11_cap, session);
 	populate_dot11f_he_caps_by_band(mac, is_band_2g, &dot11_he_cap,
 					session);
 	lim_log_eht_cap(mac, &dot11_cap);

+ 20 - 10
core/mac/src/sys/legacy/src/utils/src/parser_api.c

@@ -9499,6 +9499,19 @@ populate_dot11f_rtwt_eht_cap(struct mac_context *mac,
 	eht_cap->restricted_twt = false;
 }
 #endif
+static void
+populate_dot11f_revise_eht_caps(struct pe_session *session,
+				tDot11fIEeht_cap *eht_cap)
+{
+	if (session->ch_width != CH_WIDTH_320MHZ)
+		eht_cap->support_320mhz_6ghz = 0;
+
+	if (wlan_epcs_get_config(session->vdev))
+		eht_cap->epcs_pri_access = 1;
+	else
+		eht_cap->epcs_pri_access = 0;
+}
+
 QDF_STATUS populate_dot11f_eht_caps(struct mac_context *mac_ctx,
 				    struct pe_session *session,
 				    tDot11fIEeht_cap *eht_cap)
@@ -9514,13 +9527,7 @@ QDF_STATUS populate_dot11f_eht_caps(struct mac_context *mac_ctx,
 
 	/** TODO: String items needs attention. **/
 	qdf_mem_copy(eht_cap, &session->eht_config, sizeof(*eht_cap));
-	if (session->ch_width != CH_WIDTH_320MHZ)
-		eht_cap->support_320mhz_6ghz = 0;
-
-	if (wlan_epcs_get_config(session->vdev))
-		eht_cap->epcs_pri_access = 1;
-	else
-		eht_cap->epcs_pri_access = 0;
+	populate_dot11f_revise_eht_caps(session, eht_cap);
 
 	populate_dot11f_rtwt_eht_cap(mac_ctx, eht_cap);
 	return QDF_STATUS_SUCCESS;
@@ -9528,8 +9535,8 @@ QDF_STATUS populate_dot11f_eht_caps(struct mac_context *mac_ctx,
 
 QDF_STATUS
 populate_dot11f_eht_caps_by_band(struct mac_context *mac_ctx,
-				 bool is_2g,
-				 tDot11fIEeht_cap *eht_cap)
+				 bool is_2g, tDot11fIEeht_cap *eht_cap,
+				 struct pe_session *session)
 {
 	pe_debug("is_2g %d", is_2g);
 	if (is_2g)
@@ -9540,6 +9547,8 @@ populate_dot11f_eht_caps_by_band(struct mac_context *mac_ctx,
 		qdf_mem_copy(eht_cap,
 			     &mac_ctx->eht_cap_5g,
 			     sizeof(tDot11fIEeht_cap));
+	if (session)
+		populate_dot11f_revise_eht_caps(session, eht_cap);
 
 	populate_dot11f_rtwt_eht_cap(mac_ctx, eht_cap);
 	return QDF_STATUS_SUCCESS;
@@ -12367,7 +12376,8 @@ QDF_STATUS populate_dot11f_assoc_req_mlo_ie(struct mac_context *mac_ctx,
 			non_inher_ext_ie_lists[non_inher_ext_len++] =
 						WLAN_EXTN_ELEMID_HE_6G_CAP;
 		}
-		populate_dot11f_eht_caps_by_band(mac_ctx, is_2g, &eht_caps);
+		populate_dot11f_eht_caps_by_band(mac_ctx, is_2g, &eht_caps,
+						 pe_session);
 		if ((eht_caps.present && frm->eht_cap.present &&
 		     qdf_mem_cmp(&eht_caps, &frm->eht_cap, sizeof(eht_caps))) ||
 		     (eht_caps.present && !frm->eht_cap.present) ||