summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimanshu Agarwal <himanaga@codeaurora.org>2017-02-03 17:27:22 +0530
committerqcabuildsw <qcabuildsw@localhost>2017-02-09 01:28:10 -0800
commit2706504b3c0de20d62ffc320a5e51d9ce22ebefa (patch)
tree1a617a443df5f56d93401de5dd19960672aa5ed4
parentebd7a777315d3fff8b2566b56cd146334d75652c (diff)
qcacld-3.0: Use functions directly for cloning instead of a func. pointer
Use functions directly for cloning instead of a func. pointer as qdf_nbuf_clone API has different signature when MEMORY_DEBUG is enabled and when it is not. Change-Id: I95fa6e7b2789dd97c0c500d0854210240feaac17 CRs-Fixed: 1114632
-rw-r--r--core/dp/htt/htt_rx.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/core/dp/htt/htt_rx.c b/core/dp/htt/htt_rx.c
index 5a23681ba05b..6e9c735a66d3 100644
--- a/core/dp/htt/htt_rx.c
+++ b/core/dp/htt/htt_rx.c
@@ -2285,7 +2285,6 @@ htt_rx_restitch_mpdu_from_msdus(htt_pdev_handle pdev,
{
qdf_nbuf_t msdu, mpdu_buf, prev_buf, msdu_orig, head_frag_list_cloned;
- qdf_nbuf_t (*clone_nbuf_fn)(qdf_nbuf_t buf);
unsigned decap_format, wifi_hdr_len, sec_hdr_len, msdu_llc_len,
mpdu_buf_len, decap_hdr_pull_bytes, frag_list_sum_len, dir,
is_amsdu, is_first_frag, amsdu_pad, msdu_len;
@@ -2295,12 +2294,6 @@ htt_rx_restitch_mpdu_from_msdus(htt_pdev_handle pdev,
struct ieee80211_frame *wh;
struct ieee80211_qoscntl *qos;
- /* If this packet does not go up the normal stack path we dont need to
- * waste cycles cloning the packets
- */
- clone_nbuf_fn =
- clone_not_reqd ? htt_rx_qdf_noclone_buf : qdf_nbuf_clone;
-
/* The nbuf has been pulled just beyond the status and points to the
* payload
*/
@@ -2330,7 +2323,10 @@ htt_rx_restitch_mpdu_from_msdus(htt_pdev_handle pdev,
/* Note that this path might suffer from headroom unavailabilty,
* but the RX status is usually enough
*/
- mpdu_buf = clone_nbuf_fn(head_msdu);
+ if (clone_not_reqd)
+ mpdu_buf = htt_rx_qdf_noclone_buf(head_msdu);
+ else
+ mpdu_buf = qdf_nbuf_clone(head_msdu);
prev_buf = mpdu_buf;
@@ -2347,7 +2343,11 @@ htt_rx_restitch_mpdu_from_msdus(htt_pdev_handle pdev,
while (msdu_orig) {
/* TODO: intra AMSDU padding - do we need it ??? */
- msdu = clone_nbuf_fn(msdu_orig);
+ if (clone_not_reqd)
+ msdu = htt_rx_qdf_noclone_buf(msdu_orig);
+ else
+ msdu = qdf_nbuf_clone(msdu_orig);
+
if (!msdu)
goto mpdu_stitch_fail;
@@ -2465,7 +2465,11 @@ htt_rx_restitch_mpdu_from_msdus(htt_pdev_handle pdev,
/* TODO: intra AMSDU padding - do we need it ??? */
- msdu = clone_nbuf_fn(msdu_orig);
+ if (clone_not_reqd)
+ msdu = htt_rx_qdf_noclone_buf(msdu_orig);
+ else
+ msdu = qdf_nbuf_clone(msdu_orig);
+
if (!msdu)
goto mpdu_stitch_fail;