Browse Source

qcacld-3.0: HT STA is indicated as VHT capable to firmware

When HT STA connect to VHT SAP, the STA is indicated as VHT capable
to firmware and thus MCS8 rates are used.
The reason is that the condition to set SMPS intolerance was added in
between the "if- else if -else" condition to determine ht and VHT
capability of sta. This resulted in else condition to execute for
peer STA which set VHT and HT capability from the psession and doesn't
consider capability of peer sta.

Fix this issue by reordering the if condition to set SMPS
Intolerance to firmware.

Change-Id: I483a5c44bc4beba0d03e1a80028993b30b47b108
CRs-Fixed: 2079727
Abhishek Singh 7 years ago
parent
commit
a91d619afc
1 changed files with 18 additions and 18 deletions
  1. 18 18
      core/mac/src/pe/lim/lim_assoc_utils.c

+ 18 - 18
core/mac/src/pe/lim/lim_assoc_utils.c

@@ -2171,14 +2171,31 @@ lim_add_sta(tpAniSirGlobal mac_ctx,
 
 	add_sta_params->status = QDF_STATUS_SUCCESS;
 	add_sta_params->respReqd = 1;
-	/* Update HT Capability */
 
+	/* Update VHT/HT Capability */
 	if (LIM_IS_AP_ROLE(session_entry) ||
 	    LIM_IS_IBSS_ROLE(session_entry)) {
 		add_sta_params->htCapable = sta_ds->mlmStaContext.htCapability;
 		add_sta_params->vhtCapable =
 			 sta_ds->mlmStaContext.vhtCapability;
 	}
+#ifdef FEATURE_WLAN_TDLS
+	/* SystemRole shouldn't be matter if staType is TDLS peer */
+	else if (STA_ENTRY_TDLS_PEER == sta_ds->staType) {
+		add_sta_params->htCapable = sta_ds->mlmStaContext.htCapability;
+		add_sta_params->vhtCapable =
+			 sta_ds->mlmStaContext.vhtCapability;
+	}
+#endif
+	else {
+		add_sta_params->htCapable = session_entry->htCapability;
+		add_sta_params->vhtCapable = session_entry->vhtCapability;
+	}
+
+	pe_debug("StaIdx: %d updateSta: %d htcapable: %d vhtCapable: %d",
+		add_sta_params->staIdx, add_sta_params->updateSta,
+		add_sta_params->htCapable, add_sta_params->vhtCapable);
+
 	/*
 	 * 2G-AS platform: SAP associates with HT (11n)clients as 2x1 in 2G and
 	 * 2X2 in 5G
@@ -2202,26 +2219,9 @@ lim_add_sta(tpAniSirGlobal mac_ctx,
 		}
 	}
 
-#ifdef FEATURE_WLAN_TDLS
-	/* SystemRole shouldn't be matter if staType is TDLS peer */
-	else if (STA_ENTRY_TDLS_PEER == sta_ds->staType) {
-		add_sta_params->htCapable = sta_ds->mlmStaContext.htCapability;
-		add_sta_params->vhtCapable =
-			 sta_ds->mlmStaContext.vhtCapability;
-	}
-#endif
-	else {
-		add_sta_params->htCapable = session_entry->htCapability;
-		add_sta_params->vhtCapable = session_entry->vhtCapability;
-	}
-
 	lim_update_sta_he_capable(mac_ctx, add_sta_params, sta_ds,
 				  session_entry);
 
-	pe_debug("StaIdx: %d updateSta: %d htcapable: %d vhtCapable: %d",
-		add_sta_params->staIdx, add_sta_params->updateSta,
-		add_sta_params->htCapable, add_sta_params->vhtCapable);
-
 	add_sta_params->greenFieldCapable = sta_ds->htGreenfield;
 	add_sta_params->maxAmpduDensity = sta_ds->htAMpduDensity;
 	add_sta_params->maxAmpduSize = sta_ds->htMaxRxAMpduFactor;