Do I really need mac80211/Backports package?

If I switch to more recent kernel (4.16) and build Openwrt, backports package breaks (obviously). Creating a new backports package and then porting 200+ patches is a huge challenge.

How can I disable OpenWrt backported wireless drivers? Are these needed when I'm using more recent mainline kernel?

Thanks,

Vivek

1 Like

You can't, at least not reasonably, as the required wlan packages are only packaged from backports and not (alternatively) from the base kernel. You'd have to replicate this packaging for the kernel - and introduce corresponding dependencies/ conflicts. This is possible, but would duplicate a massive amount of packaging code - which is also a constantly moving target, having to do this for two similar but indepently moving code bases would be a maintenance nightmare.

Switching to newer major kernel version is a large task by itself, as you need to adjust

Wifi backports is just a small part of the task

@slh

However I feel backported drivers should have been an alternative to base drivers. Rather having no alternative at all.

@hnyman
No doubt and I agree 100%. Someone (Smartsmurf) already did this for gemini based NAS: https://github.com/Smartsmurf/openwrt-ib4220/. I have managed to port bcm53xx specific changes both configs and patches. Although, I haven't been able to test it because I've hit a dead end with backports.

Just want to say, I have huge appreciation for work you both do here. Thank you!

Well, I did make packages for the in-kernel wireless driver in the past to test
whenever the backports was causing problems or not:

You can find an old patch that came with cfg80211, mac80211 and ath10k for the IPQ40XX on the 4.8/(early 4.9-rc ish) on the Mailinglist archive.

https://lists.openwrt.org/pipermail/openwrt-devel/2017-April/006983.html

Note: The this probably will require more work in order to be usable.
But if you looking for leads I guess you can start from there and make
your own version/customization. At least, I know it did work back then.

1 Like

This is helpful, Thanks!

Your link no longer works. :confused:

Strange, back in 2017 this would be on the lede-dev right?

https://lists.infradead.org/pipermail/lede-dev/2017-April/006983.html

(But this is ooold)

Anyone who knows how to generate those backport packages?

You should probably look advice at upstream

and git kernel.org website (where @hauke has actually authored the latest backports)

Ps.
also notice to

It will be a real PITA tried once and I love to port stuff but that thing is scary

Did anyone try to compiling the wireless drivers and mac80211 with the kernel?

For example for a ath9k card trying to start wpad_supplicant will result in:

root@OpenWrt:~# wpa_supplicant -iwlan0 -c wpa.conf 
Successfully initialized wpa_supplicant
Could not set interface wlan0 flags (UP): I/O error
nl80211: Could not set interface 'wlan0' UP
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
wlan0: Failed to initialize driver interface
wlan0: CTRL-EVENT-DSCP-POLICY clear_all

For an mt7615 card it is even worse and I can not even bringup the card:

root@OpenWrt:~# ip l set wlan0 up
ip: SIOCSIFFLAGS: I/O error

Actually, I just did. I wanted to have "latest" kernel (which is 6.1.1 at the time of writing) and I added the CFG80211 plus MAC80211 into the kernel, as well as the MT7603 and MT76x2 (for the MT7612) drivers from "mainline kernel". For those I needed to add the firmware.bin files (see my other post: add firmware to kernel

I did add the patches from the MAC80211/Backport marked as v6.2 (not sure I needed them, but I added them anyways).. And I had to patch the Makefile for hostapd/wpad-basic-wolfssl to get it to work. Mainly since CFG80211 was in kernel, the kmod-cfd80211 wasn't "yes" so I missed some dependencies.

Additionally I had to add the files that the backport MAC80211 was adding (scripts) for OpenWrt so everything was added to UCI and hospapd would get the proper config automatically.

Bottomline: it works just fine. It probably would work "just fine" for the kernel 5.10 or 5.15 if you can do without the patches after that.

Can you maybe give us a link to your repository?

interesting project

Let me create a GitHub repository and update/upload my changes. I'll post the link once I'm done.

2 Likes

Nice. Thanks!