git: 0be82d56b44f - main - fwget: update pci_network_mediatek for mt7996
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 23 May 2023 23:41:57 UTC
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=0be82d56b44fbe157d4bf1c125eca6625486d17f commit 0be82d56b44fbe157d4bf1c125eca6625486d17f Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2023-05-23 23:40:05 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2023-05-23 23:41:24 +0000 fwget: update pci_network_mediatek for mt7996 Add support for another chipset and fix mt7915 to not match on all IDs. --- usr.sbin/fwget/pci/pci_network_mediatek | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/usr.sbin/fwget/pci/pci_network_mediatek b/usr.sbin/fwget/pci/pci_network_mediatek index 5de31e6661eb..5e4d2af9eb26 100644 --- a/usr.sbin/fwget/pci/pci_network_mediatek +++ b/usr.sbin/fwget/pci/pci_network_mediatek @@ -29,13 +29,11 @@ pci_network_mediatek_mt7915() { - # awk '/PCI_DEVICE\(PCI_VENDOR_ID_MEDIATEK,/ { gsub(").*", "", $3); printf "%s)\taddpkg \"wifi-firmware-mt76-kmod\"; return 1 ;;\n", tolower($3) }' *.c + # awk 'BEGIN { x = 0; } { if (/mt7915_pci_device_table/) { x=1 }; if (/^\};/) { x=0 }; if (x==1 && /PCI_DEVICE\(PCI_VENDOR_ID_MEDIATEK,/) { gsub(").*", "", $3); printf "%s)\taddpkg \"wifi-firmware-mt76-kmod\"; return 1 ;;\n", tolower($3) } }' *.c case "$1" in 0x7915) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; 0x7906) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - 0x7916) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; - 0x790a) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; esac } @@ -43,7 +41,7 @@ pci_network_mediatek_mt7915() pci_network_mediatek_mt7921() { - # awk '/PCI_DEVICE\(PCI_VENDOR_ID_MEDIATEK,/ { gsub(").*", "", $3); printf "%s)\taddpkg \"wifi-firmware-mt76-kmod\"; return 1 ;;\n", tolower($3) }' *.c + # awk 'BEGIN { x = 0; } { if (/mt7921_pci_device_table/) { x=1 }; if (/^\};/) { x=0 }; if (x==1 && /PCI_DEVICE\(PCI_VENDOR_ID_MEDIATEK,/) { gsub(").*", "", $3); printf "%s)\taddpkg \"wifi-firmware-mt76-kmod\"; return 1 ;;\n", tolower($3) } }' *.c case "$1" in 0x7961) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; 0x7922) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; @@ -52,11 +50,20 @@ pci_network_mediatek_mt7921() esac } +# mt7996 +pci_network_mediatek_mt7996() +{ + + # awk 'BEGIN { x = 0; } { if (/mt7996_pci_device_table/) { x=1 }; if (/^\};/) { x=0 }; if (x==1 && /PCI_DEVICE\(PCI_VENDOR_ID_MEDIATEK,/) { gsub(").*", "", $3); printf "%s)\taddpkg \"wifi-firmware-mt76-kmod\"; return 1 ;;\n", tolower($3) } }' *.c + case "$1" in + 0x7990) addpkg "wifi-firmware-mt76-kmod"; return 1 ;; + esac +} pci_network_mediatek() { - for _drv in mt7915 mt7921; do + for _drv in mt7915 mt7921 mt7996; do pci_network_mediatek_${_drv} "$1" case $? in 1) break ;;