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 | 124ba26fbe0dfd5d69109b926ae123bcb5abf941 (patch) | |
tree | ae1b412cc6248d9834d7241e4cfe454162d903e1 /target/linux/mvebu/base-files/etc | |
parent | a8d8e2b2509bcc2270b9a530afc518f4d55291b5 (diff) | |
download | master-187ad058-124ba26fbe0dfd5d69109b926ae123bcb5abf941.tar.gz master-187ad058-124ba26fbe0dfd5d69109b926ae123bcb5abf941.tar.bz2 master-187ad058-124ba26fbe0dfd5d69109b926ae123bcb5abf941.zip |
mvebu: set default regdomain
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44908 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/mvebu/base-files/etc')
-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 0000000000..89ed47c91a --- /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 |