Message ID | 20240202121050.977223-1-fiona.klute@gmx.de (mailing list archive) |
---|---|
Headers | show |
Series | rtw88: Add support for RTL8723CS/RTL8703B | expand |
On 2/2/24 15:10, Fiona Klute wrote: > This patch set adds a driver for RTL8723CS, which is used in the > Pinephone and a few other devices. It is a combined wifi/bluetooth > device, the wifi part is called RTL8703B. There is already a mainline > driver for the bluetooth part. RTL8703B is similar to the RTL8723D > chip already supported by rtw88. I've been using the out-of-tree > rtl8723cs driver as reference. On top of wireless-next (17903a283593), I'm seeing: drivers/net/wireless/realtek/rtw88/mac.c: In function '__rtw_download_firmware_legacy': drivers/net/wireless/realtek/rtw88/mac.c:940:33: error: 'RTW_CHIP_TYPE_8703B' undeclared (first use in this function); did you mean 'RTW_CHIP_TYPE_8723D'? 940 | if (rtwdev->chip->id == RTW_CHIP_TYPE_8703B && | ^~~~~~~~~~~~~~~~~~~ | RTW_CHIP_TYPE_8723D drivers/net/wireless/realtek/rtw88/mac.c:940:33: note: each undeclared identifier is reported only once for each function it appears in It seems that 'enum rtw_chip_type' has missing an entry. Dmitry
Am 02.02.24 um 14:13 schrieb Dmitry Antipov: > On 2/2/24 15:10, Fiona Klute wrote: > >> This patch set adds a driver for RTL8723CS, which is used in the >> Pinephone and a few other devices. It is a combined wifi/bluetooth >> device, the wifi part is called RTL8703B. There is already a mainline >> driver for the bluetooth part. RTL8703B is similar to the RTL8723D >> chip already supported by rtw88. I've been using the out-of-tree >> rtl8723cs driver as reference. > > On top of wireless-next (17903a283593), I'm seeing: > > drivers/net/wireless/realtek/rtw88/mac.c: In function > '__rtw_download_firmware_legacy': > drivers/net/wireless/realtek/rtw88/mac.c:940:33: error: > 'RTW_CHIP_TYPE_8703B' undeclared > (first use in this function); did you mean 'RTW_CHIP_TYPE_8723D'? > 940 | if (rtwdev->chip->id == RTW_CHIP_TYPE_8703B && > | ^~~~~~~~~~~~~~~~~~~ > | RTW_CHIP_TYPE_8723D > drivers/net/wireless/realtek/rtw88/mac.c:940:33: note: each undeclared > identifier is > reported only once for each function it appears in > > It seems that 'enum rtw_chip_type' has missing an entry. That definition should have been added to main.h by patch 3 ("wifi: rtw88: Add definitions for 8703b chip"). Was there some issue with applying that one?
On 2/2/24 16:27, Fiona Klute wrote: > That definition should have been added to main.h by patch 3 ("wifi: > rtw88: Add definitions for 8703b chip"). Was there some issue with > applying that one? Ugh, indeed :-(. Should say sorry for this. The only minor issue actually is: drivers/net/wireless/realtek/rtw88/rtw8723x.c:314:6: warning: no previous prototype for function '__rtw8723x_cfg_ldo25' [-Wmissing-prototypes] 314 | void __rtw8723x_cfg_ldo25(struct rtw_dev *rtwdev, bool enable) | ^ drivers/net/wireless/realtek/rtw88/rtw8723x.c:314:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 314 | void __rtw8723x_cfg_ldo25(struct rtw_dev *rtwdev, bool enable) | ^ | static Dmitry
Am 02.02.24 um 14:54 schrieb Dmitry Antipov: > The only minor issue actually is: > > drivers/net/wireless/realtek/rtw88/rtw8723x.c:314:6: warning: no previous > prototype for function '__rtw8723x_cfg_ldo25' [-Wmissing-prototypes] > 314 | void __rtw8723x_cfg_ldo25(struct rtw_dev *rtwdev, bool enable) > | ^ > drivers/net/wireless/realtek/rtw88/rtw8723x.c:314:1: note: declare 'static' > if the function is not intended to be used outside of this translation unit > 314 | void __rtw8723x_cfg_ldo25(struct rtw_dev *rtwdev, bool enable) > | ^ > | static Looks like I forgot a static there, will fix that in the next version. Thank you! Fiona
Hi! > Ping-Ke Shih kindly offered to add the required s-o-b for the firmware > and help get it into linux-firmware when it's time, for testing now > please see the code I used to extract firmware from the out-of-tree > driver [1]. Can I get you to apply this? So far I got driver to insert, but I did not have firmware installed. That should be ok on next reboot. Best regards, Pavel diff --git a/Makefile b/Makefile index 1f8e8b6..fbc1f14 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,10 @@ firmware_files = rtw8703b_ap_fw.bin \ all: $(firmware_files) +install: $(firmware_files) + sudo mkdir /lib/firmware/rtw88/ + sudo cp $(firmware_files) /lib/firmware/rtw88/ + %.o: %.c gcc -fPIC -DCONFIG_RTL8703B -c -o $@ $<
Hi! > This patch set adds a driver for RTL8723CS, which is used in the > Pinephone and a few other devices. It is a combined wifi/bluetooth > device, the wifi part is called RTL8703B. There is already a mainline > driver for the bluetooth part. RTL8703B is similar to the RTL8723D > chip already supported by rtw88. I've been using the out-of-tree > rtl8723cs driver as reference. I've installed in on PinePhone with v6.8-rc1, got firmware, and it simply started working (maybe with slightly reduced performance, but I did not check). In fact, I'm sending this email using the new driver. Tested-by: Pavel Machek <pavel@ucw.cz> Thank you! Best regards, Pavel
Hi! > This patch set adds a driver for RTL8723CS, which is used in the > Pinephone and a few other devices. It is a combined wifi/bluetooth > device, the wifi part is called RTL8703B. There is already a mainline > driver for the bluetooth part. RTL8703B is similar to the RTL8723D > chip already supported by rtw88. I've been using the out-of-tree > rtl8723cs driver as reference. I tried compiling *23cs into kernel (not modular), but that one fails, with "multiple definition of rtw8723x_iqk_backup_path_ctrl" and similar. Sorry, can't cut&paste right now, but it should be easy to reproduce and fix. Best regards, Pavel
Am 02.02.24 um 21:19 schrieb Pavel Machek: > Can I get you to apply this? Done, good idea! > diff --git a/Makefile b/Makefile > index 1f8e8b6..fbc1f14 100644 > --- a/Makefile > +++ b/Makefile > @@ -7,6 +7,10 @@ firmware_files = rtw8703b_ap_fw.bin \ > > all: $(firmware_files) > > +install: $(firmware_files) > + sudo mkdir /lib/firmware/rtw88/ > + sudo cp $(firmware_files) /lib/firmware/rtw88/ > + > %.o: %.c > gcc -fPIC -DCONFIG_RTL8703B -c -o $@ $< > >
Am 02.02.24 um 21:52 schrieb Pavel Machek: > I tried compiling *23cs into kernel (not modular), but that one fails, > with "multiple definition of rtw8723x_iqk_backup_path_ctrl" and > similar. Sorry, can't cut&paste right now, but it should be easy to > reproduce and fix. The IQK helper functions need to marked as static, after that (and adding firmware to the initramfs) the built-in driver works. Queued for v2, thank you! Best regards, Fiona