mbox series

[v3,00/12] wifi: rtlwifi: Add new rtl8192du driver

Message ID 7f4b3309-1580-48f3-9426-29f1eb4052fd@gmail.com (mailing list archive)
Headers show
Series wifi: rtlwifi: Add new rtl8192du driver | expand

Message

Bitterblue Smith March 20, 2024, 7:32 p.m. UTC
These patches add a driver for the RTL8192DU chip.

Patch 1 fixes a bug in rtl8192de. Patch 2 depends on it.

Patch 2 moves a good portion of the code from rtl8192de to a new module
rtl8192d-common.

Patch 3 makes some adjustments to rtl8192d-common.

The remaining patches add the new rtl8192du driver.

Power saving is disabled by default because it's not working yet.

Dual MAC chips are not tested.

Until Ping-Ke Shih will add the firmware to the linux-firmware
repository, the driver can be tested with the firmware from Larry
Finger's repository:
https://github.com/lwfinger/rtl8192du/blob/master/rtl8192dufw.bin

v3:
 - Fix compilation error and sparse/smatch warnings.
 - Add another USB ID.
 - More details about the changes can be found in each patch.

v2:
 - Add cover letter.
 - Implement feedback.
 - Fix more problems reported by checkpatch.
 - Split the new driver into several patches (4-12) for easier
   reviewing.
 - More details about the changes can be found in each patch.

Bitterblue Smith (12):
  wifi: rtlwifi: rtl8192de: Fix 5 GHz TX power
  wifi: rtlwifi: Move code from rtl8192de to rtl8192d-common
  wifi: rtlwifi: Adjust rtl8192d-common for USB
  wifi: rtlwifi: Add rtl8192du/table.{c,h}
  wifi: rtlwifi: Add rtl8192du/hw.{c,h}
  wifi: rtlwifi: Add rtl8192du/phy.{c,h}
  wifi: rtlwifi: Add rtl8192du/trx.{c,h}
  wifi: rtlwifi: Add rtl8192du/rf.{c,h}
  wifi: rtlwifi: Add rtl8192du/fw.{c,h} and rtl8192du/led.{c,h}
  wifi: rtlwifi: Add rtl8192du/dm.{c,h}
  wifi: rtlwifi: Add rtl8192du/sw.{c,h}
  wifi: rtlwifi: Enable the new rtl8192du driver

 drivers/net/wireless/realtek/rtlwifi/Kconfig  |   18 +
 drivers/net/wireless/realtek/rtlwifi/Makefile |    2 +
 drivers/net/wireless/realtek/rtlwifi/efuse.c  |    2 +-
 drivers/net/wireless/realtek/rtlwifi/efuse.h  |    2 +-
 .../realtek/rtlwifi/rtl8192d/Makefile         |   11 +
 .../rtlwifi/{rtl8192de => rtl8192d}/def.h     |    0
 .../realtek/rtlwifi/rtl8192d/dm_common.c      | 1079 ++++++
 .../realtek/rtlwifi/rtl8192d/dm_common.h      |  100 +
 .../realtek/rtlwifi/rtl8192d/fw_common.c      |  390 +++
 .../realtek/rtlwifi/rtl8192d/fw_common.h      |   49 +
 .../realtek/rtlwifi/rtl8192d/hw_common.c      | 1218 +++++++
 .../realtek/rtlwifi/rtl8192d/hw_common.h      |   24 +
 .../wireless/realtek/rtlwifi/rtl8192d/main.c  |    9 +
 .../realtek/rtlwifi/rtl8192d/phy_common.c     |  830 +++++
 .../realtek/rtlwifi/rtl8192d/phy_common.h     |   96 +
 .../rtlwifi/{rtl8192de => rtl8192d}/reg.h     |  155 +-
 .../realtek/rtlwifi/rtl8192d/rf_common.c      |  378 ++
 .../realtek/rtlwifi/rtl8192d/rf_common.h      |   13 +
 .../realtek/rtlwifi/rtl8192d/trx_common.c     |  516 +++
 .../realtek/rtlwifi/rtl8192d/trx_common.h     |  442 +++
 .../wireless/realtek/rtlwifi/rtl8192de/dm.c   | 1072 +-----
 .../wireless/realtek/rtlwifi/rtl8192de/dm.h   |   91 +-
 .../wireless/realtek/rtlwifi/rtl8192de/fw.c   |  375 +-
 .../wireless/realtek/rtlwifi/rtl8192de/fw.h   |   37 -
 .../wireless/realtek/rtlwifi/rtl8192de/hw.c   | 1168 +------
 .../wireless/realtek/rtlwifi/rtl8192de/hw.h   |   11 -
 .../wireless/realtek/rtlwifi/rtl8192de/led.c  |    2 +-
 .../wireless/realtek/rtlwifi/rtl8192de/phy.c  |  918 +----
 .../wireless/realtek/rtlwifi/rtl8192de/phy.h  |   59 +-
 .../wireless/realtek/rtlwifi/rtl8192de/rf.c   |  375 +-
 .../wireless/realtek/rtlwifi/rtl8192de/rf.h   |    5 -
 .../wireless/realtek/rtlwifi/rtl8192de/sw.c   |   12 +-
 .../wireless/realtek/rtlwifi/rtl8192de/trx.c  |  515 +--
 .../wireless/realtek/rtlwifi/rtl8192de/trx.h  |  433 ---
 .../realtek/rtlwifi/rtl8192du/Makefile        |   13 +
 .../wireless/realtek/rtlwifi/rtl8192du/dm.c   |  125 +
 .../wireless/realtek/rtlwifi/rtl8192du/dm.h   |   10 +
 .../wireless/realtek/rtlwifi/rtl8192du/fw.c   |  109 +
 .../wireless/realtek/rtlwifi/rtl8192du/fw.h   |    9 +
 .../wireless/realtek/rtlwifi/rtl8192du/hw.c   | 1244 +++++++
 .../wireless/realtek/rtlwifi/rtl8192du/hw.h   |   24 +
 .../wireless/realtek/rtlwifi/rtl8192du/led.c  |   10 +
 .../wireless/realtek/rtlwifi/rtl8192du/led.h  |    9 +
 .../wireless/realtek/rtlwifi/rtl8192du/phy.c  | 3055 +++++++++++++++++
 .../wireless/realtek/rtlwifi/rtl8192du/phy.h  |   32 +
 .../wireless/realtek/rtlwifi/rtl8192du/rf.c   |  236 ++
 .../wireless/realtek/rtlwifi/rtl8192du/rf.h   |   11 +
 .../wireless/realtek/rtlwifi/rtl8192du/sw.c   |  311 ++
 .../wireless/realtek/rtlwifi/rtl8192du/sw.h   |   12 +
 .../realtek/rtlwifi/rtl8192du/table.c         | 1675 +++++++++
 .../realtek/rtlwifi/rtl8192du/table.h         |   30 +
 .../wireless/realtek/rtlwifi/rtl8192du/trx.c  |  380 ++
 .../wireless/realtek/rtlwifi/rtl8192du/trx.h  |   60 +
 drivers/net/wireless/realtek/rtlwifi/usb.c    |    3 +
 drivers/net/wireless/realtek/rtlwifi/wifi.h   |    6 +
 55 files changed, 12788 insertions(+), 4983 deletions(-)
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192d/Makefile
 rename drivers/net/wireless/realtek/rtlwifi/{rtl8192de => rtl8192d}/def.h (100%)
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192d/dm_common.c
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192d/dm_common.h
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192d/fw_common.c
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192d/fw_common.h
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.h
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192d/main.c
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192d/phy_common.c
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192d/phy_common.h
 rename drivers/net/wireless/realtek/rtlwifi/{rtl8192de => rtl8192d}/reg.h (91%)
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192d/rf_common.c
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192d/rf_common.h
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192d/trx_common.c
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192d/trx_common.h
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/Makefile
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/dm.c
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/dm.h
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/fw.c
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/fw.h
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/hw.c
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/hw.h
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/led.c
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/led.h
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/phy.c
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/phy.h
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/rf.c
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/rf.h
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/sw.c
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/sw.h
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/table.c
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/table.h
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/trx.c
 create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/trx.h

