From 5fe4fff674f1c4c87bb5c1508e28a43f75ee76c5 Mon Sep 17 00:00:00 2001 From: Sevan Janiyan Date: Tue, 4 Oct 2022 19:32:45 +0100 Subject: [PATCH] Add CONFIG_RTW_ACS/CONFIG_RTW_ACS_DBG guards while here zap some unused variable declarations. --- core/rtw_mlme.c | 2 ++ hal/hal_dm_acs.c | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/rtw_mlme.c b/core/rtw_mlme.c index 3bd19c3..0f2bb31 100644 --- a/core/rtw_mlme.c +++ b/core/rtw_mlme.c @@ -1563,7 +1563,9 @@ void rtw_survey_event_callback(_adapter *adapter, u8 *pbuf) void rtw_surveydone_event_callback(_adapter *adapter, u8 *pbuf) { _irqL irqL; +#ifdef CONFIG_RTW_ACS struct surveydone_event *parm = (struct surveydone_event *)pbuf; +#endif struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); #ifdef CONFIG_RTW_80211R struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv; diff --git a/hal/hal_dm_acs.c b/hal/hal_dm_acs.c index 5c19d99..c95a8f7 100644 --- a/hal/hal_dm_acs.c +++ b/hal/hal_dm_acs.c @@ -22,7 +22,6 @@ static void _rtw_bss_nums_count(_adapter *adapter, u8 *pbss_nums) struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); _queue *queue = &(pmlmepriv->scanned_queue); struct wlan_network *pnetwork = NULL; - HAL_DATA_TYPE *hal_data = GET_HAL_DATA(adapter); _list *plist, *phead; _irqL irqL; @@ -115,8 +114,6 @@ void rtw_acs_adv_setting(_adapter *adapter, RT_SCAN_TYPE scan_type, u16 scan_tim { HAL_DATA_TYPE *hal_data = GET_HAL_DATA(adapter); struct auto_chan_sel *pacs = &hal_data->acs; - struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv; - struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; pacs->scan_type = scan_type; pacs->scan_time = scan_time; @@ -274,9 +271,11 @@ void _rtw_phydm_acs_select_best_chan(_adapter *adapter) void rtw_acs_info_dump(void *sel, _adapter *adapter) { HAL_DATA_TYPE *hal_data = GET_HAL_DATA(adapter); +#ifdef CONFIG_RTW_ACS_DBG struct rf_ctl_t *rfctl = adapter_to_rfctl(adapter); u8 max_chan_nums = rfctl->max_chan_nums; u8 ch_idx, ch_num; +#endif _RTW_PRINT_SEL(sel, "========== ACS (VER-%d) ==========\n", RTK_ACS_VERSION); _RTW_PRINT_SEL(sel, "Best 24G Channel:%d\n", hal_data->acs.best_chan_24g);