mt76: add firmware package for mt7916
authorAndrew Powers-Holmes <aholmes@omnom.net>
Tue, 1 Nov 2022 06:06:32 +0000 (17:06 +1100)
committerFelix Fietkau <nbd@nbd.name>
Wed, 9 Nov 2022 19:43:32 +0000 (20:43 +0100)
Add kernel package 'mt7916-firmware' with firmware files for MT7916E devices.

These share the same driver as the MT7915 chipset, but use their own firmware.

Tested using a pair of AsiaRF AW7916-NPD cards.

Signed-off-by: Andrew Powers-Holmes <aholmes@omnom.net>
package/kernel/mt76/Makefile

index 628ea79ec93d2f97fdca77f8864867f781fe269c..5b71a91a3afa592bf93c9f9733bdf91622b72174 100644 (file)
@@ -226,6 +226,12 @@ define KernelPackage/mt7915e
   AUTOLOAD:=$(call AutoProbe,mt7915e)
 endef
 
+define KernelPackage/mt7916-firmware
+  $(KernelPackage/mt76-default)
+  DEPENDS+=+kmod-mt7915e
+  TITLE:=MediaTek MT7916 firmware
+endef
+
 define KernelPackage/mt7986-firmware
   $(KernelPackage/mt76-default)
   DEPENDS:=@TARGET_mediatek_filogic
@@ -460,6 +466,15 @@ define KernelPackage/mt7915e/install
                $(1)/lib/firmware/mediatek
 endef
 
+define KernelPackage/mt7916-firmware/install
+       $(INSTALL_DIR) $(1)/lib/firmware/mediatek
+       cp \
+               $(PKG_BUILD_DIR)/firmware/mt7916_wa.bin \
+               $(PKG_BUILD_DIR)/firmware/mt7916_wm.bin \
+               $(PKG_BUILD_DIR)/firmware/mt7916_rom_patch.bin \
+               $(1)/lib/firmware/mediatek
+endef
+
 define KernelPackage/mt7986-firmware/install
        $(INSTALL_DIR) $(1)/lib/firmware/mediatek
        cp \
@@ -508,6 +523,7 @@ $(eval $(call KernelPackage,mt7663-usb-sdio))
 $(eval $(call KernelPackage,mt7663u))
 $(eval $(call KernelPackage,mt7663s))
 $(eval $(call KernelPackage,mt7915e))
+$(eval $(call KernelPackage,mt7916-firmware))
 $(eval $(call KernelPackage,mt7986-firmware))
 $(eval $(call KernelPackage,mt7921-common))
 $(eval $(call KernelPackage,mt7921u))