mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2024-06-14 11:13:53 +02:00
57cb387cfe
JCG Q20 is an AX 1800M router. Hardware specs: SoC: MediaTek MT7621AT Flash: Winbond W29N01HV 128 MiB RAM: Winbond W632GU6NB-11 256 MiB WiFi: MT7915 2.4/5 GHz 2T2R Ethernet: 10/100/1000 Mbps x3 LED: Status (red / blue) Button: Reset, WPS Power: DC 12V,1A Flash instructions: Upload factory.bin in stock firmware's upgrade page, do not preserve settings. MAC addresses map: 0x00004 *:3e wlan2g/wlan5g 0x3fff4 *:3c lan/label 0x3fffa *:3c wan Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
29 lines
718 B
Plaintext
29 lines
718 B
Plaintext
[ "$ACTION" == "add" ] || exit 0
|
|
|
|
PHYNBR=${DEVPATH##*/phy}
|
|
|
|
[ -n $PHYNBR ] || exit 0
|
|
|
|
. /lib/functions.sh
|
|
. /lib/functions/system.sh
|
|
|
|
board=$(board_name)
|
|
|
|
case "$board" in
|
|
glinet,gl-mt1300)
|
|
[ "$PHYNBR" = "1" ] && \
|
|
macaddr_add "$(mtd_get_mac_binary factory 0x4)" 1 > /sys${DEVPATH}/macaddress
|
|
;;
|
|
jcg,q20)
|
|
[ "$PHYNBR" = "1" ] && \
|
|
macaddr_setbit_la "$(mtd_get_mac_binary Factory 0x4)" > /sys${DEVPATH}/macaddress
|
|
;;
|
|
linksys,ea7300-v1|\
|
|
linksys,ea7300-v2|\
|
|
linksys,ea7500-v2)
|
|
hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
|
[ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress
|
|
[ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress
|
|
;;
|
|
esac
|