Porting old drivers to Linux 6.2

murrellra

New Member
Joined
Aug 5, 2024
Messages
7
Reaction score
0
Credits
65
We had to update our devices from Linux 4.14 to Linux 6.2. Everything upgraded OK except for WiFi. We built the driver using vendor supplied source code. Linux 6.2 now natively supports the hardware (RealTek 8822CU), but it doesn't work in AP mode. I've been working for a month trying to get a working driver from the module vendor and RealTek, as well as various sites that claim to have working drivers. I'm now considering porting the vendors last working driver for Linux 5.9 to Linux 6.2, but I have some questions.
  1. Is there a porting guide for Linux 6.2? The existing code fails to compile because "linux/ipx.h" doesn't exist, since support has been dropped.
  2. Does a general purpose "shim" driver exist that will let old drivers work under Linux 6.2.
I'm not a Linux expert, but I know enough to be dangerous. Any guidance would be helpful.
 


Is there a porting guide for Linux 6.2? The existing code fails to compile because "linux/ipx.h" doesn't exist, since support has been dropped.
This means rewriting driver code to replace old API calls with new ones, so good luck with that!

indicated the ipx network layer as obsolete in Jan 2018,updated in the MAINTAINERS filenow, after being exposed for 3 years to refactoring, so to delete uapi/linux/ipx.h and net/ipx.h header files for good. additionally, there is no module that depends on ipx.h excepta broken staging driver(r8188eu)

But according to this quote 8822CU should have a newer driver that doesn't depend on ipx.h

If that's not the case or the new driver doesn't work as you said, then I suggest you to clone from kernel commit before that header and associated source file was removed and copy them to your driver source tree.
Include the header and source file to your driver project and compile the driver so that the ipx code becomes internal part of the driver.

I don't know if this will work most likely won't, but the goal is to make the ipx code work independently of the kernel, that is to statically link it with the driver.

Note that replacement of IPX is TCP\IP, so you're dealing not only with old driver but also old protocol, so you need an updated driver.
 
Last edited:
It's there at .../rtw88/rtw8822c_fw.bin.
that is not the same thing - what is the full location ? - that version is old which is ok probably downloaded from GitHub and looks like it is in the wrong place so the new kernel is not seeing it - you could just copy and paste it into the /lib/firmware/rtlwifi/ you will need to be root to do that then reboot
 
Last edited:
Here:

This is what the module manufacturer said to use, and when I select the 8822cu in Menuconfig, this is what gets populated at /lib/firmware/rtw88/. Its also new to Linux 6.2.

My understanding is that the "e" in "8822be" is for PCIe, where I am using a USB module "u" as in "8822cu".
Yes you are correct - I do not know of an easy way to port the driver since parts of the kernel changes - this would involve code changes to the module so the only thing I can offer is to rebuild it
 
Last edited:

Members online


Latest posts

Top