Browse Source

qcacmn: ignore l2_hdr_offset in rx path for raw mode

In case of raw mode HW does not set the l2 header offset.
ignore this field in rx for rawmode.

Change-Id: I6e08a9540f55fdb97b21e4939256e6e5b9076e77
CRs-Fixed: 2243850
Chaithanya Garrepalli 7 years ago
parent
commit
8aaf9b6959
1 changed files with 8 additions and 3 deletions
  1. 8 3
      dp/wifi3.0/dp_rx.c

+ 8 - 3
dp/wifi3.0/dp_rx.c

@@ -1303,7 +1303,8 @@ dp_rx_process(struct dp_intr *int_ctx, void *hal_ring, uint32_t quota)
 	qdf_nbuf_t nbuf, next;
 	union dp_rx_desc_list_elem_t *head[MAX_PDEV_CNT] = { NULL };
 	union dp_rx_desc_list_elem_t *tail[MAX_PDEV_CNT] = { NULL };
-	uint32_t rx_bufs_used = 0, rx_buf_cookie, l2_hdr_offset;
+	uint32_t rx_bufs_used = 0, rx_buf_cookie;
+	uint32_t l2_hdr_offset = 0;
 	uint16_t msdu_len;
 	uint16_t peer_id;
 	struct dp_peer *peer = NULL;
@@ -1580,8 +1581,12 @@ done:
 			FL("rxhash: flow id toeplitz: 0x%x\n"),
 			hal_rx_msdu_start_toeplitz_get(rx_tlv_hdr));
 
-		l2_hdr_offset =
-			hal_rx_msdu_end_l3_hdr_padding_get(rx_tlv_hdr);
+		/*L2 header offset will not be set in raw mode*/
+		if (qdf_likely(vdev->rx_decap_type !=
+				htt_cmn_pkt_type_raw)) {
+			l2_hdr_offset =
+				hal_rx_msdu_end_l3_hdr_padding_get(rx_tlv_hdr);
+		}
 
 		msdu_len = hal_rx_msdu_start_msdu_len_get(rx_tlv_hdr);
 		pkt_len = msdu_len + l2_hdr_offset + RX_PKT_TLVS_LEN;