瀏覽代碼

qcacld-3.0: Add support to program dynamic FISA aggregation size

Currently FISA max aggregation count is fixed 16, but some
platforms can support different max aggregation count.

So while sending HTT FISA config if F.W is capable of programming
dynamic msdu aggregation sizes, then select max aggregation count
based on target type and send it to F.W.

Change-Id: Ic5212536024a3ceb0b2c4ad111172870f1825969
CRs-Fixed: 3542509
Karthik Kantamneni 1 年之前
父節點
當前提交
638da26c32

+ 2 - 0
components/dp/core/inc/wlan_dp_priv.h

@@ -764,6 +764,7 @@ struct dp_direct_link_context {
  * @fst_in_cmem: Flag indicating if FST is in CMEM or not
  * @fisa_enable: Flag to indicate if FISA is enabled or not
  * @fisa_lru_del_enable: Flag to indicate if LRU flow delete is enabled
+ * @fisa_dynamic_aggr_size_support: Indicate dynamic aggr size programming support
  * @skip_fisa_param: FISA skip params structure
  * @skip_fisa_param.skip_fisa: Flag to skip FISA aggr inside @skip_fisa_param
  * @skip_fisa_param.fisa_force_flush: Force flush inside @skip_fisa_param
@@ -852,6 +853,7 @@ struct wlan_dp_psoc_context {
 	bool fst_in_cmem;
 	uint8_t fisa_enable;
 	uint8_t fisa_lru_del_enable;
+	bool fisa_dynamic_aggr_size_support;
 	/*
 	 * Params used for controlling the fisa aggregation dynamically
 	 */

+ 7 - 0
components/dp/core/src/wlan_dp_fisa_rx.c

@@ -2173,3 +2173,10 @@ void dp_resume_fse_cache_flush(struct wlan_dp_psoc_context *dp_ctx)
 
 	dp_info("fse cache flush resumed");
 }
+
+void dp_set_fisa_dynamic_aggr_size_support(bool dynamic_aggr_size_support)
+{
+	struct wlan_dp_psoc_context *dp_ctx = dp_get_context();
+
+	dp_ctx->fisa_dynamic_aggr_size_support = dynamic_aggr_size_support;
+}

+ 22 - 0
components/dp/core/src/wlan_dp_fisa_rx.h

@@ -34,6 +34,14 @@
 
 #if defined(WLAN_SUPPORT_RX_FISA)
 
+/*
+ * Below is different types of max MSDU aggregation supported in FISA.
+ * Host should send one value less so that F.W will increment one
+ * and program in RXOLE reg
+ */
+#define DP_RX_FISA_MAX_AGGR_COUNT_DEFAULT	(16 - 1)
+#define	DP_RX_FISA_MAX_AGGR_COUNT_1		(32 - 1)
+
 #define FSE_CACHE_FLUSH_TIME_OUT	5 /* milliSeconds */
 #define FISA_UDP_MAX_DATA_LEN		1470 /* udp max data length */
 #define FISA_UDP_HDR_LEN		8 /* udp header length */
@@ -224,6 +232,15 @@ void dp_fisa_cfg_init(struct wlan_dp_psoc_cfg *config,
  * Return: None
  */
 void dp_set_fst_in_cmem(bool fst_in_cmem);
+
+/**
+ * dp_set_fisa_dynamic_aggr_size_support() - Set flag to indicate dynamic
+ *					     aggregation size support
+ * @dynamic_aggr_size_support: Flag to indicate dynamic aggregation support
+ *
+ * Return: None
+ */
+void dp_set_fisa_dynamic_aggr_size_support(bool dynamic_aggr_size_support);
 #else
 static inline void
 dp_rx_fst_update_pm_suspend_status(struct wlan_dp_psoc_context *dp_ctx,
@@ -243,5 +260,10 @@ static inline void dp_fisa_cfg_init(struct wlan_dp_psoc_cfg *config,
 static inline void dp_set_fst_in_cmem(bool fst_in_cmem)
 {
 }
+
+static inline void
+dp_set_fisa_dynamic_aggr_size_support(bool dynamic_aggr_size_support)
+{
+}
 #endif
 #endif

+ 16 - 0
components/dp/core/src/wlan_dp_rx_fst.c

@@ -713,6 +713,20 @@ QDF_STATUS dp_rx_fst_target_config(struct wlan_dp_psoc_context *dp_ctx)
 	return status;
 }
 
+static uint8_t
+dp_rx_fisa_get_max_aggr_supported(struct wlan_dp_psoc_context *dp_ctx)
+{
+	if (!dp_ctx->fisa_dynamic_aggr_size_support)
+		return DP_RX_FISA_MAX_AGGR_COUNT_DEFAULT;
+
+	switch (hal_get_target_type(dp_ctx->hal_soc)) {
+	case TARGET_TYPE_WCN6450:
+		return DP_RX_FISA_MAX_AGGR_COUNT_1;
+	default:
+		return DP_RX_FISA_MAX_AGGR_COUNT_DEFAULT;
+	}
+}
+
 #define FISA_MAX_TIMEOUT 0xffffffff
 #define FISA_DISABLE_TIMEOUT 0
 QDF_STATUS dp_rx_fisa_config(struct wlan_dp_psoc_context *dp_ctx)
@@ -722,6 +736,8 @@ QDF_STATUS dp_rx_fisa_config(struct wlan_dp_psoc_context *dp_ctx)
 
 	fisa_config.pdev_id = 0;
 	fisa_config.fisa_timeout = FISA_MAX_TIMEOUT;
+	fisa_config.max_aggr_supported =
+		dp_rx_fisa_get_max_aggr_supported(dp_ctx);
 
 	cfg.fisa_config = &fisa_config;
 

+ 9 - 0
components/dp/dispatcher/inc/wlan_dp_api.h

@@ -64,4 +64,13 @@ void wlan_dp_print_fisa_rx_stats(enum cdp_fisa_stats_id stats_id);
  * Return: None
  */
 void wlan_dp_set_fst_in_cmem(bool fst_in_cmem);
+
+/**
+ * wlan_dp_set_fisa_dynamic_aggr_size_support - Set flag to indicate dynamic
+ *						MSDU aggregation size programming supported
+ * @dynamic_aggr_size_support: Flag to indicate dynamic aggregation size support
+ *
+ * Return: None
+ */
+void wlan_dp_set_fisa_dynamic_aggr_size_support(bool dynamic_aggr_size_support);
 #endif

+ 5 - 0
components/dp/dispatcher/src/wlan_dp_api.c

@@ -46,3 +46,8 @@ void wlan_dp_set_fst_in_cmem(bool fst_in_cmem)
 {
 	dp_set_fst_in_cmem(fst_in_cmem);
 }
+
+void wlan_dp_set_fisa_dynamic_aggr_size_support(bool dynamic_aggr_size_support)
+{
+	dp_set_fisa_dynamic_aggr_size_support(dynamic_aggr_size_support);
+}

+ 3 - 0
core/wma/src/wma_main.c

@@ -6648,6 +6648,9 @@ int wma_rx_service_ready_event(void *handle, uint8_t *cmd_param_info,
 	if (wmi_service_enabled(wmi_handle, wmi_service_fse_cmem_alloc_support))
 		wlan_dp_set_fst_in_cmem(true);
 
+	if (wmi_service_enabled(wmi_handle,
+			wmi_service_fisa_dynamic_msdu_aggr_size_support))
+		wlan_dp_set_fisa_dynamic_aggr_size_support(true);
 	/*
 	 * This Service bit is added to check for ARP/NS Offload
 	 * support for LL/HL targets