wifi: rtlwifi: rtl8192cu: Remove driver
PATCH 1/1 wifi: rtlwifi: rtl8192cu: Remove driver
The functionality of these devices has been replaced by the rtl8xxxu driver, thus the version under rtlwifi can be removed.
--- drivers/net/wireless/realtek/rtlwifi/Kconfig | 17 +- drivers/net/wireless/realtek/rtlwifi/Makefile | 1 - drivers/net/wireless/realtek/rtlwifi/core.c | 6 - drivers/net/wireless/realtek/rtlwifi/pci.h | 1 - .../realtek/rtlwifi/rtl8192c/fw_common.c | 10 +- .../realtek/rtlwifi/rtl8192cu/Makefile | 13 - .../wireless/realtek/rtlwifi/rtl8192cu/def.h | 20 - .../wireless/realtek/rtlwifi/rtl8192cu/dm.c | 90 - .../wireless/realtek/rtlwifi/rtl8192cu/dm.h | 9 - .../wireless/realtek/rtlwifi/rtl8192cu/hw.c | 2273 ----------------- .../wireless/realtek/rtlwifi/rtl8192cu/hw.h | 83 - .../wireless/realtek/rtlwifi/rtl8192cu/led.c | 118 - .../wireless/realtek/rtlwifi/rtl8192cu/led.h | 13 - .../wireless/realtek/rtlwifi/rtl8192cu/mac.c | 746 ------ .../wireless/realtek/rtlwifi/rtl8192cu/mac.h | 132 - .../wireless/realtek/rtlwifi/rtl8192cu/phy.c | 509 ---- .../wireless/realtek/rtlwifi/rtl8192cu/phy.h | 24 - .../wireless/realtek/rtlwifi/rtl8192cu/reg.h | 4 - .../wireless/realtek/rtlwifi/rtl8192cu/rf.c | 442 ---- .../wireless/realtek/rtlwifi/rtl8192cu/rf.h | 23 - .../wireless/realtek/rtlwifi/rtl8192cu/sw.c | 391 --- .../realtek/rtlwifi/rtl8192cu/table.c | 1862 -------------- .../realtek/rtlwifi/rtl8192cu/table.h | 45 - .../wireless/realtek/rtlwifi/rtl8192cu/trx.c | 662 ----- .../wireless/realtek/rtlwifi/rtl8192cu/trx.h | 403 --- drivers/net/wireless/realtek/rtlwifi/wifi.h | 1 - 26 files changed, 2 insertions(+), 7896 deletions(-) delete mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/Makefile delete mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/def.h delete mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/dm.c delete mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/dm.h delete mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c delete mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.h delete mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/led.c delete mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/led.h delete mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c delete mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.h delete mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/phy.c delete mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/phy.h delete mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/reg.h delete mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.c delete mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.h delete mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c delete mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/table.c delete mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/table.h delete mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c delete mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.h
drivers/net/wireless/realtek/rtlwifi/Kconfig +1 -16
@@ -106,18 +106,6 @@ config RTL8821AE If you choose to build it as a module, it will be called rtl8821ae -config RTL8192CU - tristate "Realtek RTL8192CU/RTL8188CU USB Wireless Network Adapter" - depends on USB - select RTLWIFI - select RTLWIFI_USB - select RTL8192C_COMMON - help - This is the driver for Realtek RTL8192CU/RTL8188CU 802.11n USB - wireless network adapters. - - If you choose to build it as a module, it will be called rtl8192cu - config RTLWIFI tristate select FW_LOADER
@@ -125,9 +113,6 @@ config RTLWIFI config RTLWIFI_PCI tristate -config RTLWIFI_USB - tristate - config RTLWIFI_DEBUG bool "Debugging output for rtlwifi driver family" depends on RTLWIFI
@@ -139,7 +124,7 @@ config RTLWIFI_DEBUG config RTL8192C_COMMON tristate - depends on RTL8192CE || RTL8192CU + depends on RTL8192CE default y config RTL8723_COMMON
drivers/net/wireless/realtek/rtlwifi/Makefile +0 -1
@@ -21,7 +21,6 @@ rtl_usb-objs := usb.o obj-$(CONFIG_RTL8192C_COMMON) += rtl8192c/ obj-$(CONFIG_RTL8192CE) += rtl8192ce/ -obj-$(CONFIG_RTL8192CU) += rtl8192cu/ obj-$(CONFIG_RTL8192SE) += rtl8192se/ obj-$(CONFIG_RTL8192DE) += rtl8192de/ obj-$(CONFIG_RTL8723AE) += rtl8723ae/
drivers/net/wireless/realtek/rtlwifi/core.c +0 -6
@@ -1770,12 +1770,6 @@ static void rtl_op_flush(struct ieee80211_hw *hw,static int rtl_op_set_tim (struct ieee80211_hw *hw,struct ieee80211_sta *sta,bool set) { -struct rtl_priv *rtlpriv =rtl_priv (hw); -struct rtl_hal *rtlhal =rtl_hal (rtl_priv (hw)); - -if (rtlhal->hw_type ==HARDWARE_TYPE_RTL8192CU ) -schedule_work (&rtlpriv->works.update_beacon_work); -return 0 ; }
drivers/net/wireless/realtek/rtlwifi/pci.h +0 -1
@@ -79,7 +79,6 @@#define RTL_PCI_8192CE_DID 0x8178/*8192ce */ #define RTL_PCI_8191CE_DID 0x8177/*8192ce */ #define RTL_PCI_8188CE_DID 0x8176/*8192ce */ -#define RTL_PCI_8192CU_DID 0x8191/*8192ce */ #define RTL_PCI_8192DE_DID 0x8193/*8192de */ #define RTL_PCI_8192DE_DID2 0x002B/*92DE*/ #define RTL_PCI_8188EE_DID 0x8179/*8188ee*/
drivers/net/wireless/realtek/rtlwifi/rtl8192c/fw_common.c +1 -9
@@ -16,15 +16,7 @@ static void _rtl92c_enable_fw_download(struct ieee80211_hw *hw, bool enable)struct rtl_priv *rtlpriv =rtl_priv (hw);struct rtl_hal *rtlhal =rtl_hal (rtl_priv (hw)); -if (rtlhal->hw_type ==HARDWARE_TYPE_RTL8192CU ) { -u32 value32 =rtl_read_dword (rtlpriv,REG_MCUFWDL ); - -if (enable) - value32 |=MCUFWDL_EN ; -else - value32 &= ~MCUFWDL_EN ; -rtl_write_dword (rtlpriv,REG_MCUFWDL , value32); - }else if (rtlhal->hw_type ==HARDWARE_TYPE_RTL8192CE ) { +if (rtlhal->hw_type ==HARDWARE_TYPE_RTL8192CE ) {u8 tmp;if (enable) {
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/Makefile deleted +0 -13
@@ -1,13 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 -rtl8192cu-objs := \ - dm.o \ - hw.o \ - led.o \ - mac.o \ - phy.o \ - rf.o \ - sw.o \ - table.o \ - trx.o - -obj-$(CONFIG_RTL8192CU) += rtl8192cu.o
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/def.h deleted +0 -20
@@ -1,20 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* Copyright(c) 2009-2012 Realtek Corporation.*/ - -#include "../rtl8192ce/def.h" - -/*------------------------------------------------------------------------- -* Chip specific -*-------------------------------------------------------------------------*/ -#define NORMAL_CHIP BIT(4) -#define CHIP_VENDOR_UMC BIT(5) -#define CHIP_VENDOR_UMC_B_CUT BIT(6) - -#define IS_92C_1T2R (version) \ - (((version) & CHIP_92C) && ((version) & CHIP_92C_1T2R)) - -#define IS_VENDOR_UMC (version) \ - (((version) & CHIP_VENDOR_UMC) ? true : false) - -#define CHIP_BONDING_92C_1T2R 0x1 -#define CHIP_BONDING_IDENTIFIER (_value) (((_value) >> 22) & 0x3)
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/dm.c deleted +0 -90
90 lines not on this page · raw message
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/dm.h deleted +0 -9
@@ -1,9 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* Copyright(c) 2009-2012 Realtek Corporation.*/ - -#include "../rtl8192ce/dm.h" - -void rtl92cu_dm_dynamic_txpower (struct ieee80211_hw *hw); -void dm_savepowerindex (struct ieee80211_hw *hw); -void dm_writepowerindex (struct ieee80211_hw *hw,u8 value); -void dm_restorepowerindex (struct ieee80211_hw *hw);
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c deleted +0 -2273
2,273 lines not on this page · raw message
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.h deleted +0 -83
83 lines not on this page · raw message
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/led.c deleted +0 -118
118 lines not on this page · raw message
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/led.h deleted +0 -13
@@ -1,13 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* Copyright(c) 2009-2012 Realtek Corporation.*/ - -#ifndef __RTL92CU_LED_H__ -#define __RTL92CU_LED_H__ - -void rtl92cu_init_sw_leds (struct ieee80211_hw *hw); -void rtl92cu_deinit_sw_leds (struct ieee80211_hw *hw); -void rtl92cu_sw_led_on (struct ieee80211_hw *hw,struct rtl_led *pled); -void rtl92cu_sw_led_off (struct ieee80211_hw *hw,struct rtl_led *pled); -void rtl92cu_led_control (struct ieee80211_hw *hw,enum led_ctl_mode ledaction); - -#endif
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c deleted +0 -746
304 lines not on this page · raw message
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.h deleted +0 -132
132 lines not on this page · raw message
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/phy.c deleted +0 -509
509 lines not on this page · raw message
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/phy.h deleted +0 -24
Lines of this file are not shown. View the raw message.
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/reg.h deleted +0 -4
Lines of this file are not shown. View the raw message.
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.c deleted +0 -442
442 lines not on this page · raw message
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.h deleted +0 -23
Lines of this file are not shown. View the raw message.
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c deleted +0 -391
391 lines not on this page · raw message
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/table.c deleted +0 -1862
1,862 lines not on this page · raw message
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/table.h deleted +0 -45
45 lines not on this page · raw message
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c deleted +0 -662
662 lines not on this page · raw message
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.h deleted +0 -403
403 lines not on this page · raw message
drivers/net/wireless/realtek/rtlwifi/wifi.h +0 -1
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.40.1
Part of the diff is not shown here. View the raw message.
Quoted 14 lines · Larry Finger
drivers/net/wireless/realtek/rtlwifi/core.c +0
-6@@ -1770,12 +1770,6 @@ static void rtl_op_flush(struct ieee80211_hw *hw, static int rtl_op_set_tim(struct ieee80211_hw *hw, struct ieee80211_sta *sta, bool set) { -struct rtl_priv *rtlpriv =rtl_priv (hw); -struct rtl_hal *rtlhal =rtl_hal (rtl_priv (hw)); - -if (rtlhal->hw_type ==HARDWARE_TYPE_RTL8192CU ) -schedule_work (&rtlpriv->works.update_beacon_work); - return 0; }
Quoted 1 line
Looks like you could remove that entire method if it does nothing now, it doesn't matter to mac80211 if you have it or not (since you don't use AP_LINK_PS.)
Not sure it matters to you in the driver :)
johannes
Quoted 21 lines · Johannes Berg
Quoted 5 lines · Larry Finger
drivers/net/wireless/realtek/rtlwifi/core.c +0
-0@@ -1770,12 +1770,6 @@ static void rtl_op_flush(struct ieee80211_hw *hw, static int rtl_op_set_tim(struct ieee80211_hw *hw, struct ieee80211_sta *sta, bool set)drivers/net/wireless/realtek/rtlwifi/core.c static void rtl_op_flush(struct ieee80211_hw *hw, · line 1775
Quoted 10 lines
drivers/net/wireless/realtek/rtlwifi/core.c +0
-6{ -struct rtl_priv *rtlpriv =rtl_priv (hw); -struct rtl_hal *rtlhal =rtl_hal (rtl_priv (hw)); - -if (rtlhal->hw_type ==HARDWARE_TYPE_RTL8192CU ) -schedule_work (&rtlpriv->works.update_beacon_work); - return 0; }Looks like you could remove that entire method if it does nothing now, it doesn't matter to mac80211 if you have it or not (since you don't use
AP_LINK_PS.)
Quoted 1 line
Not sure it matters to you in the driver :)
I thought about doing that, but decided to leave the empty one there until I could do more testing. Leaving it will add a few bytes to the driver, but that should not make much difference.
Larry
Quoted 4 lines · Larry Finger
The functionality of these devices has been replaced by the rtl8xxxu driver, thus the version under rtlwifi can be removed.
Signed-off-by Larry Finger <[email protected]>
Should I take this to wireless tree for v6.4?
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Quoted 8 lines · Kalle Valo
Quoted 4 lines · Larry Finger
The functionality of these devices has been replaced by the rtl8xxxu driver, thus the version under rtlwifi can be removed.
Signed-off-by Larry Finger <[email protected]>Should I take this to wireless tree for v6.4?
That is your choice, but I see no problems with including it in 6.4.
Larry
Am 28.04.23 um 20:29 schrieb Larry Finger:
Quoted 4 lines
The functionality of these devices has been replaced by the rtl8xxxu driver, thus the version under rtlwifi can be removed.
Signed-off-by Larry Finger <[email protected]>
Things to keep in mind:
- rtlwifi offers AP mode support for rtl8192cu devices, rtl8xxxu doesn't (yet) do that. Should be relatively easy to add that on top of [1], though.
- The rtl8192cu devices are currently hidden behind CONFIG_RTL8XXXU_UNTESTED in the rtl8xxxu driver with the comment "Still supported by rtlwifi".
[1] https://lore.kernel.org/linux-wireless/[email protected]/
Quoted 6 lines · Martin Kaistra
Am 28.04.23 um 20:29 schrieb Larry Finger:
Quoted 4 lines
The functionality of these devices has been replaced by the rtl8xxxu driver, thus the version under rtlwifi can be removed.
Signed-off-by Larry Finger <[email protected]>
Quoted 8 lines
Things to keep in mind:
- rtlwifi offers AP mode support for rtl8192cu devices, rtl8xxxu doesn't (yet) do that. Should be relatively easy to add that on top of [1], though.
- The rtl8192cu devices are currently hidden behindCONFIG_RTL8XXXU_UNTESTEDin the rtl8xxxu driver with the comment "Still supported by rtlwifi".[1] https://lore.kernel.org/linux-wireless/[email protected]/
Kalle,
I failed to consider this point. Please drop my patch. Instead, I will submit one to remove that configuration parameter that says the rtl8192cu is "untested".
Larry
Quoted 16 lines · Larry Finger
Quoted 15 lines · Martin Kaistra
Am 28.04.23 um 20:29 schrieb Larry Finger:
Quoted 4 lines
The functionality of these devices has been replaced by the rtl8xxxu driver, thus the version under rtlwifi can be removed.
Signed-off-by Larry Finger <[email protected]>Things to keep in mind:
- rtlwifi offers AP mode support for rtl8192cu devices, rtl8xxxu doesn't (yet) do that. Should be relatively easy to add that on top of [1], though.
- The rtl8192cu devices are currently hidden behindCONFIG_RTL8XXXU_UNTESTEDin the rtl8xxxu driver with the comment "Still supported by rtlwifi".
Quoted 8 lines
Quoted 2 lines
[1]
https://lore.kernel.org/linux-wireless/[email protected]/Kalle,
I failed to consider this point. Please drop my patch. Instead, I will submit one to remove that configuration parameter that says the rtl8192cu is "untested".
The original reason why we added CONFIG_RTL8XXXU_UNTESTED back in the day was so that we would not have two drivers supporting the same hardware. Though I don't know how much the kconfig helped with that but at least the conflicts were somehow documented.
Now that rtl8xxxu has matured and gained more features, I would really like the idea of removing rtl8192cu driver. Of course we should make sure that we are not accidentally removing any devices support, for example I was not able to find this device in rtl8xxxu:
{RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x817c, rtl92cu_hal_cfg)},Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Quoted 6 lines · Kalle Valo
The original reason why we added
CONFIG_RTL8XXXU_UNTESTEDback in the day was so that we would not have two drivers supporting the same hardware. Though I don't know how much the kconfig helped with that but at least the conflicts were somehow documented.
Quoted 6 lines
Now that rtl8xxxu has matured and gained more features, I would really like the idea of removing rtl8192cu driver. Of course we should make sure that we are not accidentally removing any devices support, for example I was not able to find this device in rtl8xxxu:
{RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x817c, rtl92cu_hal_cfg)},
I will submit a patch to add this device, and check the vendor driver to see if there are any devices that were missed in the rtlwifi driver, but that can wait until I remove rtl8192cu, which has to wait until rtl8xxxu can support AP mode on the devices. When that happens, I will resubmit the patch for the removal of CONFIG_RTL8XXXU_UNTESTED as part of a 3-patch series.
Larry