Browse Source

qcacld-3.0: store the wmm info in the pe session

Currently FASTREASSOC issues roam command to trigger fw process
LFR3 roaming. When roam event comes back, it deletes the old pe
session and creates a new one hence the bss desc info is lost.
Funtion lim_is_medium_time_valid could not get desc info and
cause addTS fail.

To resolve this issue, store the wmm info in the pe session if
it presents.

Change-Id: I6c7c79c96fed7384a686a1fa0f49069440096e90
CRs-Fixed: 3058801
Paul Zhang 3 years ago
parent
commit
c375bc51a8

+ 1 - 0
core/mac/src/include/parser_api.h

@@ -303,6 +303,7 @@ typedef struct sSirProbeRespBeacon {
 	tDot11fIEtransmit_power_env transmit_power_env[MAX_TPE_IES];
 	uint8_t ap_power_type;
 	tSirMultiLink_IE mlo_ie;
+	tDot11fIEWMMParams wmm_params;
 } tSirProbeRespBeacon, *tpSirProbeRespBeacon;
 
 /* probe Request structure */

+ 1 - 0
core/mac/src/pe/include/lim_session.h

@@ -358,6 +358,7 @@ struct pe_session {
 	tAniAuthType authType;
 	tSirKeyMaterial WEPKeyMaterial[MAX_WEP_KEYS];
 
+	tDot11fIEWMMParams wmm_params;
 	tDot11fIERSN gStartBssRSNIe;
 	tDot11fIEWPA gStartBssWPAIe;
 	tSirAPWPSIEs APWPSIEs;

+ 6 - 0
core/mac/src/pe/lim/lim_ft.c

@@ -545,6 +545,12 @@ void lim_fill_ft_session(struct mac_context *mac,
 			lim_get_ielen_from_bss_description(pbssDescription),
 			pBeaconStruct);
 
+	qdf_mem_zero(&ft_session->wmm_params, sizeof(tDot11fIEWMMParams));
+	if (pBeaconStruct->wmm_params.present)
+		qdf_mem_copy(&ft_session->wmm_params,
+			     &pBeaconStruct->wmm_params,
+			     sizeof(tDot11fIEWMMParams));
+
 	ft_session->rateSet.numRates =
 		pBeaconStruct->supportedRates.numRates;
 	qdf_mem_copy(ft_session->rateSet.rate,

+ 5 - 24
core/mac/src/pe/lim/lim_process_action_frame.c

@@ -487,43 +487,24 @@ lim_is_medium_time_valid(struct mac_context *mac, struct pe_session *pe_session,
 	struct mac_ts_info *ts_info = &addts.tspec.tsinfo;
 	uint16_t user_priority = ts_info->traffic.userPrio;
 	uint8_t ac = upToAc(user_priority);
-	struct bss_description *bss_desc;
-	tDot11fBeaconIEs *ie_local;
 	bool is_acm = false;
-	QDF_STATUS status;
-
-	if (!pe_session->lim_join_req && !pe_session->pLimReAssocReq) {
-		pe_err("Join Request is NULL");
-		return false;
-	}
-
-	if (pe_session->lim_join_req)
-		bss_desc = &pe_session->lim_join_req->bssDescription;
-	else
-		bss_desc = &pe_session->pLimReAssocReq->bssDescription;
-
-	status = wlan_get_parsed_bss_description_ies(mac, bss_desc, &ie_local);
-	if (QDF_IS_STATUS_ERROR(status)) {
-		pe_debug("bss parsing failed");
-		return false;
-	}
 
-	if (ie_local && LIM_IS_QOS_BSS(ie_local)) {
+	if (pe_session->wmm_params.present) {
 		switch (ac) {
 		case QCA_WLAN_AC_BE:
-			if (ie_local->WMMParams.acbe_acm)
+			if (pe_session->wmm_params.acbe_acm)
 				is_acm = true;
 			break;
 		case QCA_WLAN_AC_BK:
-			if (ie_local->WMMParams.acbk_acm)
+			if (pe_session->wmm_params.acbk_acm)
 				is_acm = true;
 			break;
 		case QCA_WLAN_AC_VI:
-			if (ie_local->WMMParams.acvi_acm)
+			if (pe_session->wmm_params.acvi_acm)
 				is_acm = true;
 			break;
 		case QCA_WLAN_AC_VO:
-			if (ie_local->WMMParams.acvo_acm)
+			if (pe_session->wmm_params.acvo_acm)
 				is_acm = true;
 			break;
 		default:

+ 5 - 0
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -2876,6 +2876,11 @@ lim_fill_pe_session(struct mac_context *mac_ctx, struct pe_session *session,
 		return QDF_STATUS_E_FAILURE;
 	}
 
+	qdf_mem_zero(&session->wmm_params, sizeof(tDot11fIEWMMParams));
+	if (ie_struct->WMMParams.present)
+		qdf_mem_copy(&session->wmm_params, &ie_struct->WMMParams,
+			     sizeof(tDot11fIEWMMParams));
+
 	mac_ctx->mlme_cfg->power.local_power_constraint =
 		wlan_get_11h_power_constraint(mac_ctx,
 					      &ie_struct->PowerConstraints);

+ 2 - 0
core/mac/src/sys/legacy/src/utils/src/parser_api.c

@@ -4398,6 +4398,8 @@ sir_parse_beacon_ie(struct mac_context *mac,
 		pBeaconStruct->wmeEdcaPresent = 1;
 		convert_wmm_params(mac, &pBeaconStruct->edcaParams,
 				   &pBies->WMMParams);
+		qdf_mem_copy(&pBeaconStruct->wmm_params, &pBies->WMMParams,
+			     sizeof(tDot11fIEWMMParams));
 	}
 
 	if (pBies->WMMInfoAp.present) {