From bb9b9ec90745332e971af8f4e0fe97ff14650a92 Mon Sep 17 00:00:00 2001 From: Surabhi Vishnoi Date: Tue, 9 Jun 2020 20:26:09 +0530 Subject: [PATCH] qcacmn: Compilation fixes when WLAN_CFR_ENABLE config is enabled For adrastea targets, enhanced CFR is not supported. When only CONFIG_WLAN_CFR_ENABLE is set, some compilation errors are observed as CONFIG_WLAN_ENH_CFR_ENABLE is not set true. Fix these compilation errors when only CONFIG_WLAN_CFR_ENABLE is set for targets which do not support enhanced CFR. Change-Id: I96a769d8f10144033e48e123bb68d48a54cdf8ab CRs-Fixed: 2706904 --- target_if/cfr/inc/target_if_cfr_6018.h | 4 ++-- target_if/cfr/src/target_if_cfr_6490.c | 4 ++++ target_if/direct_buf_rx/inc/target_if_direct_buf_rx_api.h | 4 +++- umac/cfr/dispatcher/src/wlan_cfr_ucfg_api.c | 7 +++++++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/target_if/cfr/inc/target_if_cfr_6018.h b/target_if/cfr/inc/target_if_cfr_6018.h index c186c689fe6a..95e8f8a2597d 100644 --- a/target_if/cfr/inc/target_if_cfr_6018.h +++ b/target_if/cfr/inc/target_if_cfr_6018.h @@ -326,14 +326,14 @@ void target_if_cfr_rx_tlv_process(struct wlan_objmgr_pdev *pdev, void *nbuf); */ void target_if_cfr_update_global_cfg(struct wlan_objmgr_pdev *pdev); #else -static QDF_STATUS cfr_6018_init_pdev( +static inline QDF_STATUS cfr_6018_init_pdev( struct wlan_objmgr_psoc *psoc, struct wlan_objmgr_pdev *pdev) { return QDF_STATUS_SUCCESS; } -static QDF_STATUS cfr_6018_deinit_pdev( +static inline QDF_STATUS cfr_6018_deinit_pdev( struct wlan_objmgr_psoc *psoc, struct wlan_objmgr_pdev *pdev) { diff --git a/target_if/cfr/src/target_if_cfr_6490.c b/target_if/cfr/src/target_if_cfr_6490.c index b85302decfd3..a6126b0e0577 100644 --- a/target_if/cfr/src/target_if_cfr_6490.c +++ b/target_if/cfr/src/target_if_cfr_6490.c @@ -33,6 +33,8 @@ #include "cfg_ucfg_api.h" #include "cfr_cfg.h" +#ifdef WLAN_ENH_CFR_ENABLE +#ifdef CFR_USE_FIXED_FOLDER static wdi_event_subscribe g_cfr_subscribe; static void target_cfr_callback(void *pdev_obj, enum WDI_EVENT event, @@ -116,6 +118,8 @@ target_if_cfr_subscribe_ppdu_desc(struct wlan_objmgr_pdev *pdev, return QDF_STATUS_SUCCESS; } +#endif +#endif QDF_STATUS cfr_6490_init_pdev(struct wlan_objmgr_psoc *psoc, struct wlan_objmgr_pdev *pdev) diff --git a/target_if/direct_buf_rx/inc/target_if_direct_buf_rx_api.h b/target_if/direct_buf_rx/inc/target_if_direct_buf_rx_api.h index 10882f2f2c2c..8671d550a351 100644 --- a/target_if/direct_buf_rx/inc/target_if_direct_buf_rx_api.h +++ b/target_if/direct_buf_rx/inc/target_if_direct_buf_rx_api.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -75,6 +75,7 @@ enum DBR_MODULE { DBR_MODULE_MAX, }; +#ifdef WMI_DBR_SUPPORT /** * struct direct_buf_rx_data - direct buffer rx data * @dbr_len: Length of the buffer DMAed @@ -92,6 +93,7 @@ struct direct_buf_rx_data { bool meta_data_valid; struct direct_buf_rx_metadata meta_data; }; +#endif /** * struct dbr_module_config - module configuration for dbr diff --git a/umac/cfr/dispatcher/src/wlan_cfr_ucfg_api.c b/umac/cfr/dispatcher/src/wlan_cfr_ucfg_api.c index 610d53e528c4..2c8ffbcc7a87 100644 --- a/umac/cfr/dispatcher/src/wlan_cfr_ucfg_api.c +++ b/umac/cfr/dispatcher/src/wlan_cfr_ucfg_api.c @@ -538,6 +538,7 @@ QDF_STATUS ucfg_cfr_set_reset_bitmap(struct wlan_objmgr_vdev *vdev, return status; } +#ifdef WLAN_ENH_CFR_ENABLE /* * This is needed only in case of m_ta_ra_filter mode. * After providing all the group configurations, user should provide @@ -567,6 +568,7 @@ QDF_STATUS ucfg_cfr_set_en_bitmap(struct wlan_objmgr_vdev *vdev, return status; } +#endif /* * Copy user provided input for ul_mu_user_mask into cfr_rcc_param. @@ -1096,6 +1098,7 @@ static void cfr_set_filter(struct wlan_objmgr_pdev *pdev, bool enable, filter_val); } +#ifdef WLAN_ENH_CFR_ENABLE /* * With the initiation of commit command, this handler will be triggered. * @@ -1286,6 +1289,7 @@ QDF_STATUS ucfg_cfr_set_rcc_mode(struct wlan_objmgr_vdev *vdev, return status; } +#endif bool ucfg_cfr_get_rcc_enabled(struct wlan_objmgr_vdev *vdev) { @@ -1304,9 +1308,12 @@ bool ucfg_cfr_get_rcc_enabled(struct wlan_objmgr_vdev *vdev) return rcc_enabled; } +#ifdef WLAN_ENH_CFR_ENABLE QDF_STATUS ucfg_cfr_subscribe_ppdu_desc(struct wlan_objmgr_pdev *pdev, bool is_subscribe) { return tgt_cfr_subscribe_ppdu_desc(pdev, is_subscribe); } #endif + +#endif