qcacmn: Use converged packetdump API to avoid corrupting dp_pdev

Packetdump invokes legacy data path API directly without
considering underlying HW:
1. ol_register_packetdump_callback
2. ol_deregister_packetdump_callback
Global pointer pdev_txrx_ctx will be casted to struct ol_txrx_pdev_t
always even Lithium (use struct dp_pdev) underlying, that leads to
struct dp_pdev be overwritten unexpectly.

Wrap with cdp API to avoid.

About packet-dump feature:
It is one debug feature/requirement for Android N, to track/dump
TX/RX data/mgmt. packets during connection. This enhancement can help
in debugging connection related issues.
This change only touches its data packet callback register API.

Change-Id: Ie63fd2dfa909f89741ccf0c5131f6d3305093a3e
CRs-Fixed: 2366334
This commit is contained in:
Lin Bai
2018-12-13 16:13:24 +08:00
committed by nshrivas
parent 00e8c948c8
commit 324f49155b
3 changed files with 59 additions and 1 deletions

View File

@@ -491,7 +491,7 @@ enum connectivity_stats_pkt_status {
};
/**
* cdp_mgmt_tx_cb - tx management delivery notification
* ol_txrx_mgmt_tx_cb - tx management delivery notification
* callback function
*/
typedef void
@@ -632,6 +632,12 @@ typedef void (*ol_txrx_stats_callback)(void *ctxt,
enum htt_cmn_dbg_stats_type type,
uint8_t *buf, int bytes);
/**
* ol_txrx_pktdump_cb - callback for packet dump feature
*/
typedef void (*ol_txrx_pktdump_cb)(qdf_nbuf_t netbuf, uint8_t status,
uint8_t vdev_id, uint8_t type);
/**
* ol_txrx_ops - (pointers to) the functions used for tx and rx
* data xfer