wifi: rtlwifi: cleanup struct rtl_hal
authorDmitry Antipov <dmantipov@yandex.ru>
Mon, 23 Oct 2023 09:17:04 +0000 (12:17 +0300)
committerKalle Valo <kvalo@kernel.org>
Mon, 30 Oct 2023 17:21:22 +0000 (19:21 +0200)
Remove unused and set but otherwise unused 'bbrf_ready', 'external_pa',
'pa_mode', 'rx_tag', 'rts_en', 'wow_enable' and 'wow_enabled' fields
of 'struct rtl_hal', adjust related code. Compile tested only.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20231023091722.52509-1-dmantipov@yandex.ru
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c
drivers/net/wireless/realtek/rtlwifi/wifi.h

index 5a828a934fe9b1bf0da0ccf2242a7e9df60ee66f..fad132512a20fe4853febd8b711b1c4f5ff4cfda 100644 (file)
@@ -432,10 +432,8 @@ static void rtl92ee_dm_check_rssi_monitor(struct ieee80211_hw *hw)
 static void rtl92ee_dm_init_primary_cca_check(struct ieee80211_hw *hw)
 {
        struct rtl_priv *rtlpriv = rtl_priv(hw);
-       struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
        struct dynamic_primary_cca *primarycca = &rtlpriv->primarycca;
 
-       rtlhal->rts_en = 0;
        primarycca->dup_rts_flag = 0;
        primarycca->intf_flag = 0;
        primarycca->intf_type = 0;
@@ -615,13 +613,11 @@ static void rtl92ee_dm_dynamic_primary_cca_ckeck(struct ieee80211_hw *hw)
                                rtl92ee_dm_write_dynamic_cca(hw, cur_mf_state);
                                primarycca->pricca_flag = 1;
                                primarycca->dup_rts_flag = 1;
-                               rtlpriv->rtlhal.rts_en = 1;
                        } else {
                                primarycca->intf_type = 0;
                                primarycca->intf_flag = 0;
                                cur_mf_state = MF_USC_LSC;
                                rtl92ee_dm_write_dynamic_cca(hw, cur_mf_state);
-                               rtlpriv->rtlhal.rts_en = 0;
                                primarycca->dup_rts_flag = 0;
                        }
                } else if (sec_ch_offset == 1) {
@@ -642,13 +638,11 @@ static void rtl92ee_dm_dynamic_primary_cca_ckeck(struct ieee80211_hw *hw)
                                rtl92ee_dm_write_dynamic_cca(hw, cur_mf_state);
                                primarycca->pricca_flag = 1;
                                primarycca->dup_rts_flag = 1;
-                               rtlpriv->rtlhal.rts_en = 1;
                        } else {
                                primarycca->intf_type = 0;
                                primarycca->intf_flag = 0;
                                cur_mf_state = MF_USC_LSC;
                                rtl92ee_dm_write_dynamic_cca(hw, cur_mf_state);
-                               rtlpriv->rtlhal.rts_en = 0;
                                primarycca->dup_rts_flag = 0;
                        }
                }
@@ -660,7 +654,6 @@ static void rtl92ee_dm_dynamic_primary_cca_ckeck(struct ieee80211_hw *hw)
                        cur_mf_state = MF_USC_LSC;
                        /* default */
                        rtl92ee_dm_write_dynamic_cca(hw, cur_mf_state);
-                       rtlpriv->rtlhal.rts_en = 0;
                        primarycca->dup_rts_flag = 0;
                        primarycca->intf_type = 0;
                        primarycca->intf_flag = 0;
index ebb7abd0c9adf7adb8eeb8e5761dd3b10c2b6176..d4da5cdc84143b18c8d433726129d86fe44886a6 100644 (file)
@@ -1320,7 +1320,6 @@ int rtl92ee_hw_init(struct ieee80211_hw *hw)
                err = 1;
                return err;
        }
-       rtlhal->rx_tag = 0;
        rtl_write_word(rtlpriv, REG_PCIE_CTRL_REG, 0x8000);
        err = rtl92ee_download_fw(hw, false);
        if (err) {
index 31a481f43a07d759ad95260e46e503cf4cae65b2..1f316329683632f2a1919541d03b8c8829d53b89 100644 (file)
@@ -1610,7 +1610,6 @@ struct rtl_hal {
        bool up_first_time;
        bool first_init;
        bool being_init_adapter;
-       bool bbrf_ready;
        bool mac_func_enable;
        bool pre_edcca_enable;
        struct bt_coexist_8723 hal_coex_8723;
@@ -1623,9 +1622,7 @@ struct rtl_hal {
        u8 state;               /*stop 0, start 1 */
        u8 board_type;
        u8 package_type;
-       u8 external_pa;
 
-       u8 pa_mode;
        u8 pa_type_2g;
        u8 pa_type_5g;
        u8 lna_type_2g;
@@ -1691,14 +1688,9 @@ struct rtl_hal {
        bool master_of_dmsp;
        bool slave_of_dmsp;
 
-       u16 rx_tag;/*for 92ee*/
-       u8 rts_en;
-
        /*for wowlan*/
-       bool wow_enable;
        bool enter_pnp_sleep;
        bool wake_from_pnp_sleep;
-       bool wow_enabled;
        time64_t last_suspend_sec;
        u32 wowlan_fwsize;
        u8 *wowlan_firmware;