diff options
author | Imre Kaloz <kaloz@openwrt.org> | 2015-03-20 12:15:40 +0000 |
---|---|---|
committer | Imre Kaloz <kaloz@openwrt.org> | 2015-03-20 12:15:40 +0000 |
commit | b95a9f01c1b920051d1662c1eae1a5d01a3d0f74 (patch) | |
tree | af4fb4acc1586c024fd9360510b5cab3823e1992 | |
parent | 211a4484a1a992280129a2ad9874addf26fa5555 (diff) | |
download | mtk-20170518-b95a9f01c1b920051d1662c1eae1a5d01a3d0f74.zip mtk-20170518-b95a9f01c1b920051d1662c1eae1a5d01a3d0f74.tar.gz mtk-20170518-b95a9f01c1b920051d1662c1eae1a5d01a3d0f74.tar.bz2 |
mvebu: set default regdomain
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
SVN-Revision: 44908
-rw-r--r-- | target/linux/mvebu/base-files/etc/uci-defaults/03_wireless | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/target/linux/mvebu/base-files/etc/uci-defaults/03_wireless b/target/linux/mvebu/base-files/etc/uci-defaults/03_wireless new file mode 100644 index 0000000..89ed47c --- /dev/null +++ b/target/linux/mvebu/base-files/etc/uci-defaults/03_wireless @@ -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 |