wifi: rtlwifi: Remove rtl_intf_ops.read_efuse_byte
authorBitterblue Smith <rtl8821cerfe2@gmail.com>
Tue, 27 Feb 2024 12:15:52 +0000 (14:15 +0200)
committerKalle Valo <kvalo@kernel.org>
Tue, 5 Mar 2024 18:53:29 +0000 (20:53 +0200)
PCI drivers and USB drivers can both use the same function,
read_efuse_byte(), and they can call it directly.

rtl8192de was the only user.

Tested only with the upcoming rtl8192du driver.

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/4e2c968d-f25c-4a40-be97-4fdcbdde69cf@gmail.com
drivers/net/wireless/realtek/rtlwifi/pci.c
drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c
drivers/net/wireless/realtek/rtlwifi/wifi.h

index d059cfe5a2a94516a8ee742118a1516494a0159e..11709b6c83f1aa7ad107b36c9ace9be308b47c36 100644 (file)
@@ -2374,7 +2374,6 @@ EXPORT_SYMBOL(rtl_pci_resume);
 #endif /* CONFIG_PM_SLEEP */
 
 const struct rtl_intf_ops rtl_pci_ops = {
-       .read_efuse_byte = read_efuse_byte,
        .adapter_start = rtl_pci_start,
        .adapter_stop = rtl_pci_stop,
        .check_buddy_priv = rtl_pci_check_buddy_priv,
index 743ac6871bf4bff75bc13277aae9e5babd93b79b..4ba42f6be3f2bce379b45e8c0c1d75ddf67562d6 100644 (file)
@@ -1669,10 +1669,8 @@ static void _rtl92de_efuse_update_chip_version(struct ieee80211_hw *hw)
        u8 cutvalue[2];
        u16 chipvalue;
 
-       rtlpriv->intf_ops->read_efuse_byte(hw, EEPROME_CHIP_VERSION_H,
-                                          &cutvalue[1]);
-       rtlpriv->intf_ops->read_efuse_byte(hw, EEPROME_CHIP_VERSION_L,
-                                          &cutvalue[0]);
+       read_efuse_byte(hw, EEPROME_CHIP_VERSION_H, &cutvalue[1]);
+       read_efuse_byte(hw, EEPROME_CHIP_VERSION_L, &cutvalue[0]);
        chipvalue = (cutvalue[1] << 8) | cutvalue[0];
        switch (chipvalue) {
        case 0xAA55:
index f388d13e2ba8b854ef32874591b879e4be74875d..9fabf597cfd6c4d554cf7870641fc1e4a968e4e1 100644 (file)
@@ -2289,7 +2289,6 @@ struct rtl_hal_ops {
 
 struct rtl_intf_ops {
        /*com */
-       void (*read_efuse_byte)(struct ieee80211_hw *hw, u16 _offset, u8 *pbuf);
        int (*adapter_start)(struct ieee80211_hw *hw);
        void (*adapter_stop)(struct ieee80211_hw *hw);
        bool (*check_buddy_priv)(struct ieee80211_hw *hw,