Page MenuHomeFreeBSD

fwget: update wireless IDs for rtw88/89, ath1xk, mt76 and add iwlwifi
Needs ReviewPublic

Authored by bz on Tue, Apr 23, 7:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 29, 5:27 PM
Unknown Object (File)
Mon, Apr 29, 4:36 PM
Unknown Object (File)
Sat, Apr 27, 5:00 AM
Unknown Object (File)
Fri, Apr 26, 10:35 AM
Unknown Object (File)
Fri, Apr 26, 10:35 AM
Unknown Object (File)
Fri, Apr 26, 6:16 AM
Unknown Object (File)
Fri, Apr 26, 3:20 AM
Unknown Object (File)
Thu, Apr 25, 10:18 PM
Subscribers

Details

Reviewers
manu
Summary

Update and add (new) PCI IDs for Realtek rtw88/89, Mediatek 7996/7925,
QCA ath1xk, and add Intel iwlwifi IDs.

Rather than using a package per driver add fine(r) grained flavors
even though it is a lot more likely to break in some cases.

For Intel we need a great level of detail to match PCI IDs so also pass
the full pciconf -l line to into the pci_* files as "$2" to have access
to these.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 57434
Build 54322: arc lint + arc unit

Event Timeline

bz requested review of this revision.Tue, Apr 23, 7:14 PM

wifi-firmware-iwlwifi-kmod doesn't seems to exists ?
Also why adding one big package and then do a case/esac based on id if you're not going to add flavors ?

wifi-firmware-iwlwifi-kmod doesn't seems to exists ?

It is coming with the ports update currently in the makings. I am currently testing the various versions (given in main we can install "bin" files now and no longer need .ko).

Also why adding one big package and then do a case/esac based on id if you're not going to add flavors ?

Because Intel iwlwifi/mvm splattered the IDs massively around. There's not a single "deviceID" to check. Sometimes it is even the "subdevice" which tells instead of "deviceID". It's a big mess. If you check man iwlwififw you can also see it. There are even some cases we cannot detected by PCI IDs, which will fall through the grid currently. But intel_networking could also be iwn(4) or even Ethernet and I don't want to catch those by accident.

The fact that they are grouped currently is more for convenience and for a next step once I also sort the .pnvm files out along. But I'd prefer to do one step a time as otherwise we get nowhere now. The first step is to get them out of src and then the installer ready for it.

manu requested changes to this revision.Wed, Apr 24, 4:56 PM
In D44918#1024358, @bz wrote:

wifi-firmware-iwlwifi-kmod doesn't seems to exists ?

It is coming with the ports update currently in the makings. I am currently testing the various versions (given in main we can install "bin" files now and no longer need .ko).

Do you have a link ?

Also why adding one big package and then do a case/esac based on id if you're not going to add flavors ?

Because Intel iwlwifi/mvm splattered the IDs massively around. There's not a single "deviceID" to check. Sometimes it is even the "subdevice" which tells instead of "deviceID". It's a big mess. If you check man iwlwififw you can also see it. There are even some cases we cannot detected by PCI IDs, which will fall through the grid currently.

But most can be checked by pciid no ? I don't see why you want people to install ~31MB of firmware files when they only need a few kbs.

But intel_networking could also be iwn(4) or even Ethernet and I don't want to catch those by accident.

We could add a force option to fwget to get firmware for alternate drivers (or someway to specify a driver, this could be useful for radeon/amdgpu for overlapping gpus).

The fact that they are grouped currently is more for convenience and for a next step once I also sort the .pnvm files out along. But I'd prefer to do one step a time as otherwise we get nowhere now. The first step is to get them out of src and then the installer ready for it.

Well no, it's better to makes things properly at first.

This revision now requires changes to proceed.Wed, Apr 24, 4:56 PM

Update to fine(r) grained flavored packages.

I'll put the ports changes into review tomorrow.

usr.sbin/fwget/pci/pci_network_intel
27

I should update this bit as it is no longer the full magic needed; should more likely end up with the driver somewhere to help us update this list.

usr.sbin/fwget/pci/pci_network_qca
35

These two need to be two calls into addpkg() likely to make the duplication detection work properly.

I don't suppose that yhese could be generated automatically? It's a huge table to maintain by hand...

In D44918#1024544, @imp wrote:

I don't suppose that yhese could be generated automatically? It's a huge table to maintain by hand...

Well as some hints in comments indicate some of this can be generated based on one or two scripts; you need bits to select fw files to flavors in ports, you need bits to select PCI IDs to flavors, ... you need that possibly for every branch as things may be different as newer firmware version not accepted by older driver, ... QCA I simply could not find any way to hack it up. For mt76 I have parts; for iwlwifi I need the driver loaded to get the proper list it "thinks" it has, + a script to deal with the firmware repo what is there + a script to bring both together for here. Realtek is currently simply "simple". And for fun parts: you do not always have all the firmware but they are already referenced in the driver for PCI IDs, or you have firmware (needed) used but not referenced by the driver as such but puzzled together.

If it was almost 6AM now I would say "PAAAAAAAAAIIIIIIIIIIIINNNNNNNNNNful" but hey, ext step will be to add all this to the installer...

So I'm not saying we need it now, but we likely need to know if we can... get some sleep

Looks better now, thanks a lot.
Do you have a review for the ports change ?

This revision is now accepted and ready to land.Thu, Apr 25, 8:08 AM

Looks better now, thanks a lot.

Thanks a lot for pushing me to do it now. Was painful but now it is done.

Do you have a review for the ports change ?

The first stage of updates comes the next hours after I finished a rebase and a once-over. I still also have to test a few combinations but I assume review can happen the same time.

  • Fix the two QCA entries which depend on two packages
  • Update the comments on Intel iwlwifi removing some initial logic in favor of a script (it is currently two but I'll try to clean it up and add it either to src or ports to generate both the fwget case pattern and the ports flavor->firmware files list generation)
This revision now requires review to proceed.Thu, Apr 25, 1:08 PM
bz retitled this revision from fwget: update wireless IDs for rtw88/89 and mt76 and add iwlwifi to fwget: update wireless IDs for rtw88/89, ath1xk, mt76 and add iwlwifi.Thu, Apr 25, 1:10 PM
bz edited the summary of this revision. (Show Details)
bz planned changes to this revision.Thu, Apr 25, 8:38 PM
bz added inline comments.
usr.sbin/fwget/pci/pci_network_qca
33–52

FLAVORS need to be [a-z_]*

Update one more time to (hopefully) have all ports/pkackage flavors in lower case.
Also the new files are all script generated.
The scripts will be pushed to github with the next update there before going into main.