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
This commit is contained in:
Ankit Kumar 2019-05-02 15:13:27 +05:30
commit f2526d44ee

View file

@ -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);