From fb4774e2f40b3da4537a7f89d9f1bc880ed8ecb8 Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Fri, 18 Aug 2023 20:34:17 +0200 Subject: [PATCH] Add two popular MT7921U devices to the driver pid so they work OOB Signed-off-by: Igor --- .../compilation/patch/drivers-harness.sh | 1 + .../compilation/patch/drivers_network.sh | 8 +++++ patch/misc/wireless-mt7921u-add-pids.patch | 30 +++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 patch/misc/wireless-mt7921u-add-pids.patch diff --git a/lib/functions/compilation/patch/drivers-harness.sh b/lib/functions/compilation/patch/drivers-harness.sh index beb4c31367..8814e6f0c2 100644 --- a/lib/functions/compilation/patch/drivers-harness.sh +++ b/lib/functions/compilation/patch/drivers-harness.sh @@ -86,6 +86,7 @@ function kernel_drivers_prepare_harness() { declare -a all_drivers=( driver_generic_bring_back_ipx + driver_mt7921u_add_pids driver_rtl8152_rtl8153 driver_rtl8189ES driver_rtl8189FS diff --git a/lib/functions/compilation/patch/drivers_network.sh b/lib/functions/compilation/patch/drivers_network.sh index c8c57007db..9f2c8e714b 100644 --- a/lib/functions/compilation/patch/drivers_network.sh +++ b/lib/functions/compilation/patch/drivers_network.sh @@ -17,6 +17,14 @@ function driver_generic_bring_back_ipx() { fi } +driver_mt7921u_add_pids() { + # Add two popular cheap USB devices to the table + if linux-version compare "${version}" ge 6.1 && linux-version compare "${version}" lt 6.2; then + display_alert "Mediatek MT7921u" "Add Comfast CF952A and Netgear AXE3000" "info" + process_patch_file "${SRC}/patch/misc/wireless-mt7921u-add-pids.patch" "applying" + fi +} + driver_rtl8152_rtl8153() { # Updated USB network drivers for RTL8152/RTL8153 based dongles that also support 2.5Gbs variants if linux-version compare "${version}" ge 5.4 && linux-version compare "${version}" le 5.12 && [ "$LINUXFAMILY" != mvebu64 ] && [ "$LINUXFAMILY" != rk322x ] && [ "$LINUXFAMILY" != odroidxu4 ] ; then diff --git a/patch/misc/wireless-mt7921u-add-pids.patch b/patch/misc/wireless-mt7921u-add-pids.patch new file mode 100644 index 0000000000..08a7d046db --- /dev/null +++ b/patch/misc/wireless-mt7921u-add-pids.patch @@ -0,0 +1,30 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Igor Pecovnik +Date: Fri, 18 Aug 2023 17:52:55 +0000 +Subject: Adding Comfast CF-952AX and Netgear AXE3000 pids + +Signed-off-by: Igor Pecovnik +--- + drivers/net/wireless/mediatek/mt76/mt7921/usb.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/usb.c b/drivers/net/wireless/mediatek/mt76/mt7921/usb.c +index 521bcd577..c13ee23dd 100644 +--- a/drivers/net/wireless/mediatek/mt76/mt7921/usb.c ++++ b/drivers/net/wireless/mediatek/mt76/mt7921/usb.c +@@ -12,10 +12,12 @@ + #include "mcu.h" + #include "mac.h" + + static const struct usb_device_id mt7921u_device_table[] = { + { USB_DEVICE_AND_INTERFACE_INFO(0x0e8d, 0x7961, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(0x3574, 0x6211, 0xff, 0xff, 0xff) }, /* Comfast CF-952AX */ ++ { USB_DEVICE_AND_INTERFACE_INFO(0x0846, 0x9060, 0xff, 0xff, 0xff) }, /* Netgear AXE3000 */ + { }, + }; + + static u32 mt7921u_rr(struct mt76_dev *dev, u32 addr) + { +-- +Created with Armbian build tools https://github.com/armbian/build +