ソースを参照

qcacmn: Add support for FW cap for chan_width_switch_cmd

WMI_PEER_CHAN_WIDTH_SWITCH_CMDID sent from host fragments the
command based on the size of the WMI buffer.

Add support to instead use a FW regulated value taken from the
WMI service ready extended_2 event.

CRs-Fixed: 2684788
Change-Id: Iaeccf785c64b385bf2ad6bc372da239981143fa0
Aditya Sathish 5 年 前
コミット
a88235db0e

+ 18 - 1
target_if/core/inc/target_if.h

@@ -2341,5 +2341,22 @@ static inline void target_psoc_get_version_info(
 	*bdf_minor =
 		psoc_info->info.service_ext2_param.bdf_reg_db_version_minor;
 }
-#endif
 
+/**
+ * target_psoc_get_chan_width_switch_num_peers() - Get peer limit
+ * @psoc_info: pointer to structure target_psoc_info
+ *
+ * API to get the number of peers supported per WMI command with the ID
+ * WMI_PEER_CHAN_WIDTH_SWITCH_CMDID.
+ *
+ * Return: maximum peers allowed in a single WMI command with the given ID.
+ */
+static inline uint32_t target_psoc_get_chan_width_switch_num_peers(
+					    struct target_psoc_info *psoc_info)
+{
+	if (!psoc_info)
+		return 0;
+
+	return psoc_info->info.service_ext2_param.chwidth_num_peer_caps;
+}
+#endif

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

@@ -368,6 +368,7 @@ struct wlan_psoc_host_service_ext_param {
  * bdf_reg_db_version_major: BDF REG DB version major number
  * bdf_reg_db_version_minor: BDF REG DB version minor number
  * @num_dbr_ring_caps: Number of direct buf rx ring capabilities
+ * @chwidth_num_peer_caps: Peer limit for peer_chan_width_switch WMI cmd
  */
 struct wlan_psoc_host_service_ext2_param {
 	uint8_t reg_db_version_major;
@@ -375,6 +376,7 @@ struct wlan_psoc_host_service_ext2_param {
 	uint8_t bdf_reg_db_version_major;
 	uint8_t bdf_reg_db_version_minor;
 	uint32_t num_dbr_ring_caps;
+	uint32_t chwidth_num_peer_caps;
 };
 
 #endif /* _SERVICE_READY_PARAM_H_*/

+ 2 - 0
wmi/inc/wmi_unified_param.h

@@ -2796,11 +2796,13 @@ struct peer_chan_width_switch_info {
 /**
  * struct peer_chan_width_switch_params - Peer channel width capability wrapper
  * @num_peers: Total number of peers connected to AP
+ * @max_peers_per_cmd: Peer limit per WMI command
  * @chan_width_peer_list: List of capabilities for all connected peers
  */
 
 struct peer_chan_width_switch_params {
 	uint32_t num_peers;
+	uint32_t max_peers_per_cmd;
 	struct peer_chan_width_switch_info *chan_width_peer_list;
 };
 

+ 1 - 0
wmi/src/wmi_unified_tlv.c

@@ -11094,6 +11094,7 @@ extract_service_ready_ext2_tlv(wmi_unified_t wmi_handle, uint8_t *event,
 	param->bdf_reg_db_version_minor =
 			WMI_BDF_REG_DB_VERSION_MINOR_GET(
 				ev->reg_db_version);
+	param->chwidth_num_peer_caps = ev->chwidth_num_peer_caps;
 
 	param->num_dbr_ring_caps = param_buf->num_dma_ring_caps;
 	return QDF_STATUS_SUCCESS;