From fa6220a6150d402a871cb043f32cee3313005dfc Mon Sep 17 00:00:00 2001 From: John Crispin Date: Thu, 22 Sep 2022 15:11:45 +0200 Subject: [PATCH] ucentral-schema: update to latest HEAD 55b8272 add support for overriding country codes Signed-off-by: John Crispin --- feeds/ucentral/ucentral-schema/Makefile | 4 +-- .../files/etc/board.d/04-regdm | 22 ++++++++++++++ ...se-files-add-ucidef_set_wifi_country.patch | 30 +++++++++++++++++++ 3 files changed, 54 insertions(+), 2 deletions(-) create mode 100755 feeds/ucentral/ucentral-schema/files/etc/board.d/04-regdm create mode 100644 patches/base/0056-base-files-add-ucidef_set_wifi_country.patch diff --git a/feeds/ucentral/ucentral-schema/Makefile b/feeds/ucentral/ucentral-schema/Makefile index 5212d40b2..997f66d72 100644 --- a/feeds/ucentral/ucentral-schema/Makefile +++ b/feeds/ucentral/ucentral-schema/Makefile @@ -4,10 +4,10 @@ PKG_NAME:=ucentral-schema PKG_RELEASE:=1 PKG_SOURCE_URL=https://github.com/Telecominfraproject/wlan-ucentral-schema.git -PKG_MIRROR_HASH:=16cac9b483aa0ab14b2f1d5ab450307b8357baf351c18695046078c9f52661bf +PKG_MIRROR_HASH:=7f11e36e1cb10104bcde0ba0e288f2487fb894a6471605d4dee1460b5be379e0 PKG_SOURCE_PROTO:=git PKG_SOURCE_DATE:=2022-05-29 -PKG_SOURCE_VERSION:=b27df6432c75b05f1721a8afde36f3181362e55b +PKG_SOURCE_VERSION:=55b8272c9cc4500f813f5f1cccdcbb14725b595b PKG_MAINTAINER:=John Crispin PKG_LICENSE:=BSD-3-Clause diff --git a/feeds/ucentral/ucentral-schema/files/etc/board.d/04-regdm b/feeds/ucentral/ucentral-schema/files/etc/board.d/04-regdm new file mode 100755 index 000000000..e5bf5e45c --- /dev/null +++ b/feeds/ucentral/ucentral-schema/files/etc/board.d/04-regdm @@ -0,0 +1,22 @@ +#!/bin/sh + +. /lib/functions/uci-defaults.sh + +board_config_update + +board=$(board_name) + +case "$board" in +cig,wf188n|\ +cig,wf194c4|\ +cig,wf194c|\ +cig,wf610d|\ +cig,wf808|\ +cig,wf196) + ucidef_set_wifi_country 'US' + ;; +esac + +board_config_flush + +exit 0 diff --git a/patches/base/0056-base-files-add-ucidef_set_wifi_country.patch b/patches/base/0056-base-files-add-ucidef_set_wifi_country.patch new file mode 100644 index 000000000..5e3de1aaa --- /dev/null +++ b/patches/base/0056-base-files-add-ucidef_set_wifi_country.patch @@ -0,0 +1,30 @@ +From aa0404504cff8bcdac40d8e9b3ec708d2079d705 Mon Sep 17 00:00:00 2001 +From: John Crispin +Date: Thu, 22 Sep 2022 15:12:20 +0200 +Subject: [PATCH] base-files: add ucidef_set_wifi_country + +Signed-off-by: John Crispin +--- + package/base-files/files/lib/functions/uci-defaults.sh | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh +index ff3433a0a2..3bc8e6bb1c 100644 +--- a/package/base-files/files/lib/functions/uci-defaults.sh ++++ b/package/base-files/files/lib/functions/uci-defaults.sh +@@ -627,6 +627,12 @@ ucidef_set_wifi_scanning() { + json_select .. + } + ++ucidef_set_wifi_country() { ++ json_select_object wifi ++ json_add_string country $1 ++ json_select .. ++} ++ + ucidef_set_ntpserver() { + local server + +-- +2.25.1 +