Ver código fonte

qcacmn: Add connectivity stats rx function pointer

Add new rx function pointer for connectivity stats
as part of ol_txrx_ops structure.

Change-Id: I91300de995b20e5dfc2c85c780453e63ea14ec93
CRs-Fixed: 2168412
Poddar, Siddarth 7 anos atrás
pai
commit
8d33d9b7a8
1 arquivos alterados com 37 adições e 0 exclusões
  1. 37 0
      dp/inc/cdp_txrx_cmn_struct.h

+ 37 - 0
dp/inc/cdp_txrx_cmn_struct.h

@@ -375,6 +375,30 @@ enum wlan_op_mode {
 	wlan_op_mode_ndi,
 };
 
+/**
+ * connectivity_stats_pkt_status - data pkt type
+ * @PKT_TYPE_REQ: Request packet
+ * @PKT_TYPE_RSP: Response packet
+ * @PKT_TYPE_TX_DROPPED: TX packet dropped
+ * @PKT_TYPE_RX_DROPPED: RX packet dropped
+ * @PKT_TYPE_RX_DELIVERED: RX packet delivered
+ * @PKT_TYPE_RX_REFUSED: RX packet refused
+ * @PKT_TYPE_TX_HOST_FW_SENT: TX packet FW sent
+ * @PKT_TYPE_TX_ACK_CNT:TC packet acked
+ * @PKT_TYPE_NONE: Invalid packet
+ */
+enum connectivity_stats_pkt_status {
+	PKT_TYPE_REQ,
+	PKT_TYPE_RSP,
+	PKT_TYPE_TX_DROPPED,
+	PKT_TYPE_RX_DROPPED,
+	PKT_TYPE_RX_DELIVERED,
+	PKT_TYPE_RX_REFUSED,
+	PKT_TYPE_TX_HOST_FW_SENT,
+	PKT_TYPE_TX_ACK_CNT,
+	PKT_TYPE_NONE,
+};
+
 /**
  * cdp_mgmt_tx_cb - tx management delivery notification
  * callback function
@@ -435,6 +459,18 @@ typedef bool (*ol_txrx_tx_flow_control_is_pause_fp)(void *osif_dev);
  */
 typedef QDF_STATUS(*ol_txrx_rx_fp)(void *osif_dev, qdf_nbuf_t msdu_list);
 
+/**
+ * ol_txrx_stats_rx_fp - receive function to hand batches of data
+ * frames from txrx to OS shim
+ * @skb: skb data
+ * @osif_dev: the virtual device's OS shim object
+ * @action: data packet type
+ * @pkt_type: packet data type
+ */
+typedef void (*ol_txrx_stats_rx_fp)(struct sk_buff *skb,
+		void *osif_dev, enum connectivity_stats_pkt_status action,
+		uint8_t *pkt_type);
+
 /**
  * ol_txrx_get_key_fp - function to gey key based on keyix and peer
  * mac address
@@ -561,6 +597,7 @@ struct ol_txrx_ops {
 		ol_txrx_rx_fp           rx;
 		ol_txrx_rx_check_wai_fp wai_check;
 		ol_txrx_rx_mon_fp       mon;
+		ol_txrx_stats_rx_fp           stats_rx;
 		ol_txrx_rsim_rx_decap_fp rsim_rx_decap;
 	} rx;