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
This commit is contained in:
Jeff Johnson 2019-03-26 09:51:30 -07:00 committed by nshrivas
parent 6c3368392b
commit b91e2d9eeb
2 changed files with 7 additions and 10 deletions

View File

@ -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,

View File

@ -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,