bfbdeeb3de
Linksys WRT32X (Venom) is identical in hardware to the WRT3200ACM with a different flash layout and boots zImage rather than uImage. Specification: - Marvell Armada 385 88F6820 (2x 1.8GHz) - 256MB of Flash - 512MB of RAM - 2.4GHz (bgn) and 5GHz (an+ac wave 2) - 4x 1Gbps LAN + 1x 1Gbps WAN - 1x USB 3.0 and 1x USB 2.0/eSATA (combo port) Flash instruction: Apply factory image via web-gui. Signed-off-by: Michael Gray <michael.gray@lantisproject.com>
56 lines
1.1 KiB
Bash
56 lines
1.1 KiB
Bash
#!/bin/sh
|
|
#
|
|
# Copyright (C) 2015 OpenWrt.org
|
|
#
|
|
|
|
[ ! -e /etc/config/wireless ] && exit 0
|
|
|
|
. /lib/functions.sh
|
|
. /lib/functions/system.sh
|
|
|
|
board=$(board_name)
|
|
|
|
case "$board" in
|
|
armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-shelby|armada-385-linksys-venom|armada-xp-linksys-mamba)
|
|
SKU=$(strings /dev/mtd3|sed -ne 's/^cert_region=//p')
|
|
WIFIMAC2G=$(macaddr_add $(cat /sys/class/net/eth0/address) +1)
|
|
WIFIMAC5G=$(macaddr_add $WIFIMAC2G +1)
|
|
case "$SKU" in
|
|
AP)
|
|
REGD=CN
|
|
;;
|
|
AU)
|
|
REGD=AU
|
|
;;
|
|
CA)
|
|
REGD=CA
|
|
;;
|
|
EU)
|
|
REGD=DE
|
|
;;
|
|
US)
|
|
REGD=US
|
|
;;
|
|
esac
|
|
|
|
case "$board" in
|
|
armada-xp-linksys-mamba)
|
|
WIFIMAC0=$WIFIMAC2G
|
|
WIFIMAC1=$WIFIMAC5G
|
|
;;
|
|
*)
|
|
WIFIMAC0=$WIFIMAC5G
|
|
WIFIMAC1=$WIFIMAC2G
|
|
;;
|
|
esac
|
|
|
|
uci get wireless.radio0.country || uci set wireless.radio0.country=$REGD
|
|
uci get wireless.@wifi-iface[0].macaddr || uci set wireless.@wifi-iface[0].macaddr=$WIFIMAC0
|
|
uci get wireless.radio1.country || uci set wireless.radio1.country=$REGD
|
|
uci get wireless.@wifi-iface[1].macaddr || uci set wireless.@wifi-iface[1].macaddr=$WIFIMAC1
|
|
;;
|
|
esac
|
|
|
|
uci commit wireless
|
|
|
|
exit 0
|