aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/mt7622/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
diff options
context:
space:
mode:
authorLanghua Ye <y1248289414@outlook.com>2022-03-04 21:41:46 +0800
committerHauke Mehrtens <hauke@hauke-m.de>2022-03-05 21:06:35 +0100
commitce8a33b021a703b1933f627835f6cdc88c0ecdd3 (patch)
tree6b62d616706a0df5b04802b068f81b11b5ac76d5 /target/linux/mediatek/mt7622/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
parentdf1383f7964527b2e7178ae744cd167a2c230f9f (diff)
downloadupstream-ce8a33b021a703b1933f627835f6cdc88c0ecdd3.tar.gz
upstream-ce8a33b021a703b1933f627835f6cdc88c0ecdd3.tar.bz2
upstream-ce8a33b021a703b1933f627835f6cdc88c0ecdd3.zip
mediatek: add support for Ruijie RG-EW3200GX PRO
X32 Pro is another product name for it in the Chinese market. Specifications: - SoC: MT7622B - RAM: 256MB - Flash: XMC XM25QH128C or Winbond WQ25Q128JVSQ 16MB SPI NOR - Ethernet: 5x1GbE - Switch: MT7531BE - WiFi: 2.4G: MT7622 5G: MT7915AN+MT7975AN - 3LEDs: System LED(blue) + Mesh LED(green) + Mesh LED(red) - 2Keys: Mesh button + Reset button - UART: Marked J19 on board. 3.3v, 115200n1 - Power: 12V 2.5A MAC addresses as verified by OEM firmware: use address source WAN *:F4 ethaddr@product_info LAN *:F5 5g *:F6 2g *:F7 Flash instruction: 1. Serve the initramfs.img using a TFTP server with address 10.10.10.3. 2. Interrupt the uboot startup process via UART. 3. Select "System Load Linux to SDRAM via TFTP" item. 4. (important) Back up firmware(mtd7) partitions with: dd if=/dev/mtd7 of=/tmp/firmware.bin and then download the firmware.bin image via SCP. 5. Flash the OpenWrt sysupgrade firmware. Recovery stock firmware: 1. Transfer the firmware.bin image to the device. 2. Flash the image with: mtd write firmware.bin firmware Signed-off-by: Langhua Ye <y1248289414@outlook.com>
Diffstat (limited to 'target/linux/mediatek/mt7622/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac')
-rw-r--r--target/linux/mediatek/mt7622/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac17
1 files changed, 17 insertions, 0 deletions
diff --git a/target/linux/mediatek/mt7622/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/mt7622/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
new file mode 100644
index 0000000000..d573465745
--- /dev/null
+++ b/target/linux/mediatek/mt7622/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
@@ -0,0 +1,17 @@
+[ "$ACTION" == "add" ] || exit 0
+
+PHYNBR=${DEVPATH##*/phy}
+
+[ -n $PHYNBR ] || exit 0
+
+. /lib/functions.sh
+. /lib/functions/system.sh
+
+board=$(board_name)
+
+case "$board" in
+ ruijie,rg-ew3200gx-pro)
+ [ "$PHYNBR" = "0" ] && macaddr_add $(get_mac_label) 3 > /sys${DEVPATH}/macaddress
+ [ "$PHYNBR" = "1" ] && macaddr_add $(get_mac_label) 2 > /sys${DEVPATH}/macaddress
+ ;;
+esac