1dd8a74e7SBjoern A. Zeeb#- 2dd8a74e7SBjoern A. Zeeb# SPDX-License-Identifier: BSD-2-Clause 3dd8a74e7SBjoern A. Zeeb# 4dd8a74e7SBjoern A. Zeeb# Copyright 2023 Bjoern A. Zeeb 5*d33f5a0aSBjoern A. Zeeb# Copyright (c) 2024 The FreeBSD Foundation 6*d33f5a0aSBjoern A. Zeeb# 7*d33f5a0aSBjoern A. Zeeb# Portions of this software were developed by Björn Zeeb 8*d33f5a0aSBjoern A. Zeeb# under sponsorship from the FreeBSD Foundation. 9dd8a74e7SBjoern A. Zeeb# 10dd8a74e7SBjoern A. Zeeb# Redistribution and use in source and binary forms, with or without 11dd8a74e7SBjoern A. Zeeb# modification, are permitted provided that the following conditions 12dd8a74e7SBjoern A. Zeeb# are met: 13dd8a74e7SBjoern A. Zeeb# 1. Redistributions of source code must retain the above copyright 14dd8a74e7SBjoern A. Zeeb# notice, this list of conditions and the following disclaimer. 15dd8a74e7SBjoern A. Zeeb# 2. Redistributions in binary form must reproduce the above copyright 16dd8a74e7SBjoern A. Zeeb# notice, this list of conditions and the following disclaimer in the 17dd8a74e7SBjoern A. Zeeb# documentation and/or other materials provided with the distribution. 18dd8a74e7SBjoern A. Zeeb# 19dd8a74e7SBjoern A. Zeeb# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 20dd8a74e7SBjoern A. Zeeb# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21dd8a74e7SBjoern A. Zeeb# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22dd8a74e7SBjoern A. Zeeb# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 23dd8a74e7SBjoern A. Zeeb# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24dd8a74e7SBjoern A. Zeeb# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25dd8a74e7SBjoern A. Zeeb# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26dd8a74e7SBjoern A. Zeeb# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27dd8a74e7SBjoern A. Zeeb# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28dd8a74e7SBjoern A. Zeeb# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29dd8a74e7SBjoern A. Zeeb# SUCH DAMAGE. 30dd8a74e7SBjoern A. Zeeb# 31dd8a74e7SBjoern A. Zeeb 32dd8a74e7SBjoern A. Zeeb# rtw88 33dd8a74e7SBjoern A. Zeebpci_network_realtek_rtw88() 34dd8a74e7SBjoern A. Zeeb{ 35dd8a74e7SBjoern A. Zeeb 36dd8a74e7SBjoern A. Zeeb case "$1" in 37*d33f5a0aSBjoern A. Zeeb 38*d33f5a0aSBjoern A. Zeeb # The case pattern table below is generated by a script also helping 39*d33f5a0aSBjoern A. Zeeb # to generate the flavor/firmware Makefile definitions for ports. 40*d33f5a0aSBjoern A. Zeeb # { sys/contrib/dev/rtw88/zzz_fw_ports_fwget.sh } 41*d33f5a0aSBjoern A. Zeeb ### >>> 42*d33f5a0aSBjoern A. Zeeb 43*d33f5a0aSBjoern A. Zeeb 0xd723) addpkg "wifi-firmware-rtw88-kmod-rtw8723d"; return 1 ;; 44*d33f5a0aSBjoern A. Zeeb 0xb821) addpkg "wifi-firmware-rtw88-kmod-rtw8821c"; return 1 ;; 45*d33f5a0aSBjoern A. Zeeb 0xc821) addpkg "wifi-firmware-rtw88-kmod-rtw8821c"; return 1 ;; 46*d33f5a0aSBjoern A. Zeeb 0xb822) addpkg "wifi-firmware-rtw88-kmod-rtw8822b"; return 1 ;; 47*d33f5a0aSBjoern A. Zeeb 0xc822) addpkg "wifi-firmware-rtw88-kmod-rtw8822c"; return 1 ;; 48*d33f5a0aSBjoern A. Zeeb 0xc82f) addpkg "wifi-firmware-rtw88-kmod-rtw8822c"; return 1 ;; 49*d33f5a0aSBjoern A. Zeeb 50*d33f5a0aSBjoern A. Zeeb ### <<< 51dd8a74e7SBjoern A. Zeeb esac 52dd8a74e7SBjoern A. Zeeb} 53dd8a74e7SBjoern A. Zeeb 54dd8a74e7SBjoern A. Zeeb# rtw89 55dd8a74e7SBjoern A. Zeebpci_network_realtek_rtw89() 56dd8a74e7SBjoern A. Zeeb{ 57dd8a74e7SBjoern A. Zeeb 58dd8a74e7SBjoern A. Zeeb case "$1" in 59*d33f5a0aSBjoern A. Zeeb 60*d33f5a0aSBjoern A. Zeeb # The case pattern table below is generated by a script also helping 61*d33f5a0aSBjoern A. Zeeb # to generate the flavor/firmware Makefile definitions for ports. 62*d33f5a0aSBjoern A. Zeeb # { sys/contrib/dev/rtw89/zzz_fw_ports_fwget.sh } 63*d33f5a0aSBjoern A. Zeeb ### >>> 64*d33f5a0aSBjoern A. Zeeb 65*d33f5a0aSBjoern A. Zeeb 0xb851) addpkg "wifi-firmware-rtw89-kmod-rtw8851b"; return 1 ;; 66*d33f5a0aSBjoern A. Zeeb 0x8852) addpkg "wifi-firmware-rtw89-kmod-rtw8852a"; return 1 ;; 67*d33f5a0aSBjoern A. Zeeb 0xa85a) addpkg "wifi-firmware-rtw89-kmod-rtw8852a"; return 1 ;; 68*d33f5a0aSBjoern A. Zeeb 0xb852) addpkg "wifi-firmware-rtw89-kmod-rtw8852b"; return 1 ;; 69*d33f5a0aSBjoern A. Zeeb 0xb85b) addpkg "wifi-firmware-rtw89-kmod-rtw8852b"; return 1 ;; 70*d33f5a0aSBjoern A. Zeeb 0xc852) addpkg "wifi-firmware-rtw89-kmod-rtw8852c"; return 1 ;; 71*d33f5a0aSBjoern A. Zeeb 0x8922) addpkg "wifi-firmware-rtw89-kmod-rtw8922a"; return 1 ;; 72*d33f5a0aSBjoern A. Zeeb 73*d33f5a0aSBjoern A. Zeeb ### <<< 74dd8a74e7SBjoern A. Zeeb esac 75dd8a74e7SBjoern A. Zeeb} 76dd8a74e7SBjoern A. Zeeb 77dd8a74e7SBjoern A. Zeeb 78dd8a74e7SBjoern A. Zeebpci_network_realtek() 79dd8a74e7SBjoern A. Zeeb{ 80dd8a74e7SBjoern A. Zeeb 81dd8a74e7SBjoern A. Zeeb for _drv in rtw88 rtw89; do 82dd8a74e7SBjoern A. Zeeb pci_network_realtek_${_drv} "$1" 83dd8a74e7SBjoern A. Zeeb case $? in 84dd8a74e7SBjoern A. Zeeb 1) break ;; 85dd8a74e7SBjoern A. Zeeb esac 86dd8a74e7SBjoern A. Zeeb done 87dd8a74e7SBjoern A. Zeeb} 88