Browse Source

qcacld-3.0: Check for null deliver function in fisa

Consider case where vdev is valid but deliver function
callback is deregistered. Check for null delivery function.

Change-Id: If17f1d680a10c2009a910172a66cd8dcf7cdffbd
CRs-Fixed: 2613162
Manjunathappa Prakash 5 years ago
parent
commit
a79c85f229
1 changed files with 10 additions and 3 deletions
  1. 10 3
      core/dp/txrx3.0/dp_fisa_rx.c

+ 10 - 3
core/dp/txrx3.0/dp_fisa_rx.c

@@ -801,11 +801,15 @@ dp_rx_fisa_flush_udp_flow(struct dp_vdev *vdev,
 	dp_fisa_debug("fisa_flow->curr_aggr %d", fisa_flow->cur_aggr);
 	linear_skb = dp_fisa_rx_linear_skb(vdev, fisa_flow->head_skb, 24000);
 	if (linear_skb) {
-		vdev->osif_rx(vdev->osif_vdev, linear_skb);
+		if (qdf_likely(vdev->osif_rx))
+			vdev->osif_rx(vdev->osif_vdev, linear_skb);
 		/* Free non linear skb */
 		qdf_nbuf_free(fisa_flow->head_skb);
 	} else {
-		vdev->osif_rx(vdev->osif_vdev, fisa_flow->head_skb);
+		if (qdf_likely(vdev->osif_rx))
+			vdev->osif_rx(vdev->osif_vdev, fisa_flow->head_skb);
+		else
+			qdf_nbuf_free(fisa_flow->head_skb);
 	}
 
 out:
@@ -1046,7 +1050,10 @@ pull_nbuf:
 deliver_nbuf: /* Deliver without FISA */
 		qdf_nbuf_set_next(head_nbuf, NULL);
 		hex_dump_skb_data(head_nbuf, false);
-		vdev->osif_rx(vdev->osif_vdev, head_nbuf);
+		if (qdf_likely(vdev->osif_rx))
+			vdev->osif_rx(vdev->osif_vdev, head_nbuf);
+		else
+			qdf_nbuf_free(head_nbuf);
 next_msdu:
 		head_nbuf = next_nbuf;
 	}