cfg80211: pass default country code to cfg80211 during module load

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2023-11-30 11:03:06 +01:00
parent 3ce4088499
commit 367415663f
3 changed files with 13 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/sh /etc/rc.common
START=80
START=09
copy_certificates() {
[ -f /certificates/key.pem ] || return
@@ -10,9 +10,18 @@ copy_certificates() {
chmod 0440 root.network /etc/ucentral/*.pem
[ -f /certificates/gateway.json ] && cp /certificates/gateway.json /etc/ucentral/
[ -f /certificates/dev-id ] && cp /certificates/dev-id /etc/ucentral/
[ -f /etc/ucentral/dev-id] && chmod 0400 /etc/ucentral/dev-id
[ -f /etc/ucentral/dev-id ] && chmod 0400 /etc/ucentral/dev-id
[ -f /certificates/restrictions.json ] && cp /certificates/restrictions.json /etc/ucentral/
[ -f /certificates/sign_pubkey.pem ] && cp /certificates/sign_pubkey.pem /etc/ucentral/
country=`cat /certificates/ucentral.defaults | jsonfilter -e '@.country'`
[ -z "$country" -a -f /etc/uci-defaults/30_uboot-envtools ] && {
(. /etc/uci-defaults/30_uboot-envtools)
fw_printenv
country=$(fw_printenv -n country)
}
[ -z "$country" ] && country=US
echo "options cfg80211 ieee80211_regdom="$country > /etc/modules.conf
echo -n $country > /etc/ucentral/country
exit 0
}

View File

@@ -18,7 +18,7 @@ cig,wf660a)
;;
cig,wf188n|\
cig,wf196)
ucidef_set_wifi_country "$(cat /lib/firmware/country)"
ucidef_set_wifi_country "US CA MY DE"
;;
esac

View File

@@ -63,6 +63,7 @@ packages:
- umdns
- oping
- vxlan
- wireless-regdb
- wpad-openssl
diffconfig: |
CONFIG_OPENSSL_ENGINE=y