mvebu: set default regdomain

Signed-off-by: Imre Kaloz <kaloz@openwrt.org>

SVN-Revision: 44908
lede-17.01
Imre Kaloz 2015-03-20 12:15:40 +00:00
parent 211a4484a1
commit b95a9f01c1
1 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,30 @@
#!/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-mamba)
SKU=$(strings /dev/mtd3|sed -ne 's/^cert_region=//p')
case "$SKU" in
US)
REGD=US
;;
EU)
REGD=DE
;;
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