From bd80420d8f25679161daa1eb653232aaed7b960a Mon Sep 17 00:00:00 2001 From: "Poddar, Siddarth" Date: Wed, 23 Nov 2016 18:19:49 +0530 Subject: [PATCH] qcacld-3.0: Fix improper naming and exporting of dump_pkt() Fix improper naming and exporting of dump_pkt() by: 1) adding ol_txrx prefix in the api 2) adding prototype of api to ol_txrx.h and removing the local prototype for the api from core/dp/txrx/ol_tx_desc.c CRs-Fixed: 1093667 Change-Id: I14e547223f8c96f10897aa6dc5c9781018a4d986 --- core/dp/htt/htt_rx.c | 5 +---- core/dp/txrx/ol_tx.c | 2 +- core/dp/txrx/ol_tx_desc.c | 11 +---------- core/dp/txrx/ol_txrx.c | 9 +++++++++ core/dp/txrx/ol_txrx.h | 12 ++++++++++++ 5 files changed, 24 insertions(+), 15 deletions(-) diff --git a/core/dp/htt/htt_rx.c b/core/dp/htt/htt_rx.c index 1d131e40cb80..347e59a5f00c 100644 --- a/core/dp/htt/htt_rx.c +++ b/core/dp/htt/htt_rx.c @@ -1974,9 +1974,6 @@ void htt_rx_mon_note_capture_channel(htt_pdev_handle pdev, int mon_ch) ch_info->ch_freq = cds_chan_to_freq(mon_ch); } -extern void -dump_pkt(qdf_nbuf_t nbuf, uint32_t nbuf_paddr, int len); - uint32_t htt_rx_amsdu_rx_in_order_get_pktlog(qdf_nbuf_t rx_ind_msg) { uint32_t *msg_word; @@ -2079,7 +2076,7 @@ htt_rx_amsdu_rx_in_order_pop_ll(htt_pdev_handle pdev, HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_GET( *(msg_word + NEXT_FIELD_OFFSET_IN32)))); #if defined(HELIUMPLUS_DEBUG) - dump_pkt(msdu, 0, 64); + ol_txrx_dump_pkt(msdu, 0, 64); #endif *((uint8_t *) &rx_desc->fw_desc.u.val) = HTT_RX_IN_ORD_PADDR_IND_FW_DESC_GET(*(msg_word + NEXT_FIELD_OFFSET_IN32)); diff --git a/core/dp/txrx/ol_tx.c b/core/dp/txrx/ol_tx.c index c9c38984c5a7..68e4544ae550 100644 --- a/core/dp/txrx/ol_tx.c +++ b/core/dp/txrx/ol_tx.c @@ -464,7 +464,7 @@ ol_tx_prepare_ll_fast(struct ol_txrx_pdev_t *pdev, qdf_print("%s:%d: htt_fdesc=%p frag=%d frag_paddr=0x%0llx len=%zu", __func__, __LINE__, tx_desc->htt_frag_desc, i-1, frag_paddr, frag_len); - dump_pkt(netbuf, frag_paddr, 64); + ol_txrx_dump_pkt(netbuf, frag_paddr, 64); #endif /* HELIUMPLUS_DEBUG */ #else /* ! defined(HELIUMPLUSPADDR64) */ htt_tx_desc_frag(pdev->htt_pdev, tx_desc->htt_tx_desc, diff --git a/core/dp/txrx/ol_tx_desc.c b/core/dp/txrx/ol_tx_desc.c index af610fd9c7b1..439df76f6e36 100644 --- a/core/dp/txrx/ol_tx_desc.c +++ b/core/dp/txrx/ol_tx_desc.c @@ -400,15 +400,6 @@ void ol_tx_desc_free(struct ol_txrx_pdev_t *pdev, struct ol_tx_desc_t *tx_desc) } #endif -void -dump_pkt(qdf_nbuf_t nbuf, qdf_dma_addr_t nbuf_paddr, int len) -{ - qdf_print("%s: Pkt: VA 0x%p PA 0x%llx len %d\n", __func__, - qdf_nbuf_data(nbuf), (long long unsigned int)nbuf_paddr, len); - print_hex_dump(KERN_DEBUG, "Pkt: ", DUMP_PREFIX_ADDRESS, 16, 4, - qdf_nbuf_data(nbuf), len, true); -} - const uint32_t htt_to_ce_pkt_type[] = { [htt_pkt_type_raw] = tx_pkt_type_raw, [htt_pkt_type_native_wifi] = tx_pkt_type_native_wifi, @@ -567,7 +558,7 @@ struct ol_tx_desc_t *ol_tx_desc_ll(struct ol_txrx_pdev_t *pdev, qdf_print("%s:%d: htt_fdesc=%p frag=%d frag_vaddr=0x%p frag_paddr=0x%llx len=%zu\n", __func__, __LINE__, tx_desc->htt_frag_desc, i-1, frag_vaddr, frag_paddr, frag_len); - dump_pkt(netbuf, frag_paddr, 64); + ol_txrx_dump_pkt(netbuf, frag_paddr, 64); #endif /* HELIUMPLUS_DEBUG */ #else /* ! defined(HELIUMPLUSPADDR64) */ htt_tx_desc_frag(pdev->htt_pdev, tx_desc->htt_tx_desc, i - 1, diff --git a/core/dp/txrx/ol_txrx.c b/core/dp/txrx/ol_txrx.c index 1be306ee7047..959a12ee980d 100644 --- a/core/dp/txrx/ol_txrx.c +++ b/core/dp/txrx/ol_txrx.c @@ -4858,6 +4858,15 @@ void ol_deregister_lro_flush_cb(void (lro_deinit_cb)(void *)) } #endif /* FEATURE_LRO */ +void +ol_txrx_dump_pkt(qdf_nbuf_t nbuf, uint32_t nbuf_paddr, int len) +{ + qdf_print("%s: Pkt: VA 0x%p PA 0x%llx len %d\n", __func__, + qdf_nbuf_data(nbuf), (unsigned long long int)nbuf_paddr, len); + print_hex_dump(KERN_DEBUG, "Pkt: ", DUMP_PREFIX_ADDRESS, 16, 4, + qdf_nbuf_data(nbuf), len, true); +} + /** * ol_txrx_get_vdev_from_vdev_id() - get vdev from vdev_id * @vdev_id: vdev_id diff --git a/core/dp/txrx/ol_txrx.h b/core/dp/txrx/ol_txrx.h index 67c9a1f8a046..a6897452739e 100644 --- a/core/dp/txrx/ol_txrx.h +++ b/core/dp/txrx/ol_txrx.h @@ -122,6 +122,18 @@ ol_txrx_update_last_real_peer(void *ppdev, void *ppeer, } #endif +/** + * ol_txrx_dump_pkt() - display the data in buffer and buffer's address + * @nbuf: buffer which contains data to be displayed + * @nbuf_paddr: physical address of the buffer + * @len: defines the size of the data to be displayed + * + * Return: None + */ +void +ol_txrx_dump_pkt(qdf_nbuf_t nbuf, uint32_t nbuf_paddr, int len); + + void *ol_txrx_get_vdev_from_vdev_id(uint8_t vdev_id); void htt_pkt_log_init(void *handle, void *scn);