From d27325020737a4a9793c70239be05933507a780f Mon Sep 17 00:00:00 2001 From: Mohit Khanna Date: Mon, 12 Aug 2019 01:33:37 -0700 Subject: [PATCH] qcacmn: Handle Frag with no peer in RX path While handling a frag with no peer, donot set packet length as this is already done while handling the fragment before re-injection into the REO. Without this, qdf_nbuf_set_pktlen will fail while doing a skb_put on a non-linear packet. Also, donot use L2 header offset while doing a pull head for the RX frag. Change-Id: Ie1faeebf548b589ad524b31d51444c5934a7b976 CRs-Fixed: 2502756 --- dp/wifi3.0/dp_rx.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dp/wifi3.0/dp_rx.c b/dp/wifi3.0/dp_rx.c index b03146b98b10..363f980fe9a5 100644 --- a/dp/wifi3.0/dp_rx.c +++ b/dp/wifi3.0/dp_rx.c @@ -1616,10 +1616,14 @@ void dp_rx_deliver_to_stack_no_peer(struct dp_soc *soc, qdf_nbuf_t nbuf) msdu_len = QDF_NBUF_CB_RX_PKT_LEN(nbuf); pkt_len = msdu_len + l2_hdr_offset + RX_PKT_TLVS_LEN; - qdf_nbuf_set_pktlen(nbuf, pkt_len); - qdf_nbuf_pull_head(nbuf, - RX_PKT_TLVS_LEN + - l2_hdr_offset); + if (qdf_unlikely(qdf_nbuf_is_frag(nbuf))) { + qdf_nbuf_pull_head(nbuf, RX_PKT_TLVS_LEN); + } else { + qdf_nbuf_set_pktlen(nbuf, pkt_len); + qdf_nbuf_pull_head(nbuf, + RX_PKT_TLVS_LEN + + l2_hdr_offset); + } /* only allow special frames */ if (!dp_is_special_data(nbuf))