From b91e2d9eeb6f0d72830eb7fdc77406c9c58898c5 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Tue, 26 Mar 2019 09:51:30 -0700 Subject: [PATCH] qcacld-3.0: Properly featurize sap_update_unsafe_channel_list() Function sap_update_unsafe_channel_list() is conditional upon feature flag FEATURE_WLAN_CH_AVOID. However there isn't a stub implementation for when the feature is not enabled, and as a result in-function conditional compilation is required at the call site. This is contrary to the coding style, so introduce a stub implementation for when the feature is not present. In addition make this function static since the scope is local to a single source file. Change-Id: I12f010ac8f6d2cb63794e3295977bfac4266cca1 CRs-Fixed: 2423728 --- core/sap/src/sap_ch_select.c | 12 +++++++----- core/sap/src/sap_internal.h | 5 ----- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/core/sap/src/sap_ch_select.c b/core/sap/src/sap_ch_select.c index 98c88e5c7577..8401fe1d6bd1 100644 --- a/core/sap/src/sap_ch_select.c +++ b/core/sap/src/sap_ch_select.c @@ -407,8 +407,8 @@ static void sap_process_avoid_ie(mac_handle_t mac_handle, RETURN VALUE NULL ============================================================================*/ -void sap_update_unsafe_channel_list(mac_handle_t mac_handle, - struct sap_context *sap_ctx) +static void sap_update_unsafe_channel_list(mac_handle_t mac_handle, + struct sap_context *sap_ctx) { uint16_t i, j; uint16_t unsafe_channel_list[NUM_CHANNELS]; @@ -471,7 +471,11 @@ void sap_update_unsafe_channel_list(mac_handle_t mac_handle, return; } - +#else +static void sap_update_unsafe_channel_list(mac_handle_t mac_handle, + struct sap_context *sap_ctx) +{ +} #endif /* FEATURE_WLAN_CH_AVOID */ /** @@ -2652,9 +2656,7 @@ uint8_t sap_select_channel(mac_handle_t mac_handle, QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH, "In %s, Running SAP Ch Select", __func__); -#ifdef FEATURE_WLAN_CH_AVOID sap_update_unsafe_channel_list(mac_handle, sap_ctx); -#endif /* * If ACS weight is not enabled on noise_floor/channel_free/tx_power, diff --git a/core/sap/src/sap_internal.h b/core/sap/src/sap_internal.h index d21c5f159219..654a518f3661 100644 --- a/core/sap/src/sap_internal.h +++ b/core/sap/src/sap_internal.h @@ -293,11 +293,6 @@ bool sap_search_mac_list(struct qdf_mac_addr *macList, uint8_t num_mac, uint8_t *peerMac, uint8_t *index); -#ifdef FEATURE_WLAN_CH_AVOID -void sap_update_unsafe_channel_list(mac_handle_t mac_handle, - struct sap_context *sap_ctx); -#endif /* FEATURE_WLAN_CH_AVOID */ - QDF_STATUS sap_init_dfs_channel_nol_list(struct sap_context *sap_ctx); bool sap_dfs_is_channel_in_nol_list(struct sap_context *sap_ctx,