Kaynağa Gözat

qcacld-3.0: Send AP HTC HE support to FW in peer assoc

Currently, Host intersects STA and AP capability of HTC
HE support before sending to FW via peer assoc. Since
testbed default for HTC HE support is 0 on assoc link,
Host sends 0 on assoc link and 1 on partner link in
peer assoc command whereas FW expects Host to send just
the AP's capability on both links in peer assoc command
and the current behavior is causing low UL throughput.
Thus, change peer HTC HE support to only AP support.

Change-Id: I44a8ecb3b10226daba079dd855e5f35cfb6d2608
CRs-Fixed: 3435836
Gururaj Pandurangi 2 yıl önce
ebeveyn
işleme
e89ec3ebc6

+ 4 - 3
core/mac/src/pe/lim/lim_assoc_utils.c

@@ -3874,7 +3874,7 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
 			lim_intersect_ap_he_caps(pe_session,
 						 pAddBssParams,
 						 pBeaconStruct,
-						 pAssocRsp);
+						 pAssocRsp, bssDescription);
 			lim_update_he_stbc_capable(&pAddBssParams->staContext);
 			lim_update_he_mcs_12_13(&pAddBssParams->staContext,
 						sta);
@@ -3964,7 +3964,7 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
 			lim_intersect_ap_he_caps(pe_session,
 						 pAddBssParams,
 						 pBeaconStruct,
-						 pAssocRsp);
+						 pAssocRsp, bssDescription);
 			lim_update_he_stbc_capable(&pAddBssParams->staContext);
 			lim_update_he_mcs_12_13(&pAddBssParams->staContext,
 						sta);
@@ -4253,7 +4253,8 @@ QDF_STATUS lim_sta_send_add_bss_pre_assoc(struct mac_context *mac,
 		if (lim_is_session_he_capable(pe_session) &&
 			pBeaconStruct->he_cap.present)
 			lim_intersect_ap_he_caps(pe_session, pAddBssParams,
-					      pBeaconStruct, NULL);
+						 pBeaconStruct, NULL,
+						 bssDescription);
 
 		if (lim_is_session_eht_capable(pe_session) &&
 		    pBeaconStruct->eht_cap.present)

+ 3 - 1
core/mac/src/pe/lim/lim_ft.c

@@ -268,7 +268,9 @@ void lim_ft_prepare_add_bss_req(struct mac_context *mac,
 			if (lim_is_session_he_capable(ft_session) &&
 				pBeaconStruct->he_cap.present)
 				lim_intersect_ap_he_caps(ft_session,
-					pAddBssParams, pBeaconStruct, NULL);
+							 pAddBssParams,
+							 pBeaconStruct, NULL,
+							 bssDescription);
 
 			if (lim_is_session_eht_capable(ft_session) &&
 			    pBeaconStruct->eht_cap.present)

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

