From 42c974a68d9460df2ff7d58bd23b48f069cf0098 Mon Sep 17 00:00:00 2001 From: Pavankumar Nandeshwar Date: Wed, 26 Aug 2020 13:21:27 +0530 Subject: [PATCH] qcacmn: Target_if changes for QCN9100 bringup Initial changes for bring up of QCN9100 in target_if layer Change-Id: I216cb52001b6e0c87a1c4b45990aad0ea83b4933 --- target_if/cfr/src/target_if_cfr.c | 2 ++ target_if/core/inc/target_if.h | 8 ++++++++ target_if/core/src/target_if_main.c | 8 ++++++++ target_if/init_deinit/src/service_ready_util.c | 1 + target_if/spectral/target_if_spectral.c | 7 ++++++- umac/dfs/core/src/misc/dfs.c | 10 ++++++++-- .../lmac_if/inc/wlan_lmac_if_def.h | 2 ++ 7 files changed, 35 insertions(+), 3 deletions(-) diff --git a/target_if/cfr/src/target_if_cfr.c b/target_if/cfr/src/target_if_cfr.c index aae4c2d1f0..5fa8f51c69 100644 --- a/target_if/cfr/src/target_if_cfr.c +++ b/target_if/cfr/src/target_if_cfr.c @@ -365,6 +365,7 @@ int target_if_cfr_init_pdev(struct wlan_objmgr_psoc *psoc, return cfr_wifi2_0_init_pdev(psoc, pdev); } else if ((target_type == TARGET_TYPE_QCA6018) || (target_type == TARGET_TYPE_QCN9000) || + (target_type == TARGET_TYPE_QCN9100) || (target_type == TARGET_TYPE_QCA5018)) { pa->is_cfr_capable = cfr_sc->is_cfr_capable; return cfr_enh_init_pdev(psoc, pdev); @@ -393,6 +394,7 @@ int target_if_cfr_deinit_pdev(struct wlan_objmgr_psoc *psoc, return cfr_wifi2_0_deinit_pdev(psoc, pdev); } else if ((target_type == TARGET_TYPE_QCA6018) || (target_type == TARGET_TYPE_QCN9000) || + (target_type == TARGET_TYPE_QCN9100) || (target_type == TARGET_TYPE_QCA5018)) { return cfr_enh_deinit_pdev(psoc, pdev); } else diff --git a/target_if/core/inc/target_if.h b/target_if/core/inc/target_if.h index e10bce7e03..081a2e6c81 100644 --- a/target_if/core/inc/target_if.h +++ b/target_if/core/inc/target_if.h @@ -530,6 +530,14 @@ bool target_is_tgt_type_adrastea(uint32_t target_type); */ bool target_is_tgt_type_qcn9000(uint32_t target_type); +/** + * target_is_tgt_type_qcn9100() - Check if the target type is QCN9100 (Spruce) + * @target_type: target type to be checked. + * + * Return: true if the target_type is QCN9100, else false. + */ +bool target_is_tgt_type_qcn9100(uint32_t target_type); + /** * target_psoc_set_wlan_init_status() - set info wlan_init_status * @psoc_info: pointer to structure target_psoc_info diff --git a/target_if/core/src/target_if_main.c b/target_if/core/src/target_if_main.c index 44878de826..5d1565e1d6 100644 --- a/target_if/core/src/target_if_main.c +++ b/target_if/core/src/target_if_main.c @@ -408,6 +408,9 @@ static void target_if_target_tx_ops_register( target_tx_ops->tgt_is_tgt_type_qcn9000 = target_is_tgt_type_qcn9000; + target_tx_ops->tgt_is_tgt_type_qcn9100 = + target_is_tgt_type_qcn9100; + target_tx_ops->tgt_get_tgt_type = lmac_get_tgt_type; @@ -680,6 +683,11 @@ bool target_is_tgt_type_qcn9000(uint32_t target_type) return target_type == TARGET_TYPE_QCN9000; } +bool target_is_tgt_type_qcn9100(uint32_t target_type) +{ + return target_type == TARGET_TYPE_QCN9100; +} + QDF_STATUS target_pdev_is_scan_radio_supported(struct wlan_objmgr_pdev *pdev, bool *is_scan_radio_supported) diff --git a/target_if/init_deinit/src/service_ready_util.c b/target_if/init_deinit/src/service_ready_util.c index 419004492b..d5579ecb77 100644 --- a/target_if/init_deinit/src/service_ready_util.c +++ b/target_if/init_deinit/src/service_ready_util.c @@ -891,6 +891,7 @@ QDF_STATUS init_deinit_validate_160_80p80_fw_caps( if ((tgt_hdl->info.target_type == TARGET_TYPE_QCA8074) || (tgt_hdl->info.target_type == TARGET_TYPE_QCA8074V2) || + (tgt_hdl->info.target_type == TARGET_TYPE_QCN9100) || (tgt_hdl->info.target_type == TARGET_TYPE_QCA6290)) { /** * Return true for now. This is not available in diff --git a/target_if/spectral/target_if_spectral.c b/target_if/spectral/target_if_spectral.c index 8aa1772a54..f209288bfd 100644 --- a/target_if/spectral/target_if_spectral.c +++ b/target_if/spectral/target_if_spectral.c @@ -2160,6 +2160,7 @@ target_if_spectral_len_adj_swar_init(struct spectral_fft_bin_len_adj_swar *swar, { if (target_type == TARGET_TYPE_QCA8074V2 || target_type == TARGET_TYPE_QCN9000 || + target_type == TARGET_TYPE_QCN9100 || target_type == TARGET_TYPE_QCA5018 || target_type == TARGET_TYPE_QCA6750 || target_type == TARGET_TYPE_QCA6490) @@ -2174,6 +2175,7 @@ target_if_spectral_len_adj_swar_init(struct spectral_fft_bin_len_adj_swar *swar, if (target_type == TARGET_TYPE_QCA8074 || target_type == TARGET_TYPE_QCA8074V2 || target_type == TARGET_TYPE_QCA6018 || + target_type == TARGET_TYPE_QCN9100 || target_type == TARGET_TYPE_QCA5018 || target_type == TARGET_TYPE_QCN9000 || target_type == TARGET_TYPE_QCA6490) { @@ -2184,7 +2186,8 @@ target_if_spectral_len_adj_swar_init(struct spectral_fft_bin_len_adj_swar *swar, swar->null_fftbin_adj = 0; } - if (target_type == TARGET_TYPE_QCA8074V2) + if ((target_type == TARGET_TYPE_QCA8074V2) || + (target_type == TARGET_TYPE_QCN9100)) swar->packmode_fftbin_size_adj = 1; else swar->packmode_fftbin_size_adj = 0; @@ -2379,6 +2382,7 @@ target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev) target_type == TARGET_TYPE_QCA6018 || target_type == TARGET_TYPE_QCA5018 || target_type == TARGET_TYPE_QCA6390 || + target_type == TARGET_TYPE_QCN9100 || target_type == TARGET_TYPE_QCA6490 || target_type == TARGET_TYPE_QCN9000 || target_type == TARGET_TYPE_QCA6750) @@ -2392,6 +2396,7 @@ target_if_pdev_spectral_init(struct wlan_objmgr_pdev *pdev) (target_type == TARGET_TYPE_QCA8074V2) || (target_type == TARGET_TYPE_QCA6018) || (target_type == TARGET_TYPE_QCA5018) || + (target_type == TARGET_TYPE_QCN9100) || (target_type == TARGET_TYPE_QCN9000) || (target_type == TARGET_TYPE_QCA6290) || (target_type == TARGET_TYPE_QCA6390) || diff --git a/umac/dfs/core/src/misc/dfs.c b/umac/dfs/core/src/misc/dfs.c index 1bd213c2e8..8f1f92263c 100644 --- a/umac/dfs/core/src/misc/dfs.c +++ b/umac/dfs/core/src/misc/dfs.c @@ -978,8 +978,14 @@ bool dfs_is_true_160mhz_supported(struct wlan_dfs *dfs) } target_type = lmac_get_target_type(dfs->dfs_pdev_obj); tgt_tx_ops = &tx_ops->target_tx_ops; - if (tgt_tx_ops->tgt_is_tgt_type_qcn9000) - return tgt_tx_ops->tgt_is_tgt_type_qcn9000(target_type); + if (tgt_tx_ops->tgt_is_tgt_type_qcn9000 && + tgt_tx_ops->tgt_is_tgt_type_qcn9000(target_type)) + return true; + + if (tgt_tx_ops->tgt_is_tgt_type_qcn9100 && + tgt_tx_ops->tgt_is_tgt_type_qcn9100(target_type)) + return true; + return false; } diff --git a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h index 10172a384b..42f777ed07 100644 --- a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h +++ b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h @@ -974,6 +974,7 @@ struct wlan_lmac_if_dfs_tx_ops { * @tgt_is_tgt_type_qca9888: To check QCA9888 target type. * @tgt_is_tgt_type_adrastea: To check QCS40X target type. * @tgt_is_tgt_type_qcn9000: To check QCN9000 (Pine) target type. + * @tgt_is_tgt_type_qcn9100: To check QCN9100 (Spruce) target type. * @tgt_get_tgt_type: Get target type * @tgt_get_tgt_version: Get target version * @tgt_get_tgt_revision: Get target revision @@ -985,6 +986,7 @@ struct wlan_lmac_if_target_tx_ops { bool (*tgt_is_tgt_type_qca9888)(uint32_t); bool (*tgt_is_tgt_type_adrastea)(uint32_t); bool (*tgt_is_tgt_type_qcn9000)(uint32_t); + bool (*tgt_is_tgt_type_qcn9100)(uint32_t); uint32_t (*tgt_get_tgt_type)(struct wlan_objmgr_psoc *psoc); uint32_t (*tgt_get_tgt_version)(struct wlan_objmgr_psoc *psoc); uint32_t (*tgt_get_tgt_revision)(struct wlan_objmgr_psoc *psoc);