Browse Source

qcacmn: Place check under qdf_likely unlikely flag

Place if check inside qdf_likely and qdf_unlikely check
to optimize code through compiler.

Change-Id: I46796247fd09860aa0f62170eb7f7e5ef8e8f896
CRs-fixed: 2455579
Ankit Kumar 6 years ago
parent
commit
f2526d44ee
1 changed files with 2 additions and 2 deletions
  1. 2 2
      dp/wifi3.0/dp_rx.c

+ 2 - 2
dp/wifi3.0/dp_rx.c

@@ -189,7 +189,7 @@ QDF_STATUS dp_rx_buffers_replenish(struct dp_soc *dp_soc, uint32_t mac_id,
 					RX_BUFFER_ALIGNMENT,
 					FALSE);
 
-		if (!rx_netbuf) {
+		if (qdf_unlikely(!rx_netbuf)) {
 			DP_STATS_INC(dp_pdev, replenish.nbuf_alloc_fail, 1);
 			continue;
 		}
@@ -2153,7 +2153,7 @@ done:
 				continue;
 			}
 			/* WDS Source Port Learning */
-			if (vdev->wds_enabled)
+			if (qdf_likely(vdev->wds_enabled))
 				dp_rx_wds_srcport_learn(soc, rx_tlv_hdr,
 							peer, nbuf);