From 6c4a3b8d3c0e8a451e695b9b79eb05f690dc23a3 Mon Sep 17 00:00:00 2001 From: Vulupala Shashank Reddy Date: Tue, 7 Jul 2020 19:44:59 +0530 Subject: [PATCH] qcacld-3.0: Remove unnecessary clone of skb Mgmt txrx component clones skb and sends cloned skb to its clients ex: packet capture component. Remove extra allocation of skb. Change-Id: Ic130c13c9fcc52f250b52196b86c761d36a77ba2 CRs-Fixed: 2727370 --- .../core/src/wlan_pkt_capture_mgmt_txrx.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/components/pkt_capture/core/src/wlan_pkt_capture_mgmt_txrx.c b/components/pkt_capture/core/src/wlan_pkt_capture_mgmt_txrx.c index 11e7d3c3504c..428a8384f68c 100644 --- a/components/pkt_capture/core/src/wlan_pkt_capture_mgmt_txrx.c +++ b/components/pkt_capture/core/src/wlan_pkt_capture_mgmt_txrx.c @@ -414,36 +414,24 @@ pkt_capture_mgmt_tx_completion(struct wlan_objmgr_pdev *pdev, /** * process_pktcapture_mgmt_rx_data_cb() - process management rx packets * @rx_params: mgmt rx event params - * @wbuf: netbuf + * @nbuf: netbuf * * Return: none */ static QDF_STATUS pkt_capture_mgmt_rx_data_cb(struct wlan_objmgr_psoc *psoc, struct wlan_objmgr_peer *peer, - qdf_nbuf_t wbuf, + qdf_nbuf_t nbuf, struct mgmt_rx_event_params *rx_params, enum mgmt_frame_type frm_type) { struct mon_rx_status txrx_status = {0}; struct ieee80211_frame *wh; tpSirMacFrameCtl pfc; - qdf_nbuf_t nbuf; - int buf_len; if (!(pkt_capture_get_pktcap_mode(psoc) & PKT_CAPTURE_MODE_MGMT_ONLY)) return QDF_STATUS_E_FAILURE; - buf_len = qdf_nbuf_len(wbuf); - nbuf = qdf_nbuf_alloc(NULL, roundup( - buf_len + RESERVE_BYTES, 4), - RESERVE_BYTES, 4, false); - if (!nbuf) - return QDF_STATUS_E_FAILURE; - - qdf_nbuf_put_tail(nbuf, buf_len); - qdf_mem_copy(qdf_nbuf_data(nbuf), qdf_nbuf_data(wbuf), buf_len); - pfc = (tpSirMacFrameCtl)(qdf_nbuf_data(nbuf)); wh = (struct ieee80211_frame *)qdf_nbuf_data(nbuf);