Browse Source

qcacld-3.0: Fix mcs12_13 wrong rate issue

issue step:
1 first connect with mcs_12_13 supported ap
2 switch to connect with non support mcs_12_13 ap

the linkspeed for 2nd ap will be wrong as it is leverage
1st ap's sta info in vdev_mlme_obj.

Fix is reinit mcs_12_13 in vdev_mlme_obj for each connection.
no matter if it is 11ax AP.
Change-Id: I7f6ceb2543be1df324f57183758872e6d807d8f9
CRs-Fixed: 2868617
Jingxiang Ge 4 years ago
parent
commit
c9059d5ea0
2 changed files with 12 additions and 11 deletions
  1. 2 3
      core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c
  2. 10 8
      core/mac/src/pe/lim/lim_utils.c

+ 2 - 3
core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c

@@ -187,9 +187,8 @@ void lim_update_assoc_sta_datas(struct mac_context *mac_ctx,
 				vht_mcs_10_11_supp;
 	}
 
-	if (IS_DOT11_MODE_HE(session_entry->dot11mode))
-		lim_update_stads_he_caps(mac_ctx, sta_ds, assoc_rsp,
-					 session_entry, beacon);
+	lim_update_stads_he_caps(mac_ctx, sta_ds, assoc_rsp,
+				 session_entry, beacon);
 
 	if (lim_is_sta_he_capable(sta_ds))
 		he_cap = &assoc_rsp->he_cap;

+ 10 - 8
core/mac/src/pe/lim/lim_utils.c

@@ -6728,6 +6728,10 @@ void lim_update_stads_he_caps(struct mac_context *mac_ctx,
 			      struct pe_session *session_entry,
 			      tSchBeaconStruct *beacon)
 {
+	/* If HE is not supported, do not fill sta_ds and return */
+	if (!IS_DOT11_MODE_HE(session_entry->dot11mode))
+		goto out;
+
 	if (!assoc_rsp->he_cap.present && beacon && beacon->he_cap.present) {
 		/* Use beacon HE caps if assoc resp doesn't have he caps */
 		pe_debug("he_caps missing in assoc rsp");
@@ -6737,7 +6741,7 @@ void lim_update_stads_he_caps(struct mac_context *mac_ctx,
 
 	/* assoc resp and beacon doesn't have he caps */
 	if (!assoc_rsp->he_cap.present)
-		return;
+		goto out;
 
 	sta_ds->mlmStaContext.he_capable = assoc_rsp->he_cap.present;
 
@@ -6753,18 +6757,12 @@ void lim_update_stads_he_caps(struct mac_context *mac_ctx,
 	qdf_mem_copy(&sta_ds->he_config, &assoc_rsp->he_cap,
 		     sizeof(tDot11fIEhe_cap));
 
-	/* If HE is not supported, do not fill sta_ds and return */
-	if (!IS_DOT11_MODE_HE(session_entry->dot11mode))
-		return;
-
 	/* If MCS 12/13 is supported by the assoc resp QCN IE */
 	if (assoc_rsp->qcn_ie.present &&
 	    assoc_rsp->qcn_ie.he_mcs13_attr.present) {
 		sta_ds->he_mcs_12_13_map =
 		assoc_rsp->qcn_ie.he_mcs13_attr.he_mcs_12_13_supp_80 |
 		assoc_rsp->qcn_ie.he_mcs13_attr.he_mcs_12_13_supp_160 << 8;
-	} else {
-		return;
 	}
 
 	/* Take intersection of the FW capability for HE MCS 12/13 */
@@ -6774,7 +6772,11 @@ void lim_update_stads_he_caps(struct mac_context *mac_ctx,
 	else
 		sta_ds->he_mcs_12_13_map &=
 			mac_ctx->mlme_cfg->he_caps.he_mcs_12_13_supp_5g;
-
+out:
+	pe_debug("he_mcs_12_13_map: sta_ds 0x%x, 2g_fw 0x%x, 5g_fw 0x%x",
+		 sta_ds->he_mcs_12_13_map,
+		 mac_ctx->mlme_cfg->he_caps.he_mcs_12_13_supp_2g,
+		 mac_ctx->mlme_cfg->he_caps.he_mcs_12_13_supp_5g);
 	lim_update_he_mcs_12_13_map(mac_ctx->psoc,
 				    session_entry->smeSessionId,
 				    sta_ds->he_mcs_12_13_map);