From b95a9f01c1b920051d1662c1eae1a5d01a3d0f74 Mon Sep 17 00:00:00 2001 From: Imre Kaloz Date: Fri, 20 Mar 2015 12:15:40 +0000 Subject: [PATCH] mvebu: set default regdomain Signed-off-by: Imre Kaloz SVN-Revision: 44908 --- .../base-files/etc/uci-defaults/03_wireless | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 target/linux/mvebu/base-files/etc/uci-defaults/03_wireless 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 -- 2.30.2