Browse Source

qcacmn: Free buffers if MPDU restitch fails

In case of monitor mode, if MPDU restitch fails,
Free all rxdma buffers from head msdu to tail msdu

Change-Id: I852b6095638578a48c07a6fb5d221ead40c5ffde
CRs-Fixed: 2657983
Amir 5 years ago
parent
commit
43b866f124
1 changed files with 6 additions and 0 deletions
  1. 6 0
      dp/wifi3.0/dp_rx_mon_dest.c

+ 6 - 0
dp/wifi3.0/dp_rx_mon_dest.c

@@ -1435,6 +1435,12 @@ QDF_STATUS dp_rx_mon_deliver(struct dp_soc *soc, uint32_t mac_id,
 	mon_mpdu = dp_rx_mon_restitch_mpdu(soc, mac_id, head_msdu,
 					   tail_msdu, rs);
 
+	/* If MPDU restitch fails, free buffers*/
+	if (!mon_mpdu) {
+		dp_info("MPDU restitch failed, free buffers");
+		goto mon_deliver_fail;
+	}
+
 	/* monitor vap cannot be present when mcopy is enabled
 	 * hence same skb can be consumed
 	 */