From 2c6381da6b1529d59c5f5551827a51aa11d21ace Mon Sep 17 00:00:00 2001 From: Dhanashri Atre Date: Thu, 30 Mar 2017 19:33:52 -0700 Subject: [PATCH] qcacmn: Add null check before invoking function Verify that the dbs function pointer in data path is valid. Change-Id: I2add5cf3b58ef52240d9cda01220ba444b7716ad CRs-Fixed: 2025317 --- dp/wifi3.0/dp_main.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index e4cd6a6856..e8b984f2db 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -1468,17 +1468,20 @@ static void dp_rxdma_ring_config(struct dp_soc *soc) pdev->rx_refill_buf_ring.hal_srng, RXDMA_BUF); - if (!soc->cdp_soc.ol_ops-> - is_hw_dbs_2x2_capable()) { - max_mac_rings = 1; - QDF_TRACE(QDF_MODULE_ID_TXRX, - QDF_TRACE_LEVEL_ERROR, - FL("DBS enabled, max_mac_rings %d\n"), - max_mac_rings); + if (soc->cdp_soc.ol_ops-> + is_hw_dbs_2x2_capable) { + if (!soc->cdp_soc.ol_ops-> + is_hw_dbs_2x2_capable()) { + max_mac_rings = 1; + QDF_TRACE(QDF_MODULE_ID_TXRX, + QDF_TRACE_LEVEL_ERROR, + FL("DBS disabled, max_mac_rings %d\n"), + max_mac_rings); + } } else { QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR, - FL("DBS disabled max_mac_rings %d\n"), + FL("DBS enabled max_mac_rings %d\n"), max_mac_rings); }