diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2023-06-14 09:18:31 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@kernel.org> | 2023-06-21 21:31:10 +0300 |
commit | 084f1f552f8dd8e8b993d14a30720b7484d77020 (patch) | |
tree | 5ecb96c9d57bee1a6d0f457d59035051548a8b89 /drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c | |
parent | d8aa21235d0342e6d0cc99f37d0771749e742e5a (diff) | |
download | linux-084f1f552f8dd8e8b993d14a30720b7484d77020.tar.xz |
wifi: rtlwifi: simplify LED management
Introduce 'rtl_init_sw_leds()' to replace per-chip LED
initialization code (and so drop 'struct rtl_led' as no
longer used), drop 'init_sw_leds' and 'deinit_sw_leds'
fields from 'struct rtl_hal_ops', adjust related code.
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/20230614061832.40882-1-dmantipov@yandex.ru
Diffstat (limited to 'drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c')
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c index df1e36fbc348..31a18bbface9 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c @@ -595,16 +595,16 @@ static void _rtl92de_gen_refresh_led_state(struct ieee80211_hw *hw) struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); - struct rtl_led *pled0 = &rtlpriv->ledctl.sw_led0; + enum rtl_led_pin pin0 = rtlpriv->ledctl.sw_led0; if (rtlpci->up_first_time) return; if (ppsc->rfoff_reason == RF_CHANGE_BY_IPS) - rtl92de_sw_led_on(hw, pled0); + rtl92de_sw_led_on(hw, pin0); else if (ppsc->rfoff_reason == RF_CHANGE_BY_INIT) - rtl92de_sw_led_on(hw, pled0); + rtl92de_sw_led_on(hw, pin0); else - rtl92de_sw_led_off(hw, pled0); + rtl92de_sw_led_off(hw, pin0); } static bool _rtl92de_init_mac(struct ieee80211_hw *hw) |