diff options
author | Shashikala Prabhu <pshashik@codeaurora.org> | 2017-12-12 20:53:32 +0530 |
---|---|---|
committer | snandini <snandini@codeaurora.org> | 2017-12-22 23:24:41 -0800 |
commit | 153b2881cf27b3851dd108289968d32cd1d9689e (patch) | |
tree | 281ddc975210109b1a16bc72b0c5450924386c6f /target_if | |
parent | d8532ff2a05a4e7f29433f275530c9ab1c0c2b85 (diff) | |
download | qca-wfi-host-cmn-153b2881cf27b3851dd108289968d32cd1d9689e.tar.gz |
qcacmn: Do not allocate DFS object for 2GHz radio
DFS is applicable only for 5GHz radio. Therefore, do not
allocate DFS object for 2GHz radio.
Change-Id: I5e8aec0c876e7862890fae689950bfbb4eae5255
CRs-Fixed: 2153493
Diffstat (limited to 'target_if')
-rw-r--r-- | target_if/dfs/src/target_if_dfs.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/target_if/dfs/src/target_if_dfs.c b/target_if/dfs/src/target_if_dfs.c index 2ae600b60..e891690ed 100644 --- a/target_if/dfs/src/target_if_dfs.c +++ b/target_if/dfs/src/target_if_dfs.c @@ -229,6 +229,29 @@ static QDF_STATUS target_process_bang_radar_cmd( return status; } +static QDF_STATUS target_if_dfs_is_pdev_5ghz(struct wlan_objmgr_pdev *pdev, + bool *is_5ghz) +{ + struct wlan_objmgr_psoc *psoc; + uint8_t pdev_id; + + psoc = wlan_pdev_get_psoc(pdev); + if (!psoc) { + target_if_err("dfs: null psoc"); + return QDF_STATUS_E_FAILURE; + } + + pdev_id = wlan_objmgr_pdev_get_pdev_id(pdev); + + if (psoc->ext_service_param.reg_cap[pdev_id].wireless_modes & + WMI_HOST_REGDMN_MODE_11A) + *is_5ghz = true; + else + *is_5ghz = false; + + return QDF_STATUS_SUCCESS; +} + QDF_STATUS target_if_register_dfs_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops) { struct wlan_lmac_if_dfs_tx_ops *dfs_tx_ops; @@ -243,6 +266,7 @@ QDF_STATUS target_if_register_dfs_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops) dfs_tx_ops->dfs_process_emulate_bang_radar_cmd = &target_process_bang_radar_cmd; + dfs_tx_ops->dfs_is_pdev_5ghz = &target_if_dfs_is_pdev_5ghz; return QDF_STATUS_SUCCESS; } |