mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
qcacmn: Fix the null check before invoking function
Fix the logic that verifies that the dbs function pointer in data path is valid. Change-Id: I35418f2a66eb2d4b44260b005ab0d927d91eeac7 CRs-Fixed: 2025317
This commit is contained in:
parent
cbe44a82a7
commit
398935eb56
1 changed files with 12 additions and 9 deletions
|
|
@ -1460,6 +1460,7 @@ static void dp_rxdma_ring_config(struct dp_soc *soc)
|
|||
if (pdev) {
|
||||
int mac_id = 0;
|
||||
int j;
|
||||
bool dbs_enable = 0;
|
||||
int max_mac_rings =
|
||||
wlan_cfg_get_num_mac_rings
|
||||
(pdev->wlan_cfg_ctx);
|
||||
|
|
@ -1470,18 +1471,20 @@ static void dp_rxdma_ring_config(struct dp_soc *soc)
|
|||
|
||||
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);
|
||||
}
|
||||
dbs_enable = soc->cdp_soc.ol_ops->
|
||||
is_hw_dbs_2x2_capable();
|
||||
}
|
||||
|
||||
if (dbs_enable) {
|
||||
QDF_TRACE(QDF_MODULE_ID_TXRX,
|
||||
QDF_TRACE_LEVEL_ERROR,
|
||||
FL("DBS enabled max_mac_rings %d\n"),
|
||||
max_mac_rings);
|
||||
} else {
|
||||
max_mac_rings = 1;
|
||||
QDF_TRACE(QDF_MODULE_ID_TXRX,
|
||||
QDF_TRACE_LEVEL_ERROR,
|
||||
FL("DBS enabled max_mac_rings %d\n"),
|
||||
FL("DBS disabled, max_mac_rings %d\n"),
|
||||
max_mac_rings);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue