mvebu: handle other SKUs as well
[openwrt/openwrt.git] / target / linux / mvebu / base-files / etc / uci-defaults / 03_wireless
1 #!/bin/sh
2 #
3 # Copyright (C) 2015 OpenWrt.org
4 #
5
6 [ ! -e /etc/config/wireless ] && exit 0
7
8 . /lib/mvebu.sh
9
10 board=$(mvebu_board_name)
11
12 case "$board" in
13 armada-xp-mamba)
14 SKU=$(strings /dev/mtd3|sed -ne 's/^cert_region=//p')
15 case "$SKU" in
16 AP)
17 REGD=CN
18 ;;
19 AU)
20 REGD=AU
21 ;;
22 CA)
23 REGD=CA
24 ;;
25 EU)
26 REGD=DE
27 ;;
28 US)
29 REGD=US
30 ;;
31 esac
32 uci get wireless.radio0.country || uci set wireless.radio0.country=$REGD
33 uci get wireless.radio1.country || uci set wireless.radio1.country=$REGD
34 ;;
35 esac
36
37 uci commit wireless
38
39 exit 0