From 5a7383a111b5dfcc67a56f4a341a06f6bed017a7 Mon Sep 17 00:00:00 2001 From: GoliathLabs Date: Mon, 25 Dec 2023 00:39:38 +0100 Subject: [PATCH 1/5] ramips-mt76x8: add xiaomi-mi-ra75 --- patches/targets-xiaomi-mi-ra75.patch | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 patches/targets-xiaomi-mi-ra75.patch diff --git a/patches/targets-xiaomi-mi-ra75.patch b/patches/targets-xiaomi-mi-ra75.patch new file mode 100644 index 00000000..b71c9b58 --- /dev/null +++ b/patches/targets-xiaomi-mi-ra75.patch @@ -0,0 +1,21 @@ +From ce33817e5dc71a1b9a1b5fb5ad65eee8dbb8b9b5 Mon Sep 17 00:00:00 2001 +From: Felix <8057646+GoliathLabs@users.noreply.github.com> +Date: Mon, 25 Dec 2023 00:34:49 +0100 +Subject: [PATCH] ramips-mt76x8: add xiaomi-mi-ra75 + +--- + targets/ramips-mt76x8 | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/targets/ramips-mt76x8 b/targets/ramips-mt76x8 +index 1e27ac35f8..3fb4d7ff0e 100644 +--- a/targets/ramips-mt76x8 ++++ b/targets/ramips-mt76x8 +@@ -125,3 +125,7 @@ device('xiaomi-mi-router-4a-100m-international-edition', 'xiaomi_mi-router-4a-10 + device('xiaomi-mi-router-4c', 'xiaomi_mi-router-4c', { + factory = false, + }) ++ ++device('xiaomi-mi-ra75', 'xiaomi_mi-ra75', { ++ factory = false, ++}) From 7591778a1370b850bca12fb7bdd1be681b20dca2 Mon Sep 17 00:00:00 2001 From: Felix <8057646+GoliathLabs@users.noreply.github.com> Date: Mon, 25 Dec 2023 17:54:48 +0100 Subject: [PATCH 2/5] fix: primary MAC --- patches/targets-xiaomi-mi-ra75.patch | 37 +++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/patches/targets-xiaomi-mi-ra75.patch b/patches/targets-xiaomi-mi-ra75.patch index b71c9b58..05362182 100644 --- a/patches/targets-xiaomi-mi-ra75.patch +++ b/patches/targets-xiaomi-mi-ra75.patch @@ -1,7 +1,7 @@ From ce33817e5dc71a1b9a1b5fb5ad65eee8dbb8b9b5 Mon Sep 17 00:00:00 2001 From: Felix <8057646+GoliathLabs@users.noreply.github.com> Date: Mon, 25 Dec 2023 00:34:49 +0100 -Subject: [PATCH] ramips-mt76x8: add xiaomi-mi-ra75 +Subject: [PATCH 1/2] ramips-mt76x8: add xiaomi-mi-ra75 --- targets/ramips-mt76x8 | 4 ++++ @@ -19,3 +19,38 @@ index 1e27ac35f8..3fb4d7ff0e 100644 +device('xiaomi-mi-ra75', 'xiaomi_mi-ra75', { + factory = false, +}) + +From 6b1490bee089e336753d70b8b086c082dbfc22ac Mon Sep 17 00:00:00 2001 +From: GoliathLabs +Date: Mon, 25 Dec 2023 17:51:23 +0100 +Subject: [PATCH 2/2] fix: primary mac + +--- + docs/user/supported_devices.rst | 1 + + package/gluon-core/luasrc/lib/gluon/upgrade/010-primary-mac | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst +index 7d606a67ba..4fcb8213b3 100644 +--- a/docs/user/supported_devices.rst ++++ b/docs/user/supported_devices.rst +@@ -505,6 +505,7 @@ ramips-mt76x8 + + * Xiaomi + ++ - Xiaomi Mi AC1200 WLAN Range Extender RA75 + - Xiaomi Mi Router 4A (100M Edition) + - Xiaomi Mi Router 4A (100M International Edition) + - Xiaomi Mi Router 4C +diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/010-primary-mac b/package/gluon-core/luasrc/lib/gluon/upgrade/010-primary-mac +index fce501a6b2..62c6408204 100755 +--- a/package/gluon-core/luasrc/lib/gluon/upgrade/010-primary-mac ++++ b/package/gluon-core/luasrc/lib/gluon/upgrade/010-primary-mac +@@ -106,6 +106,7 @@ local primary_addrs = { + }}, + {'ramips', 'mt76x8', { + 'xiaomi,mi-router-4a-100m', ++ 'xiaomi,mi-ra75', + }}, + {'rockchip', 'armv8', { + 'friendlyarm,nanopi-r2s', From e1d28d090253e9da0ae6b3a1acc0bf82ec8798d3 Mon Sep 17 00:00:00 2001 From: GoliathLabs Date: Tue, 26 Dec 2023 16:02:27 +0100 Subject: [PATCH 3/5] fix: primary mac --- patches/targets-xiaomi-primary-mac.patch | 29 ++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 patches/targets-xiaomi-primary-mac.patch diff --git a/patches/targets-xiaomi-primary-mac.patch b/patches/targets-xiaomi-primary-mac.patch new file mode 100644 index 00000000..2d0679bb --- /dev/null +++ b/patches/targets-xiaomi-primary-mac.patch @@ -0,0 +1,29 @@ +From 034d9f7a1bb62338284935e0df3c794fa07143cf Mon Sep 17 00:00:00 2001 +From: David Bauer +Date: Tue, 26 Dec 2023 01:17:18 +0100 +Subject: [PATCH] ramips: fix label-mac for Xiaomi RA75 + +The label-mac of the repeater is the address used on the 2.4 GHz radio, +not the ethernet MAC. + +Signed-off-by: David Bauer +--- + target/linux/ramips/dts/mt7628an_xiaomi_mi-ra75.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-ra75.dts b/target/linux/ramips/dts/mt7628an_xiaomi_mi-ra75.dts +index 8859038c30..ddbb8b20bf 100644 +--- a/target/linux/ramips/dts/mt7628an_xiaomi_mi-ra75.dts ++++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-ra75.dts +@@ -10,7 +10,7 @@ + led-failsafe = &led_system_amber; + led-running = &led_system_blue; + led-upgrade = &led_system_amber; +- label-mac-device = ðernet; ++ label-mac-device = &wmac; + }; + + leds { +-- +2.43.0 + From d94fc937205c2b655a4cc2c24d905a129c17329e Mon Sep 17 00:00:00 2001 From: Felix <8057646+GoliathLabs@users.noreply.github.com> Date: Tue, 26 Dec 2023 16:56:35 +0100 Subject: [PATCH 4/5] Update targets-xiaomi-primary-mac.patch --- patches/targets-xiaomi-primary-mac.patch | 68 +++++++++++++++--------- 1 file changed, 42 insertions(+), 26 deletions(-) diff --git a/patches/targets-xiaomi-primary-mac.patch b/patches/targets-xiaomi-primary-mac.patch index 2d0679bb..7e1a0533 100644 --- a/patches/targets-xiaomi-primary-mac.patch +++ b/patches/targets-xiaomi-primary-mac.patch @@ -1,29 +1,45 @@ -From 034d9f7a1bb62338284935e0df3c794fa07143cf Mon Sep 17 00:00:00 2001 -From: David Bauer -Date: Tue, 26 Dec 2023 01:17:18 +0100 -Subject: [PATCH] ramips: fix label-mac for Xiaomi RA75 +From f1f02aa4ee726a2fd9f41def8097374dee9e3fcf Mon Sep 17 00:00:00 2001 +From: GoliathLabs +Date: Tue, 26 Dec 2023 16:55:36 +0100 +Subject: [PATCH] fix: primary mac -The label-mac of the repeater is the address used on the 2.4 GHz radio, -not the ethernet MAC. - -Signed-off-by: David Bauer --- - target/linux/ramips/dts/mt7628an_xiaomi_mi-ra75.dts | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-ra75.dts b/target/linux/ramips/dts/mt7628an_xiaomi_mi-ra75.dts -index 8859038c30..ddbb8b20bf 100644 ---- a/target/linux/ramips/dts/mt7628an_xiaomi_mi-ra75.dts -+++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-ra75.dts -@@ -10,7 +10,7 @@ - led-failsafe = &led_system_amber; - led-running = &led_system_blue; - led-upgrade = &led_system_amber; -- label-mac-device = ðernet; -+ label-mac-device = &wmac; - }; - - leds { --- -2.43.0 + patches/openwrt/0008-patch-primary-mac.patch | 29 ++++++++++++++++++++ + 1 file changed, 29 insertions(+) + create mode 100644 patches/openwrt/0008-patch-primary-mac.patch +diff --git a/patches/openwrt/0008-patch-primary-mac.patch b/patches/openwrt/0008-patch-primary-mac.patch +new file mode 100644 +index 0000000000..2d0679bb24 +--- /dev/null ++++ b/patches/openwrt/0008-patch-primary-mac.patch +@@ -0,0 +1,29 @@ ++From 034d9f7a1bb62338284935e0df3c794fa07143cf Mon Sep 17 00:00:00 2001 ++From: David Bauer ++Date: Tue, 26 Dec 2023 01:17:18 +0100 ++Subject: [PATCH] ramips: fix label-mac for Xiaomi RA75 ++ ++The label-mac of the repeater is the address used on the 2.4 GHz radio, ++not the ethernet MAC. ++ ++Signed-off-by: David Bauer ++--- ++ target/linux/ramips/dts/mt7628an_xiaomi_mi-ra75.dts | 2 +- ++ 1 file changed, 1 insertion(+), 1 deletion(-) ++ ++diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-ra75.dts b/target/linux/ramips/dts/mt7628an_xiaomi_mi-ra75.dts ++index 8859038c30..ddbb8b20bf 100644 ++--- a/target/linux/ramips/dts/mt7628an_xiaomi_mi-ra75.dts +++++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-ra75.dts ++@@ -10,7 +10,7 @@ ++ led-failsafe = &led_system_amber; ++ led-running = &led_system_blue; ++ led-upgrade = &led_system_amber; ++- label-mac-device = ðernet; +++ label-mac-device = &wmac; ++ }; ++ ++ leds { ++-- ++2.43.0 ++ From 2d04af8f2a10ca8b5553c6adf0a14555b3b3c596 Mon Sep 17 00:00:00 2001 From: Felix <8057646+GoliathLabs@users.noreply.github.com> Date: Wed, 27 Dec 2023 21:05:56 +0100 Subject: [PATCH 5/5] Update targets-xiaomi-mi-ra75.patch --- patches/targets-xiaomi-mi-ra75.patch | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/patches/targets-xiaomi-mi-ra75.patch b/patches/targets-xiaomi-mi-ra75.patch index 05362182..23f21b42 100644 --- a/patches/targets-xiaomi-mi-ra75.patch +++ b/patches/targets-xiaomi-mi-ra75.patch @@ -42,15 +42,3 @@ index 7d606a67ba..4fcb8213b3 100644 - Xiaomi Mi Router 4A (100M Edition) - Xiaomi Mi Router 4A (100M International Edition) - Xiaomi Mi Router 4C -diff --git a/package/gluon-core/luasrc/lib/gluon/upgrade/010-primary-mac b/package/gluon-core/luasrc/lib/gluon/upgrade/010-primary-mac -index fce501a6b2..62c6408204 100755 ---- a/package/gluon-core/luasrc/lib/gluon/upgrade/010-primary-mac -+++ b/package/gluon-core/luasrc/lib/gluon/upgrade/010-primary-mac -@@ -106,6 +106,7 @@ local primary_addrs = { - }}, - {'ramips', 'mt76x8', { - 'xiaomi,mi-router-4a-100m', -+ 'xiaomi,mi-ra75', - }}, - {'rockchip', 'armv8', { - 'friendlyarm,nanopi-r2s',