@@ -6978,12 +6978,6 @@ static void lim_intersect_he_caps(tDot11fIEhe_cap *rcvd_he,
 	else
 		peer_he->tb_ppdu_tx_stbc_gt_80mhz = 0;
 
-	if (session_he->htc_he && peer_he->htc_he)
-		peer_he->htc_he = 1;
-	else
-		peer_he->htc_he = 0;
-	pe_debug("intersected htc he is: %d", peer_he->htc_he);
-
 	/* Tx Doppler is first bit and Rx Doppler is second bit */
 	if (session_he->doppler) {
 		val = 0;
@@ -7044,11 +7038,37 @@ void lim_intersect_sta_he_caps(struct mac_context *mac_ctx,
 			mac_ctx->mlme_cfg->he_caps.he_mcs_12_13_supp_5g;
 }
 
-void lim_intersect_ap_he_caps(struct pe_session *session, struct bss_params *add_bss,
-		tSchBeaconStruct *beacon, tpSirAssocRsp assoc_rsp)
+static bool
+lim_is_vendor_htc_he_ap(struct bss_description *bss_desc)
+{
+	struct action_oui_search_attr vendor_ap_search_attr;
+	uint16_t ie_len;
+
+	ie_len = wlan_get_ielen_from_bss_description(bss_desc);
+
+	vendor_ap_search_attr.ie_data = (uint8_t *)&bss_desc->ieFields[0];
+	vendor_ap_search_attr.ie_length = ie_len;
+
+	return wlan_get_vendor_ie_ptr_from_oui(SIR_MAC_BAD_HTC_HE_VENDOR_OUI1,
+					       SIR_MAC_BAD_HTC_HE_VENDOR_OUI_LEN,
+					       vendor_ap_search_attr.ie_data,
+					       ie_len) &&
+					       wlan_get_vendor_ie_ptr_from_oui(
+					       SIR_MAC_BAD_HTC_HE_VENDOR_OUI2,
+					       SIR_MAC_BAD_HTC_HE_VENDOR_OUI_LEN,
+					       vendor_ap_search_attr.ie_data,
+					       ie_len);
+}
+
+void lim_intersect_ap_he_caps(struct pe_session *session,
+			      struct bss_params *add_bss,
+			      tSchBeaconStruct *beacon,
+			      tpSirAssocRsp assoc_rsp,
+			      struct bss_description *bss_desc)
 {
 	tDot11fIEhe_cap *rcvd_he;
 	tDot11fIEhe_cap *peer_he = &add_bss->staContext.he_config;
+	bool vendor_ap_present = false;
 
 	if (assoc_rsp && assoc_rsp->he_cap.present)
 		rcvd_he = &assoc_rsp->he_cap;
@@ -7056,6 +7076,18 @@ void lim_intersect_ap_he_caps(struct pe_session *session, struct bss_params *add
 		rcvd_he = &beacon->he_cap;
 
 	lim_intersect_he_caps(rcvd_he, peer_he, session);
+	peer_he->htc_he = rcvd_he->htc_he;
+	vendor_ap_present = lim_is_vendor_htc_he_ap(bss_desc);
+	if (vendor_ap_present) {
+		if (session->he_config.htc_he && peer_he->htc_he)
+			peer_he->htc_he = 1;
+		else
+			peer_he->htc_he = 0;
+		pe_debug("intersected htc he is: %d", peer_he->htc_he);
+	}
+
+	pe_debug("HTC HE: self: %d recvd: %d, peer: %d",
+		 session->he_config.htc_he, rcvd_he->htc_he, peer_he->htc_he);
 	add_bss->staContext.he_capable = true;
 }
 

+ 10 - 4
core/mac/src/pe/lim/lim_utils.h

@@ -1185,11 +1185,15 @@ QDF_STATUS lim_strip_ie(struct mac_context *mac_ctx,
  * @add_bss: pointer to ADD BSS params
  * @beacon: pointer to beacon
  * @assoc_rsp: pointer to assoc response
+ * @bss_desc: pointer to BSS description
  *
  * Return: None
  */
-void lim_intersect_ap_he_caps(struct pe_session *session, struct bss_params *add_bss,
-		tSchBeaconStruct *pBeaconStruct, tpSirAssocRsp assoc_rsp);
+void lim_intersect_ap_he_caps(struct pe_session *session,
+			      struct bss_params *add_bss,
+			      tSchBeaconStruct *pBeaconStruct,
+			      tpSirAssocRsp assoc_rsp,
+			      struct bss_description *bss_desc);
 
 /**
  * lim_intersect_sta_he_caps() - Intersect STA capability with SAP capability
@@ -1608,8 +1612,10 @@ static inline void lim_update_he_6gop_assoc_resp(
 }
 
 static inline void lim_intersect_ap_he_caps(struct pe_session *session,
-		struct bss_params *add_bss,	tSchBeaconStruct *pBeaconStruct,
-		tpSirAssocRsp assoc_rsp)
+					    struct bss_params *add_bss,
+					    tSchBeaconStruct *pBeaconStruct,
+					    tpSirAssocRsp assoc_rsp,
+					    struct bss_description *bss_desc)
 {
 	return;
 }