Commit Graph

12 Commits

Author SHA1 Message Date
Dr. David Alan Gilbert
2d867b18eb wifi: rtlwifi: Remove uncalled stub rtl*_phy_ap_calibrate
rtl92d_phy_ap_calibrate(),
  rtl92du_phy_ap_calibrate(),
  rtl92ee_phy_ap_calibrate(), and
  rtl8821ae_phy_ap_calibrate()

are all empty function stubs that are never called anywhere.

Remove them.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250425235340.288340-3-linux@treblig.org
2025-05-05 09:20:00 +08:00
Bitterblue Smith
a95d28a8a2 wifi: rtlwifi: rtl8192du: Don't claim USB ID 0bda:8171
This ID appears to be RTL8188SU, not RTL8192DU. This is the wrong driver
for RTL8188SU. The r8712u driver from staging handles this ID.

I think this ID comes from the original rtl8192du driver from Realtek.
I don't know if they added it by mistake, or it was actually used for
two different chips.

RTL8188SU with this ID exists in the wild. RTL8192DU with this ID
probably doesn't.

Fixes: b5dc8873b6 ("wifi: rtlwifi: Add rtl8192du/sw.c")
Cc: stable@vger.kernel.org # v6.11
Closes: https://github.com/lwfinger/rtl8192du/issues/105
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://patch.msgid.link/40245564-41fe-4a5e-881f-cd517255b20a@gmail.com
2024-10-17 17:25:03 +03:00
Bitterblue Smith
f1cb9d5aef wifi: rtlwifi: rtl8192du: Initialise value32 in _rtl92du_init_queue_reserved_page
GCC complains:

   In file included from include/linux/ieee80211.h:21,
                    from include/net/mac80211.h:20,
                    from drivers/net/wireless/realtek/rtlwifi/rtl8192du/../wifi.h:14,
                    from drivers/net/wireless/realtek/rtlwifi/rtl8192du/hw.c:4:
   In function 'u32p_replace_bits',
       inlined from '_rtl92du_init_queue_reserved_page.isra' at drivers/net/wireless/realtek/rtlwifi/rtl8192du/hw.c:225:2:
>> include/linux/bitfield.h:189:18: warning: 'value32' is used uninitialized [-Wuninitialized]

Part of the variable is indeed left uninitialised.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202408062100.DWhN0CYH-lkp@intel.com/
Fixes: e769c67105 ("wifi: rtlwifi: Add rtl8192du/hw.{c,h}")
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://patch.msgid.link/2a808244-93d0-492c-b304-ae1974df5df9@gmail.com
2024-08-07 20:11:36 +03:00
Bitterblue Smith
59ea089dcb wifi: rtlwifi: Enable the new rtl8192du driver
The RTL8192DU is an older Wifi 4 dual band chip. It comes in two
flavours: single MAC single PHY (like most Realtek Wifi 4 USB devices),
and dual MAC dual PHY.

The single MAC single PHY version is 2T2R and can work either in the
2.4 GHz band or the 5 GHz band.

The dual MAC dual PHY version has two USB interfaces and appears to the
system as two separate 1T1R Wifi devices, one working in the 2.4 GHz
band, the other in the 5 GHz band.

This was tested only with a single MAC single PHY device, mostly in
station mode. The speeds in the 2.4 GHz band with 20 MHz channel width
are similar to the out-of-tree driver: 85/51 megabits/second.

Stefan Lippers-Hollmann tested the speed in the 5 GHz band with 40 MHz
channel width: 173/99 megabits/second.

It was also tested briefly in AP mode. It's emitting beacons and my
phone can connect to it.

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://msgid.link/5f2da7ee-876a-42fc-8fec-ec5386fa8c26@gmail.com
2024-05-30 10:32:47 +08:00
Bitterblue Smith
b5dc8873b6 wifi: rtlwifi: Add rtl8192du/sw.c
This contains the new module's entry point.

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://msgid.link/1fdc83ac-4a6f-4645-8837-6e38683b6c84@gmail.com
2024-05-30 10:30:12 +08:00
Bitterblue Smith
3f8b94dbff wifi: rtlwifi: Add rtl8192du/dm.{c,h}
These contain functions related to the dynamic mechanism, which runs
every two seconds to adjust to changes in the environment.

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://msgid.link/a010ed6d-efb0-456d-bd4a-dfc6da23e7aa@gmail.com
2024-05-30 10:28:02 +08:00
Bitterblue Smith
91f43aee0b wifi: rtlwifi: Add rtl8192du/fw.{c,h} and rtl8192du/led.{c,h}
fw.c contains a function for loading the firmware.
led.c contains a function for controlling the LED.

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://msgid.link/a52b8907-267c-4811-90ca-5eb852a2aa09@gmail.com
2024-05-30 10:26:36 +08:00
Bitterblue Smith
c0e4ae46ff wifi: rtlwifi: Add rtl8192du/rf.{c,h}
These contain one RF configuration function and some functions related
to dual MAC operation.

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://msgid.link/36258d72-11fd-4f70-84c6-782972f706ed@gmail.com
2024-05-30 10:26:24 +08:00
Bitterblue Smith
8321424134 wifi: rtlwifi: Add rtl8192du/trx.{c,h}
These contain routines related to sending frames to the chip.

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://msgid.link/bd2c24a0-a1fe-493a-8079-d83fda81a0d5@gmail.com
2024-05-30 10:25:31 +08:00
Bitterblue Smith
af46caf051 wifi: rtlwifi: Add rtl8192du/phy.{c,h}
These contain mostly the calibration and channel switching routines
for RTL8192DU.

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://msgid.link/299a5ab7-46bf-410b-bbeb-e252eeeeb34c@gmail.com
2024-05-30 10:23:12 +08:00
Bitterblue Smith
e769c67105 wifi: rtlwifi: Add rtl8192du/hw.{c,h}
These contain mostly hardware init/deinit routines for RTL8192DU.

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://msgid.link/282afe18-f37d-45f7-9275-68c39d1fde09@gmail.com
2024-05-30 10:13:53 +08:00
Bitterblue Smith
ed41175674 wifi: rtlwifi: Add rtl8192du/table.{c,h}
These contain the MAC, BB, RF, and AGC initialisation tables for
RTL8192DU.

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://msgid.link/5ea548b9-5ec6-4358-aa5d-94071f2341cb@gmail.com
2024-05-30 10:09:44 +08:00