mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 16:31:13 +00:00
b0ad24f0d5
Signed-off-by: Imre Kaloz <kaloz@openwrt.org> SVN-Revision: 45400
40 lines
548 B
Bash
40 lines
548 B
Bash
#!/bin/sh
|
|
#
|
|
# Copyright (C) 2015 OpenWrt.org
|
|
#
|
|
|
|
[ ! -e /etc/config/wireless ] && exit 0
|
|
|
|
. /lib/mvebu.sh
|
|
|
|
board=$(mvebu_board_name)
|
|
|
|
case "$board" in
|
|
armada-xp-linksys-mamba)
|
|
SKU=$(strings /dev/mtd3|sed -ne 's/^cert_region=//p')
|
|
case "$SKU" in
|
|
AP)
|
|
REGD=CN
|
|
;;
|
|
AU)
|
|
REGD=AU
|
|
;;
|
|
CA)
|
|
REGD=CA
|
|
;;
|
|
EU)
|
|
REGD=DE
|
|
;;
|
|
US)
|
|
REGD=US
|
|
;;
|
|
esac
|
|
uci get wireless.radio0.country || uci set wireless.radio0.country=$REGD
|
|
uci get wireless.radio1.country || uci set wireless.radio1.country=$REGD
|
|
;;
|
|
esac
|
|
|
|
uci commit wireless
|
|
|
|
exit 0
|