瀏覽代碼

qcacmn: Read EML and MLD Cap from target

Extract EML and MLD Capabilities from Target via
wmi_service_ready_ext2_event. These values can be
used while advertising EML and MLD Capabilities.

Add helper function to get EML related delays in
Micro Secs from values got from EML and MLD advertisments.

Send EML Capabilities received from node to Target
via WMI_PEER_ASSOC.

CRs-Fixed: 3225495
Change-Id: Ibfa2ff8dbf11d4293125331376a7986e611d5f63
Shreedhar Parande 3 年之前
父節點
當前提交
e6b1ed7180

+ 9 - 0
target_if/init_deinit/inc/service_ready_param.h

@@ -28,6 +28,9 @@
 #ifdef WLAN_SUPPORT_RF_CHARACTERIZATION
 #include "wmi_unified_param.h"
 #endif
+#ifdef WLAN_FEATURE_11BE_MLO
+#include "wlan_mlo_mgr_public_structs.h"
+#endif
 
 
 /**
@@ -267,6 +270,8 @@ struct wlan_psoc_host_hw_mode_caps {
  * @eht_supp_mcs_ext_5G: 5G EHT Supported MCS Set for Rx/Tx as per 11be D1.2
  * @eht_ppet2G: 2G EHT PPET info
  * @eht_ppet5G: 5G EHT PPET info
+ * @emlcap: EML Capabilities info
+ * @mldcap: MLD Capabilities info
  */
 struct wlan_psoc_host_mac_phy_caps_ext2 {
 	uint32_t hw_mode_id;
@@ -286,6 +291,10 @@ struct wlan_psoc_host_mac_phy_caps_ext2 {
 	struct wlan_psoc_host_ppe_threshold eht_ppet2G;
 	struct wlan_psoc_host_ppe_threshold eht_ppet5G;
 #endif
+#ifdef WLAN_FEATURE_11BE_MLO
+	struct wlan_mlo_eml_cap emlcap;
+	struct wlan_mlo_mld_cap mldcap;
+#endif
 };
 
 /*

+ 37 - 8
umac/mlo_mgr/inc/wlan_mlo_mgr_public_structs.h

@@ -546,13 +546,42 @@ struct wlan_mlo_peer_t2lm_policy {
 #endif /* WLAN_FEATURE_11BE */
 
 /**
- * struct wlan_mlo_peer_eml_caps - peer EML capabilities
- * @emlsr_support: eMLSR Support
- * @transition_timeout: Transition Timeout
- */
-struct wlan_mlo_peer_eml_caps {
-	bool emlsr_support;
-	uint16_t transition_timeout;
+ * struct wlan_mlo_eml_cap - EML capabilities of MLD
+ * @emlsr_supp: eMLSR Support
+ * @emlsr_pad_delay: eMLSR Padding Delay
+ * @emlsr_trans_delay: eMLSR transition delay
+ * @emlmr_supp: eMLMR Support
+ * @emlmr_delay: eMLMR Delay
+ * @trans_timeout: Transition Timeout
+ * @reserved: Reserved
+ */
+struct wlan_mlo_eml_cap {
+	uint16_t emlsr_supp:1,
+		 emlsr_pad_delay:3,
+		 emlsr_trans_delay:3,
+		 emlmr_supp:1,
+		 emlmr_delay:3,
+		 trans_timeout:4,
+		 reserved:1;
+};
+
+/**
+ * struct wlan_mlo_mld_cap - MLD capabilities of MLD
+ * @max_simult_link: Maximum number of simultaneous links
+ * @srs_support: SRS support
+ * @tid2link_neg_support: TID to Link Negotiation Support
+ * @str_freq_sep: Frequency separation suggested by STR non-AP MLD
+ *                OR Type of AP-MLD
+ * @aar_support: AAR Support
+ * @reserved: Reserved
+ */
+struct wlan_mlo_mld_cap {
+	uint16_t max_simult_link:4,
+		 srs_support:1,
+		 tid2link_neg_support:2,
+		 str_freq_sep:5,
+		 aar_support:1,
+		 reserved:3;
 };
 
 /*
@@ -605,7 +634,7 @@ struct wlan_mlo_peer_context {
 #ifdef WLAN_FEATURE_11BE
 	struct wlan_mlo_peer_t2lm_policy t2lm_policy;
 #endif
-	struct wlan_mlo_peer_eml_caps eml_caps;
+	struct wlan_mlo_eml_cap mlpeer_emlcap;
 };
 
 /*

+ 10 - 2
wmi/inc/wmi_unified_param.h

@@ -1121,11 +1121,15 @@ struct wmi_host_tid_to_link_map_params {
  * @mlo_peer_id_valid: indicate if the mlo peer id is valid
  * @mlo_force_link_inactive: force the peer inactive
  * @emlsr_support: indicate if eMLSR supported
+ * @emlmr_support: indicate if eMLMR supported
  * @mld_mac: MLD mac address
  * @logical_link_index: Unique index for links of the mlo. Starts with Zero
  * @ml_peer_id: ML peer id if generated by host. Otherwise invalid peer id
  * @ieee_link_id: peer link ID
- * @emlsr_trans_timeout: Transition timeout value from peer for eMLSR links
+ * @emlsr_pad_delay_us: eMLSR Padding Delay from peer in us
+ * @emlsr_trans_delay_us: eMLSR Transition Delay from peer in us
+ * @emlmr_delay_us: eMLMR Delay from peer in us
+ * @trans_timeout_us: EML Transition Timeout in us
  */
 struct peer_assoc_mlo_params {
 	uint32_t mlo_enabled:1,
@@ -1135,12 +1139,16 @@ struct peer_assoc_mlo_params {
 		 mlo_peer_id_valid:1,
 		 mlo_force_link_inactive:1,
 		 emlsr_support:1,
+		 emlmr_support:1,
 		 unused:25;
 	uint8_t mld_mac[QDF_MAC_ADDR_SIZE];
 	uint32_t logical_link_index;
 	uint32_t ml_peer_id;
 	uint32_t ieee_link_id;
-	uint32_t emlsr_trans_timeout;
+	uint16_t emlsr_pad_delay_us;
+	uint16_t emlsr_trans_delay_us;
+	uint16_t emlmr_delay_us;
+	uint32_t trans_timeout_us;
 };
 
 /**

+ 3 - 2
wmi/src/wmi_unified_11be_tlv.c

@@ -257,8 +257,9 @@ uint8_t *peer_assoc_add_mlo_params(uint8_t *buf_ptr,
 	mlo_params->mld_peer_id = req->mlo_params.ml_peer_id;
 
 	mlo_params->ieee_link_id = req->mlo_params.ieee_link_id;
-	mlo_params->emlsr_trans_timeout_us =
-			req->mlo_params.emlsr_trans_timeout;
+	mlo_params->emlsr_trans_timeout_us = req->mlo_params.trans_timeout_us;
+	mlo_params->emlsr_trans_delay_us = req->mlo_params.emlsr_trans_delay_us;
+	mlo_params->emlsr_padding_delay_us = req->mlo_params.emlsr_pad_delay_us;
 
 	return buf_ptr + sizeof(wmi_peer_assoc_mlo_params);
 }

+ 56 - 0
wmi/src/wmi_unified_tlv.c

@@ -13215,6 +13215,59 @@ static QDF_STATUS extract_mac_phy_cap_service_ready_ext_tlv(
 	return QDF_STATUS_SUCCESS;
 }
 
+#ifdef WLAN_FEATURE_11BE_MLO
+/**
+ * extract_mac_phy_emlcap() - API to extract EML Capabilities
+ * @param: host ext2 mac phy capabilities
+ * @mac_phy_caps: ext mac phy capabilities
+ *
+ * Return: void
+ */
+static void extract_mac_phy_emlcap(struct wlan_psoc_host_mac_phy_caps_ext2 *param,
+				   WMI_MAC_PHY_CAPABILITIES_EXT *mac_phy_caps)
+{
+	if (!param || !mac_phy_caps)
+		return;
+
+	param->emlcap.emlsr_supp = WMI_SUPPORT_EMLSR_GET(mac_phy_caps->eml_capability);
+	param->emlcap.emlsr_pad_delay = WMI_EMLSR_PADDING_DELAY_GET(mac_phy_caps->eml_capability);
+	param->emlcap.emlsr_trans_delay = WMI_EMLSR_TRANSITION_DELAY_GET(mac_phy_caps->eml_capability);
+	param->emlcap.emlmr_supp = WMI_SUPPORT_EMLMR_GET(mac_phy_caps->eml_capability);
+	param->emlcap.emlmr_delay = WMI_EMLMR_DELAY_GET(mac_phy_caps->eml_capability);
+	param->emlcap.trans_timeout = WMI_TRANSITION_TIMEOUT_GET(mac_phy_caps->eml_capability);
+}
+
+/**
+ * extract_mac_phy_mldcap() - API to extract MLD Capabilities
+ * @param: host ext2 mac phy capabilities
+ * @mac_phy_caps: ext mac phy capabilities
+ *
+ * Return: void
+ */
+static void extract_mac_phy_mldcap(struct wlan_psoc_host_mac_phy_caps_ext2 *param,
+				   WMI_MAC_PHY_CAPABILITIES_EXT *mac_phy_caps)
+{
+	if (!param || !mac_phy_caps)
+		return;
+
+	param->mldcap.max_simult_link = WMI_MAX_NUM_SIMULTANEOUS_LINKS_GET(mac_phy_caps->mld_capability);
+	param->mldcap.srs_support = WMI_SUPPORT_SRS_GET(mac_phy_caps->mld_capability);
+	param->mldcap.tid2link_neg_support = WMI_TID_TO_LINK_NEGOTIATION_GET(mac_phy_caps->mld_capability);
+	param->mldcap.str_freq_sep = WMI_FREQ_SEPERATION_STR_GET(mac_phy_caps->mld_capability);
+	param->mldcap.aar_support = WMI_SUPPORT_AAR_GET(mac_phy_caps->mld_capability);
+}
+#else
+static void extract_mac_phy_emlcap(struct wlan_psoc_host_mac_phy_caps_ext2 *param,
+				   WMI_MAC_PHY_CAPABILITIES_EXT *mac_phy_caps)
+{
+}
+
+static void extract_mac_phy_mldcap(struct wlan_psoc_host_mac_phy_caps_ext2 *param,
+				   WMI_MAC_PHY_CAPABILITIES_EXT *mac_phy_caps)
+{
+}
+#endif
+
 /**
  * extract_mac_phy_cap_ehtcaps- api to extract eht mac phy caps
  * @param param: host ext2 mac phy capabilities
@@ -13309,6 +13362,7 @@ static void extract_mac_phy_cap_ehtcaps(
 {
 }
 #endif
+
 static QDF_STATUS extract_mac_phy_cap_service_ready_ext2_tlv(
 			wmi_unified_t wmi_handle,
 			uint8_t *event, uint8_t hw_mode_id, uint8_t phy_id,
@@ -13345,6 +13399,8 @@ static QDF_STATUS extract_mac_phy_cap_service_ready_ext2_tlv(
 			mac_phy_caps->wireless_modes_ext);
 
 	extract_mac_phy_cap_ehtcaps(param, mac_phy_caps);
+	extract_mac_phy_emlcap(param, mac_phy_caps);
+	extract_mac_phy_mldcap(param, mac_phy_caps);
 
 	return QDF_STATUS_SUCCESS;
 }