Skip to content

Commit e3bfaaf

Browse files
author
FFAC
committed
add various patches
fb7430-mac address add tp-link ax23 add temp mt7915 mcu tryout wax220-leds
1 parent 7af94dd commit e3bfaaf

4 files changed

+261
-0
lines changed

patches/fb7430-mac.patch

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
diff --git a/patches/openwrt/17618.patch b/patches/openwrt/17618.patch
2+
new file mode 100644
3+
index 00000000..da642017
4+
--- /dev/null
5+
+++ b/patches/openwrt/17618.patch
6+
@@ -0,0 +1,30 @@
7+
+From 1a56f8ffdc668123585544d1b17b99a5faecdd4d Mon Sep 17 00:00:00 2001
8+
+From: Florian Maurer <[email protected]>
9+
+Date: Wed, 15 Jan 2025 21:31:47 +0100
10+
+Subject: [PATCH] lantiq-xrx200: fb7430 set correct label-mac
11+
+
12+
+Signed-off-by: Florian Maurer <[email protected]>
13+
+---
14+
+ target/linux/lantiq/xrx200/base-files/etc/board.d/02_network | 2 ++
15+
+ 1 file changed, 2 insertions(+)
16+
+
17+
+diff --git a/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network b/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network
18+
+index 8c2cdb12af51f7..bf907578970cdb 100644
19+
+--- a/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network
20+
++++ b/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network
21+
+@@ -125,6 +125,7 @@ lantiq_setup_macs()
22+
+ tffsdev=$(find_mtd_chardev "nand-tffs")
23+
+ lan_mac=$(/usr/bin/fritz_tffs_nand -d $tffsdev -n maca -o)
24+
+ wan_mac=$(/usr/bin/fritz_tffs_nand -d $tffsdev -n macdsl -o)
25+
++ label_mac=$lan_mac
26+
+ ;;
27+
+ bt,homehub-v5a)
28+
+ lan_mac=$(mtd_get_mac_binary_ubi caldata 0x110c)
29+
+@@ -142,6 +143,7 @@ lantiq_setup_macs()
30+
+
31+
+ [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" "$lan_mac"
32+
+ [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" "$wan_mac"
33+
++ [ -n "$label_mac" ] && ucidef_set_label_macaddr "$label_mac"
34+
+ }
35+
+
36+
+ board_config_update

patches/mt7915-mcu-fixer.patch

+159
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
From ceb3262db91a4065437ccdf4f7bec2e56d4eb05c Mon Sep 17 00:00:00 2001
2+
From: David Bauer <[email protected]>
3+
Date: Mon, 13 Jan 2025 09:06:06 +0100
4+
Subject: [PATCH] mt76: import MT7915 recovery fixes
5+
6+
---
7+
...10-mt76-import-MT7915-recovery-fixes.patch | 143 ++++++++++++++++++
8+
1 file changed, 143 insertions(+)
9+
create mode 100644 patches/openwrt/0010-mt76-import-MT7915-recovery-fixes.patch
10+
11+
diff --git a/patches/openwrt/0010-mt76-import-MT7915-recovery-fixes.patch b/patches/openwrt/0010-mt76-import-MT7915-recovery-fixes.patch
12+
new file mode 100644
13+
index 0000000000..6eaf2da555
14+
--- /dev/null
15+
+++ b/patches/openwrt/0010-mt76-import-MT7915-recovery-fixes.patch
16+
@@ -0,0 +1,143 @@
17+
+From: David Bauer <[email protected]>
18+
+Date: Mon, 13 Jan 2025 11:52:37 +0100
19+
+Subject: mt76: import MT7915 recovery fixes
20+
+
21+
+diff --git a/package/kernel/mt76/patches/0001-mt7915-mcu-lower-default-timeout.patch b/package/kernel/mt76/patches/0001-mt7915-mcu-lower-default-timeout.patch
22+
+new file mode 100644
23+
+index 0000000000000000000000000000000000000000..f05d6b830f6c323e8e0dce4ebaf1cc9689f43c86
24+
+--- /dev/null
25+
++++ b/package/kernel/mt76/patches/0001-mt7915-mcu-lower-default-timeout.patch
26+
+@@ -0,0 +1,32 @@
27+
++From 0a577333e89f49fd29f07b70d4d865d221451ac0 Mon Sep 17 00:00:00 2001
28+
++From: David Bauer <[email protected]>
29+
++Date: Mon, 13 Jan 2025 08:48:41 +0100
30+
++Subject: [PATCH 1/3] mt7915: mcu: lower default timeout
31+
++
32+
++The default timeout set in mt76_connac2_mcu_fill_message of 20 seconds
33+
++leads to excessive stalling in case messages are lost.
34+
++
35+
++Testing showed that a much smaller timeout of 3 seconds is sufficient
36+
++in normal operation.
37+
++
38+
++Signed-off-by: David Bauer <[email protected]>
39+
++---
40+
++ mt7915/mcu.c | 2 ++
41+
++ 1 file changed, 2 insertions(+)
42+
++
43+
++diff --git a/mt7915/mcu.c b/mt7915/mcu.c
44+
++index 9d790f23..809d8f99 100644
45+
++--- a/mt7915/mcu.c
46+
+++++ b/mt7915/mcu.c
47+
++@@ -197,6 +197,8 @@ mt7915_mcu_parse_response(struct mt76_dev *mdev, int cmd,
48+
++ static void
49+
++ mt7915_mcu_set_timeout(struct mt76_dev *mdev, int cmd)
50+
++ {
51+
+++ mdev->mcu.timeout = 3 * HZ;
52+
+++
53+
++ if ((cmd & __MCU_CMD_FIELD_ID) != MCU_CMD_EXT_CID)
54+
++ return;
55+
++
56+
++--
57+
++2.45.2
58+
++
59+
+diff --git a/package/kernel/mt76/patches/0002-mt7915-mcu-increase-command-timeout.patch b/package/kernel/mt76/patches/0002-mt7915-mcu-increase-command-timeout.patch
60+
+new file mode 100644
61+
+index 0000000000000000000000000000000000000000..2aedb9fd791912dd2800074762e316ad27f41d90
62+
+--- /dev/null
63+
++++ b/package/kernel/mt76/patches/0002-mt7915-mcu-increase-command-timeout.patch
64+
+@@ -0,0 +1,34 @@
65+
++From 49894f4ce805ccb73fe0a09c53ffcc8aeaf712b5 Mon Sep 17 00:00:00 2001
66+
++From: David Bauer <[email protected]>
67+
++Date: Mon, 13 Jan 2025 08:51:30 +0100
68+
++Subject: [PATCH 2/3] mt7915: mcu: increase command timeout
69+
++
70+
++Increase the timeout for MCU_EXT_CMD_EFUSE_BUFFER_MODE as
71+
++well as MCU_EXT_CMD_TXBF_ACTION command types.
72+
++
73+
++Regular retries upon hardware-recovery have been observed. Increasing
74+
++the timeout slightly remedies this problem.
75+
++
76+
++Signed-off-by: David Bauer <[email protected]>
77+
++---
78+
++ mt7915/mcu.c | 4 ++++
79+
++ 1 file changed, 4 insertions(+)
80+
++
81+
++diff --git a/mt7915/mcu.c b/mt7915/mcu.c
82+
++index 809d8f99..f3e9f9f0 100644
83+
++--- a/mt7915/mcu.c
84+
+++++ b/mt7915/mcu.c
85+
++@@ -210,6 +210,10 @@ mt7915_mcu_set_timeout(struct mt76_dev *mdev, int cmd)
86+
++ case MCU_EXT_CMD_BSS_INFO_UPDATE:
87+
++ mdev->mcu.timeout = 2 * HZ;
88+
++ return;
89+
+++ case MCU_EXT_CMD_EFUSE_BUFFER_MODE:
90+
+++ case MCU_EXT_CMD_TXBF_ACTION:
91+
+++ mdev->mcu.timeout = 5 * HZ;
92+
+++ return;
93+
++ default:
94+
++ break;
95+
++ }
96+
++--
97+
++2.45.2
98+
++
99+
+diff --git a/package/kernel/mt76/patches/0003-mt7915-mcu-re-init-MCU-before-loading-FW-patch.patch b/package/kernel/mt76/patches/0003-mt7915-mcu-re-init-MCU-before-loading-FW-patch.patch
100+
+new file mode 100644
101+
+index 0000000000000000000000000000000000000000..c97d4b1d6fd61f3c231dee6971dd019561c313f3
102+
+--- /dev/null
103+
++++ b/package/kernel/mt76/patches/0003-mt7915-mcu-re-init-MCU-before-loading-FW-patch.patch
104+
+@@ -0,0 +1,55 @@
105+
++From 1177b55da6fbc3d095383b3bcfe4ac741985dbff Mon Sep 17 00:00:00 2001
106+
++From: David Bauer <[email protected]>
107+
++Date: Sun, 12 Jan 2025 15:30:54 +0100
108+
++Subject: [PATCH 3/3] mt7915: mcu: re-init MCU before loading FW patch
109+
++
110+
++Restart the MCU and release the patch semaphore before loading the MCU
111+
++patch firmware from the host.
112+
++
113+
++This fixes failures upon error recovery in case the semaphore was
114+
++previously taken and never released by the host.
115+
++
116+
++Signed-off-by: David Bauer <[email protected]>
117+
++---
118+
++ mt7915/mcu.c | 25 +++++++++++++++----------
119+
++ 1 file changed, 15 insertions(+), 10 deletions(-)
120+
++
121+
++diff --git a/mt7915/mcu.c b/mt7915/mcu.c
122+
++index f3e9f9f0..e03292a8 100644
123+
++--- a/mt7915/mcu.c
124+
+++++ b/mt7915/mcu.c
125+
++@@ -2098,16 +2098,21 @@ static int mt7915_load_firmware(struct mt7915_dev *dev)
126+
++ {
127+
++ int ret;
128+
++
129+
++- /* make sure fw is download state */
130+
++- if (mt7915_firmware_state(dev, false)) {
131+
++- /* restart firmware once */
132+
++- mt76_connac_mcu_restart(&dev->mt76);
133+
++- ret = mt7915_firmware_state(dev, false);
134+
++- if (ret) {
135+
++- dev_err(dev->mt76.dev,
136+
++- "Firmware is not ready for download\n");
137+
++- return ret;
138+
++- }
139+
+++ /* Release Semaphore if taken by previous failed attempt */
140+
+++ ret = mt76_connac_mcu_patch_sem_ctrl(&dev->mt76, false);
141+
+++ if (ret != PATCH_REL_SEM_SUCCESS) {
142+
+++ dev_err(dev->mt76.dev, "Could not release semaphore\n");
143+
+++ /* Continue anyways */
144+
+++ }
145+
+++
146+
+++ /* Always restart MCU firmware */
147+
+++ mt76_connac_mcu_restart(&dev->mt76);
148+
+++
149+
+++ /* Check if MCU is ready */
150+
+++ ret = mt7915_firmware_state(dev, false);
151+
+++ if (ret) {
152+
+++ dev_err(dev->mt76.dev, "Firmware did not enter download state\n");
153+
+++ return ret;
154+
++ }
155+
++
156+
++ ret = mt76_connac2_load_patch(&dev->mt76, fw_name_var(dev, ROM_PATCH));
157+
++--
158+
++2.45.2
159+
++

patches/targets-ramips-mt7621.patch

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/targets/ramips-mt7621 b/targets/ramips-mt7621
2+
index 10c9d19f..fc9faf36 100644
3+
--- a/targets/ramips-mt7621
4+
+++ b/targets/ramips-mt7621
5+
@@ -105,6 +105,8 @@ device('tp-link-re500-v1', 'tplink_re500-v1')
6+
7+
device('tp-link-re650-v1', 'tplink_re650-v1')
8+
9+
+device('tp-link-archer-ax23-v1', 'tplink_archer-ax23-v1')
10+
+
11+
12+
-- Ubiquiti
13+

patches/wax220-leds.patch

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
diff --git a/patches/openwrt/17627.patch b/patches/openwrt/17627.patch
2+
new file mode 100644
3+
index 00000000..107fccbf
4+
--- /dev/null
5+
+++ b/patches/openwrt/17627.patch
6+
@@ -0,0 +1,47 @@
7+
+From 6b48afba4fc39d053e02d8b944846ee16a8f985e Mon Sep 17 00:00:00 2001
8+
+From: Florian Maurer <[email protected]>
9+
+Date: Thu, 16 Jan 2025 09:29:55 +0100
10+
+Subject: [PATCH] mediatek-filogic: fix wax220 wifi leds
11+
+
12+
+The WAX220 does have a 2.4GHz and 5GHz wifi led, which was set to trigger on netdev before.
13+
+This commit changes this to trigger on activity of the respective radio
14+
+
15+
+Signed-off-by: Florian Maurer <[email protected]>
16+
+---
17+
+ target/linux/mediatek/dts/mt7986b-netgear-wax220.dts | 2 ++
18+
+ target/linux/mediatek/filogic/base-files/etc/board.d/01_leds | 2 --
19+
+ 2 files changed, 2 insertions(+), 2 deletions(-)
20+
+
21+
+diff --git a/target/linux/mediatek/dts/mt7986b-netgear-wax220.dts b/target/linux/mediatek/dts/mt7986b-netgear-wax220.dts
22+
+index 6e51d884702358..9537afba898aed 100644
23+
+--- a/target/linux/mediatek/dts/mt7986b-netgear-wax220.dts
24+
++++ b/target/linux/mediatek/dts/mt7986b-netgear-wax220.dts
25+
+@@ -67,6 +67,7 @@
26+
+ wlan2g_blue {
27+
+ gpios = <&pio 1 GPIO_ACTIVE_LOW>;
28+
+ label = "blue:wlan2g";
29+
++ linux,default-trigger = "phy0tpt";
30+
+ };
31+
+
32+
+ lan_green {
33+
+@@ -84,6 +85,7 @@
34+
+ wlan5g_blue {
35+
+ gpios = <&pio 2 GPIO_ACTIVE_LOW>;
36+
+ label = "blue:wlan5g";
37+
++ linux,default-trigger = "phy1tpt";
38+
+ };
39+
+ };
40+
+ };
41+
+diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
42+
+index a6bb9b0ca8ac30..fded01a73ea783 100644
43+
+--- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
44+
++++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
45+
+@@ -66,8 +66,6 @@ mercusys,mr90x-v1-ubi)
46+
+ ;;
47+
+ netgear,wax220)
48+
+ ucidef_set_led_netdev "eth0" "LAN" "green:lan" "eth0"
49+
+- ucidef_set_led_netdev "wlan2g" "WLAN2G" "blue:wlan2g" "phy0-ap0"
50+
+- ucidef_set_led_netdev "wlan5g" "WLAN5G" "blue:wlan5g" "phy1-ap0"
51+
+ ;;
52+
+ nokia,ea0326gmp)
53+
+ ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1" "link"

0 commit comments

Comments
 (0)