fwget / mt76: update script to extra firmware and update fget(8)

Update the script to support all the sub-drivers we compile now.
Some minor polishing as well.

Update fwget(8) as more IDs were added.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 91f53f4e062715d869f2cb7e957707255390b704)
This commit is contained in:
Bjoern A. Zeeb 2025-05-05 00:09:46 +00:00 committed by Franco Fichtner
parent 6298b56637
commit 6130192db0
2 changed files with 13 additions and 7 deletions

View file

@ -2,7 +2,7 @@
#-
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2024 The FreeBSD Foundation
# Copyright (c) 2024-2025 The FreeBSD Foundation
#
# This software was developed by Björn Zeeb
# under sponsorship from the FreeBSD Foundation.
@ -14,8 +14,8 @@
# USAGE: please check out the correct tag/hash for ports in the
# linux-firmware.git repository you point this script to.
#
# Valid flavors: mt7915 mt792x {for the drivers with x=[15]} mt7996
# To add a new one you need to add the mappings in the help functions.
# Valid flavors: mt7615 mt7915 mt792x {for the drivers with x=[15]} mt7996
# To add a new one you need to add the mappings in the helper functions.
#
set -e
@ -51,9 +51,10 @@ fi
get_device_ids_by_flav()
{
for d in mt7915 mt7921 mt7925 mt7996; do
for d in mt7615 mt7915 mt7921 mt7925 mt7996; do
case ${d} in
mt7615) flav=${d} ;;
mt7915) flav=${d} ;;
mt7921) flav=mt792x ;;
mt7925) flav=mt792x ;;
@ -79,9 +80,10 @@ get_device_ids_by_flav()
get_firmwares_by_flavor()
{
for h in mt7915/mt7915.h mt792x.h mt7996/mt7996.h; do
for h in mt7615/mt7615.h mt7915/mt7915.h mt792x.h mt7996/mt7996.h; do
case ${h} in
mt7615/mt7615.h) flav=mt7615 ;;
mt7915/mt7915.h) flav=mt7915 ;;
mt792x.h) flav=mt792x ;;
mt7996/mt7996.h) flav=mt7996 ;;
@ -287,6 +289,6 @@ if test ${fn} -gt 0; then
done
fi
printf "INFO: fwget pci_network_qca %s template at %s\n" ${DRIVER} ${fwgetfile} >&2
printf "INFO: fwget pci_network_mediatek %s template at %s\n" ${DRIVER} ${fwgetfile} >&2
# end

View file

@ -2,7 +2,7 @@
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright 2023 Bjoern A. Zeeb
# Copyright (c) 2024 The FreeBSD Foundation
# Copyright (c) 2024-2025 The FreeBSD Foundation
#
# Portions of this software were developed by Björn Zeeb
# under sponsorship from the FreeBSD Foundation.
@ -41,10 +41,14 @@ pci_network_mediatek_mt76()
0x0608) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;;
0x0616) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;;
0x0717) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;;
0x7611) addpkg "wifi-firmware-mediatek-kmod-mt7615"; return 1 ;;
0x7615) addpkg "wifi-firmware-mediatek-kmod-mt7615"; return 1 ;;
0x7663) addpkg "wifi-firmware-mediatek-kmod-mt7615"; return 1 ;;
0x7906) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;;
0x790a) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;;
0x7915) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;;
0x7916) addpkg "wifi-firmware-mediatek-kmod-mt7915"; return 1 ;;
0x7920) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;;
0x7922) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;;
0x7925) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;;
0x7961) addpkg "wifi-firmware-mediatek-kmod-mt792x"; return 1 ;;