Comments

Stefan Lippers-Hollmann March 21, 2024, 1:10 a.m. UTC | #1
Hi

On 2024-03-20, Bitterblue Smith wrote:
> These patches add a driver for the RTL8192DU chip.

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>

> Patch 1 fixes a bug in rtl8192de. Patch 2 depends on it.
>
> Patch 2 moves a good portion of the code from rtl8192de to a new module
> rtl8192d-common.
>
> Patch 3 makes some adjustments to rtl8192d-common.
>
> The remaining patches add the new rtl8192du driver.
>
> Power saving is disabled by default because it's not working yet.
>
> Dual MAC chips are not tested.
>
> Until Ping-Ke Shih will add the firmware to the linux-firmware
> repository, the driver can be tested with the firmware from Larry
> Finger's repository:
> https://github.com/lwfinger/rtl8192du/blob/master/rtl8192dufw.bin

I've successfully tested v3 of this patch series on my DeLock 88540.

No issues observed in 'normal' daily operations previously with v1
either, it works nicely and makes this USB WLAN card usable.

Best regards and many thanks
	Stefan Lippers-Hollmann
Ping-Ke Shih March 22, 2024, 6:13 a.m. UTC | #2
Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:

> Different channels have different TX power settings. rtl8192de is using
> the TX power setting from the wrong channel in the 5 GHz band because
> _rtl92c_phy_get_rightchnlplace expects an array which includes all the
> channel numbers, but it's using an array which includes only the 5 GHz
> channel numbers.
> 
> Use the array channel_all (defined in rtl8192de/phy.c) instead of
> the incorrect channel5g (defined in core.c).
> 
> Tested only with rtl8192du, which will use the same TX power code.
> 
> Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
> Acked-by: Ping-Ke Shih <pkshih@realtek.com>

I have reviewed this patchset. Set patchset state to Changes Requested.

[v3,01/12] wifi: rtlwifi: rtl8192de: Fix 5 GHz TX power
[v3,02/12] wifi: rtlwifi: Move code from rtl8192de to rtl8192d-common
[v3,03/12] wifi: rtlwifi: Adjust rtl8192d-common for USB
[v3,04/12] wifi: rtlwifi: Add rtl8192du/table.{c,h}
[v3,05/12] wifi: rtlwifi: Add rtl8192du/hw.{c,h}
[v3,06/12] wifi: rtlwifi: Add rtl8192du/phy.{c,h}
[v3,07/12] wifi: rtlwifi: Add rtl8192du/trx.{c,h}
[v3,08/12] wifi: rtlwifi: Add rtl8192du/rf.{c,h}
[v3,09/12] wifi: rtlwifi: Add rtl8192du/fw.{c,h} and rtl8192du/led.{c,h}
[v3,10/12] wifi: rtlwifi: Add rtl8192du/dm.{c,h}
[v3,11/12] wifi: rtlwifi: Add rtl8192du/sw.{c,h}
[v3,12/12] wifi: rtlwifi: Enable the new rtl8192du driver

---
https://github.com/pkshih/rtw.git