Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ec748e3 authored by Yeshwanth Sriram Guntuka's avatar Yeshwanth Sriram Guntuka Committed by Madan Koyyalamudi
Browse files

qcacmn: Check for msdu len err only when msdu cont bit is 0

If an MSDU is scattered across multiple nbufs, rx
attention tlvs are only valid for the last nbuf for
this MSDU. MSDU len err field is fetched from rx
attention tlvs for all the nbufs which could result
in an incorrect drop of packets.

Fix is to check for msdu len err for nbufs with msdu
continuation bit set to 0.

Change-Id: I0ed5cbb37a2ba34a39328618e3f5e66d419d7cca
CRs-Fixed: 2982308
parent 8327d7ec
Loading
Loading
Loading
Loading
+19 −18
Original line number Diff line number Diff line
@@ -2710,13 +2710,6 @@ uint32_t dp_rx_process(struct dp_intr *int_ctx, hal_ring_handle_t hal_ring_hdl,
		vdev_id = QDF_NBUF_CB_RX_VDEV_ID(nbuf);
		peer_id =  QDF_NBUF_CB_RX_PEER_ID(nbuf);

		if (qdf_unlikely(hal_rx_attn_msdu_len_err_get(rx_tlv_hdr))) {
			DP_STATS_INC(soc, rx.err.msdu_len_err, 1);
			qdf_nbuf_free(nbuf);
			nbuf = next;
			continue;
		}

		if (dp_rx_is_list_ready(deliver_list_head, vdev, peer,
					peer_id, vdev_id)) {
			dp_rx_deliver_to_stack(soc, vdev, peer,
@@ -2790,18 +2783,26 @@ uint32_t dp_rx_process(struct dp_intr *int_ctx, hal_ring_handle_t hal_ring_hdl,
		 * Check if DMA completed -- msdu_done is the last bit
		 * to be written
		 */
		if (qdf_unlikely(!qdf_nbuf_is_rx_chfrag_cont(nbuf) &&
				 !hal_rx_attn_msdu_done_get(rx_tlv_hdr))) {
			dp_err("MSDU DONE failure");
		if (qdf_likely(!qdf_nbuf_is_rx_chfrag_cont(nbuf))) {
			if (qdf_unlikely(!hal_rx_attn_msdu_done_get(
								 rx_tlv_hdr))) {
				dp_err_rl("MSDU DONE failure");
				DP_STATS_INC(soc, rx.err.msdu_done_fail, 1);
				hal_rx_dump_pkt_tlvs(hal_soc, rx_tlv_hdr,
						     QDF_TRACE_LEVEL_INFO);
				tid_stats->fail_cnt[MSDU_DONE_FAILURE]++;
			qdf_nbuf_free(nbuf);
				qdf_assert(0);
				qdf_nbuf_free(nbuf);
				nbuf = next;
				continue;
			} else if (qdf_unlikely(hal_rx_attn_msdu_len_err_get(
								 rx_tlv_hdr))) {
				DP_STATS_INC(soc, rx.err.msdu_len_err, 1);
				qdf_nbuf_free(nbuf);
				nbuf = next;
				continue;
			}
		}

		DP_HIST_PACKET_COUNT_INC(vdev->pdev->pdev_id);
		/*