Просмотр исходного кода

qcacld-3.0: Register FISA callback functions for delivery

Add FISA RX callback functions for fisa enabled case.

Change-Id: Iadd9a1b4e9763293153b1c8c2f263b0107c00c2c
CRs-Fixed: 2600268
Mohit Khanna 5 лет назад
Родитель
Сommit
06cce797ed

+ 1 - 0
core/hdd/inc/wlan_hdd_cfg.h

@@ -245,6 +245,7 @@ struct hdd_config {
 	bool config_sar_safety_sleep_index;
 #endif
 
+	uint32_t fisa_enable;
 };
 
 /**

+ 22 - 0
core/hdd/inc/wlan_hdd_tx_rx.h

@@ -115,6 +115,27 @@ QDF_STATUS hdd_rx_flush_packet_cbk(void *adapter_context, uint8_t vdev_id);
  */
 QDF_STATUS hdd_rx_packet_cbk(void *adapter_context, qdf_nbuf_t rxBuf);
 
+#if defined(WLAN_SUPPORT_RX_FISA)
+/**
+ * hdd_rx_fisa_cbk() - Entry function to FISA to handle aggregation
+ * @soc: core txrx main context
+ * @vdev: Handle DP vdev
+ * @nbuf_list: List nbufs to be aggregated
+ *
+ * Return: Success on aggregation
+ */
+QDF_STATUS hdd_rx_fisa_cbk(void *dp_soc, void *dp_vdev, qdf_nbuf_t rxbuf_list);
+
+/**
+ * hdd_rx_fisa_flush() - Flush function to end of context flushing of aggregates
+ * @soc: core txrx main context
+ * @napi_id: REO number to flush the flow Rxed on the REO
+ *
+ * Return: Success on flushing the flows for the REO
+ */
+QDF_STATUS hdd_rx_fisa_flush(void *dp_soc, int ring_num);
+#endif
+
 /**
  * hdd_rx_deliver_to_stack() - HDD helper function to deliver RX pkts to stack
  * @adapter: pointer to HDD adapter context
@@ -490,4 +511,5 @@ wlan_hdd_dump_queue_history_state(struct hdd_netif_queue_history *q_hist,
  */
 bool wlan_hdd_rx_rpm_mark_last_busy(struct hdd_context *hdd_ctx,
 				    void *hif_ctx);
+
 #endif /* end #if !defined(WLAN_HDD_TX_RX_H) */

+ 28 - 0
core/hdd/src/wlan_hdd_assoc.c

@@ -2076,6 +2076,28 @@ static QDF_STATUS hdd_conn_change_peer_state(struct hdd_adapter *adapter,
 }
 #endif
 
+#if defined(WLAN_SUPPORT_RX_FISA)
+/**
+ * hdd_rx_register_fisa_ops() - FISA callback functions
+ * @txrx_ops: operations handle holding callback functions
+ * @hdd_rx_fisa_cbk: callback for fisa aggregation handle function
+ * @hdd_rx_fisa_flush: callback function to flush fisa aggregation
+ *
+ * Return: None
+ */
+static inline void
+hdd_rx_register_fisa_ops(struct ol_txrx_ops *txrx_ops)
+{
+	txrx_ops->rx.osif_fisa_rx = hdd_rx_fisa_cbk;
+	txrx_ops->rx.osif_fisa_flush = hdd_rx_fisa_flush;
+}
+#else
+static inline void
+hdd_rx_register_fisa_ops(struct ol_txrx_ops *txrx_ops)
+{
+}
+#endif
+
 /**
  * hdd_roam_register_sta() - register station
  * @adapter: pointer to adapter
@@ -2134,6 +2156,12 @@ QDF_STATUS hdd_roam_register_sta(struct hdd_adapter *adapter,
 		txrx_ops.rx.rx_flush = NULL;
 	}
 
+	if (adapter->hdd_ctx->config->fisa_enable &&
+		(adapter->device_mode != QDF_MONITOR_MODE)) {
+		hdd_debug("FISA feature enabled");
+		hdd_rx_register_fisa_ops(&txrx_ops);
+	}
+
 	txrx_ops.rx.stats_rx = hdd_tx_rx_collect_connectivity_stats_info;
 
 	txrx_ops.tx.tx = NULL;

+ 20 - 0
core/hdd/src/wlan_hdd_tx_rx.c

@@ -61,6 +61,9 @@
 
 #include "wlan_hdd_nud_tracking.h"
 #include "dp_txrx.h"
+#if defined(WLAN_SUPPORT_RX_FISA)
+#include "dp_fisa_rx.h"
+#endif
 #include <ol_defines.h>
 #include "cfg_ucfg_api.h"
 #include "target_type.h"
@@ -1994,6 +1997,9 @@ QDF_STATUS hdd_rx_deliver_to_stack(struct hdd_adapter *adapter,
 		       hdd_ctx->enable_rxthread)) {
 		local_bh_disable();
 		netif_status = netif_receive_skb(skb);
+		if (netif_status)
+			hdd_err("netif_receive_skb return dropped skb %pk",
+				skb);
 		local_bh_enable();
 	} else if (qdf_unlikely(QDF_NBUF_CB_RX_PEER_CACHED_FRM(skb))) {
 		/*
@@ -2055,6 +2061,19 @@ QDF_STATUS hdd_rx_flush_packet_cbk(void *adapter_context, uint8_t vdev_id)
 	return QDF_STATUS_SUCCESS;
 }
 
+#if defined(WLAN_SUPPORT_RX_FISA)
+QDF_STATUS hdd_rx_fisa_cbk(void *dp_soc, void *dp_vdev, qdf_nbuf_t nbuf_list)
+{
+	return dp_fisa_rx((struct dp_soc *)dp_soc, (struct dp_vdev *)dp_vdev,
+			  nbuf_list);
+}
+
+QDF_STATUS hdd_rx_fisa_flush(void *dp_soc, int ring_num)
+{
+	return dp_rx_fisa_flush((struct dp_soc *)dp_soc, ring_num);
+}
+#endif
+
 QDF_STATUS hdd_rx_packet_cbk(void *adapter_context,
 			     qdf_nbuf_t rxBuf)
 {
@@ -3214,6 +3233,7 @@ void hdd_dp_cfg_update(struct wlan_objmgr_psoc *psoc,
 		cfg_get(psoc, CFG_DP_RX_THREAD_UL_CPU_MASK);
 	config->rx_thread_affinity_mask =
 		cfg_get(psoc, CFG_DP_RX_THREAD_CPU_MASK);
+	config->fisa_enable = cfg_get(psoc, CFG_DP_RX_FISA_ENABLE);
 	qdf_uint8_array_parse(cfg_get(psoc, CFG_DP_RPS_RX_QUEUE_CPU_MAP_LIST),
 			      config->cpu_map_list,
 			      sizeof(config->cpu_map_list), &array_out_size);