- Update fwget(8) to download wifi-firmware-mt76-kmod-mt7921, and wifi-firmware-mt76-kmod-mt7925 for suitable PCI devices
- Update fwget(8) to recognize ITTIM PCI cards
- Update the mt76/zzz_fw_ports_fwget.sh script to download mt7921 and mt7925 rather than non-existent mt792x firmware.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Not saying that I'll take them but where did you get the two Realtek driver files from?
The ones I am aware off are different, that's why I am asking.
I started by copying the file for rtw8821ce, which I noticed had very little device-specific code, and added the device codes based on the PCI ID repository. I later found some similar implementations on (https://github.com/lwfinger/rtw88), so I assumed it was mostly correct.
I do not have the devices, so I can't test the drivers. I added the files mainly so the fwget script could pick up on them. If they are an issue, I will remove them from the differential.
If you can remove the realtek bits for now, I'll review the mediatek bits and @emaste or I can commit them then.
This isn't quite correct yet (though probably not wrong).
mt7921 has an entry for a different vendor as well these days:
{ PCI_DEVICE(PCI_VENDOR_ID_ITTIM, 0x7922),
.driver_data = (kernel_ulong_t)MT7922_FIRMWARE_WM },Not sure anymore if the script doesn't check or if it simply didn't barf and it goes unnoticed as it is the same device ID as for mediatek?
Another reason we need a newer fwget (I should get back and rewrite my lua take I) to avoid adding different files for vendors but rather have the logical unit be a driver or similar. *sigh*
I would suggest, for now, to manually add the extra file to fwget and not try to automate this just yet. Maybe a printf saying to check for other vendor IDs in the driver or to list them at the end?
grep -r PCI_VENDOR_ID sys/contrib/dev/mediatek/mt76/ | grep -v PCI_VENDOR_ID_MEDIATEK
sys/contrib/dev/mediatek/mt76/mt7921/pci.c: { PCI_DEVICE(PCI_VENDOR_ID_ITTIM, 0x7922),I've added the ITTIM device. I'm not sure whether it's one of the exceptions for PCI class like some other cards are, so I've assumed that it has the standard 0x02 code for network cards.