mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 17:42:41 +00:00
Compare commits
30 Commits
staging-WI
...
uci_defaul
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b72e58b33d | ||
|
|
68dfd58303 | ||
|
|
6ba26cba2b | ||
|
|
b5b276bfcc | ||
|
|
de7dc7e01a | ||
|
|
a967d67af3 | ||
|
|
8a68073f4f | ||
|
|
efd804987e | ||
|
|
b036ba37e3 | ||
|
|
7352de2421 | ||
|
|
8c11eb23a3 | ||
|
|
83874b75f3 | ||
|
|
694cf6ded8 | ||
|
|
0a3a207584 | ||
|
|
b0e95e68a2 | ||
|
|
26ed5acb60 | ||
|
|
d1e4c48617 | ||
|
|
3a8fc316f2 | ||
|
|
d85dc2a819 | ||
|
|
acca9737e4 | ||
|
|
6d2fd1de0d | ||
|
|
1d822a10d2 | ||
|
|
ebdc88ee1f | ||
|
|
778cc679a0 | ||
|
|
088d78faa7 | ||
|
|
5306f7db27 | ||
|
|
c8bffdc250 | ||
|
|
3a3de9e146 | ||
|
|
4d5c9a2d4c | ||
|
|
41aa4c2978 |
@@ -4,19 +4,19 @@ let fs = require("fs");
|
||||
let ubus = require('ubus').connect();
|
||||
|
||||
let gps_info = ubus.call('gps', 'info');
|
||||
let latitude = gps_info.latitude ?? 0;
|
||||
let longitude = gps_info.longitude ?? 0;
|
||||
let latitude = gps_info.latitude || 0;
|
||||
let longitude = gps_info.longitude || 0;
|
||||
|
||||
// afc-location.json file content
|
||||
let afc_location = {};
|
||||
afc_location.location_type = "ellipse";
|
||||
afc_location.location = longitude + ":" + latitude ;
|
||||
afc_location.height = gps_info.elevation ?? 0;
|
||||
afc_location.height = gps_info.elevation || 0;
|
||||
afc_location.height_type = "AMSL";
|
||||
afc_location.major_axis = gps_info.major_axis ?? 0;
|
||||
afc_location.minor_axis = gps_info.minor_axis ?? 0;
|
||||
afc_location.orientation = gps_info.major_orientation ?? 0;
|
||||
afc_location.vertical_tolerance = gps_info.vdop ?? 0;
|
||||
afc_location.major_axis = int(gps_info.major_axis) || 1;
|
||||
afc_location.minor_axis = int(gps_info.minor_axis) || 1;
|
||||
afc_location.orientation = gps_info.major_orientation || 0;
|
||||
afc_location.vertical_tolerance = int(gps_info.vdop) || 1;
|
||||
|
||||
let afc_location_json = fs.open("/etc/ucentral/afc-location.json", "w");
|
||||
afc_location_json.write(afc_location);
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
let libubus = require("ubus");
|
||||
import { open, readfile } from "fs";
|
||||
import { open, readfile, writefile } from "fs";
|
||||
import { wdev_create, wdev_remove, is_equal, vlist_new, phy_is_fullmac, phy_open } from "common";
|
||||
|
||||
let uci = require('uci').cursor();
|
||||
let ubus = libubus.connect(null, 60);
|
||||
|
||||
hostapd.data.config = {};
|
||||
@@ -893,10 +894,24 @@ return {
|
||||
hostapd.ubus.disconnect();
|
||||
},
|
||||
afc_request: function(iface, data) {
|
||||
let ret = ubus.call("afc", "request", { data });
|
||||
if (type(ret) != "object")
|
||||
return;
|
||||
return ret.data;
|
||||
let wireless_config = uci.get_all('wireless');
|
||||
for (let l, afc_server in wireless_config) {
|
||||
if (afc_server['.type'] == 'afc-server' && afc_server.url && data) {
|
||||
hostapd.printf(`Sending AFC request: ${data}`);
|
||||
writefile("/tmp/afc-request.json", data);
|
||||
|
||||
if (afc_server.access_token)
|
||||
system(`curl -s -X POST ${afc_server.url} -H \'accept: \*\/\*\' -H \'Authorization: Bearer ${afc_server.access_token}\' -H \'Content-Type: application/json\' -d \'${data}\' --output /tmp/afc-response.json`);
|
||||
else if (afc_server.cert)
|
||||
system(`curl -s -X POST ${afc_server.url} -H \'accept: \*\/\*\' --cert \'${afc_server.cert}\' -H \'Content-Type: application/json\' -d \'${data}\' --output /tmp/afc-response.json`);
|
||||
|
||||
let afc_response = (readfile("/tmp/afc-response.json"));
|
||||
if (afc_response)
|
||||
return afc_response;
|
||||
else
|
||||
return;
|
||||
}
|
||||
}
|
||||
},
|
||||
bss_add: function(name, obj) {
|
||||
bss_event("add", name);
|
||||
|
||||
@@ -107,29 +107,42 @@ platform_do_upgrade() {
|
||||
|
||||
board=$(board_name)
|
||||
case $board in
|
||||
glinet,b3000|\
|
||||
edgecore,oap101|\
|
||||
edgecore,oap101-6e|\
|
||||
edgecore,oap101e|\
|
||||
edgecore,oap101e-6e|\
|
||||
edgecore,eap104)
|
||||
if [ "$(find_mtd_chardev rootfs)" ]; then
|
||||
CI_UBIPART="rootfs"
|
||||
else
|
||||
if grep -q rootfs1 /proc/cmdline; then
|
||||
CI_UBIPART="rootfs2"
|
||||
CI_FWSETENV="active 2"
|
||||
else
|
||||
CI_UBIPART="rootfs1"
|
||||
CI_FWSETENV="active 1"
|
||||
fi
|
||||
fi
|
||||
nand_upgrade_tar "$1"
|
||||
;;
|
||||
glinet,b3000)
|
||||
CI_UBIPART="rootfs1"
|
||||
[ "$(find_mtd_chardev rootfs)" ] && CI_UBIPART="rootfs"
|
||||
nand_upgrade_tar "$1"
|
||||
;;
|
||||
hfcl,ion4x_w|\
|
||||
hfcl,ion4x_w|\
|
||||
hfcl,ion4xi_w)
|
||||
wp_part=$(fw_printenv primary | cut -d = -f2)
|
||||
echo "Current Primary is $wp_part"
|
||||
if [[ $wp_part == 1 ]]; then
|
||||
CI_UBIPART="rootfs"
|
||||
CI_FWSETENV="primary 0"
|
||||
else
|
||||
CI_UBIPART="rootfs_1"
|
||||
CI_FWSETENV="primary 1"
|
||||
fi
|
||||
nand_upgrade_tar "$1"
|
||||
;;
|
||||
wp_part=$(fw_printenv primary | cut -d = -f2)
|
||||
echo "Current Primary is $wp_part"
|
||||
if [[ $wp_part == 1 ]]; then
|
||||
CI_UBIPART="rootfs"
|
||||
CI_FWSETENV="primary 0"
|
||||
else
|
||||
CI_UBIPART="rootfs_1"
|
||||
CI_FWSETENV="primary 1"
|
||||
fi
|
||||
nand_upgrade_tar "$1"
|
||||
;;
|
||||
cig,wf186w|\
|
||||
cig,wf186h|\
|
||||
emplus,wap385c|\
|
||||
|
||||
@@ -34,13 +34,11 @@ case "$board" in
|
||||
|
||||
if [ -f "$phy0_file" ]; then
|
||||
check_phy0=$(cat $phy0_file)
|
||||
echo "check_phy0 = $check_phy0"
|
||||
[ "$check_phy0" == 0 ] && echo 1 > $phy0_file
|
||||
fi
|
||||
|
||||
if [ -f "$phy1_file" ]; then
|
||||
check_phy1=$(cat $phy1_file)
|
||||
echo "check_phy1 = $check_phy1"
|
||||
[ "$check_phy1" == 0 ] && echo 1 > $phy1_file
|
||||
fi
|
||||
|
||||
|
||||
@@ -4,19 +4,19 @@ let fs = require("fs");
|
||||
let ubus = require('ubus').connect();
|
||||
|
||||
let gps_info = ubus.call('gps', 'info');
|
||||
let latitude = gps_info.latitude ?? 0;
|
||||
let longitude = gps_info.longitude ?? 0;
|
||||
let latitude = gps_info.latitude || 0;
|
||||
let longitude = gps_info.longitude || 0;
|
||||
|
||||
// afc-location.json file content
|
||||
let afc_location = {};
|
||||
afc_location.location_type = "ellipse";
|
||||
afc_location.location = longitude + ":" + latitude ;
|
||||
afc_location.height = gps_info.elevation ?? 0;
|
||||
afc_location.height = gps_info.elevation || 0;
|
||||
afc_location.height_type = "AMSL";
|
||||
afc_location.major_axis = gps_info.major_axis ?? 0;
|
||||
afc_location.minor_axis = gps_info.minor_axis ?? 0;
|
||||
afc_location.orientation = gps_info.major_orientation ?? 0;
|
||||
afc_location.vertical_tolerance = gps_info.vdop ?? 0;
|
||||
afc_location.major_axis = int(gps_info.major_axis) || 1;
|
||||
afc_location.minor_axis = int(gps_info.minor_axis) || 1;
|
||||
afc_location.orientation = gps_info.major_orientation || 0;
|
||||
afc_location.vertical_tolerance = int(gps_info.vdop) || 1;
|
||||
|
||||
let afc_location_json = fs.open("/etc/ucentral/afc-location.json", "w");
|
||||
afc_location_json.write(afc_location);
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
let libubus = require("ubus");
|
||||
import { open, readfile } from "fs";
|
||||
import { open, readfile, writefile } from "fs";
|
||||
import { wdev_remove, is_equal, vlist_new, phy_is_fullmac, phy_open, wdev_set_radio_mask } from "common";
|
||||
|
||||
let uci = require('uci').cursor();
|
||||
let ubus = libubus.connect(null, 60);
|
||||
|
||||
hostapd.data.config = {};
|
||||
@@ -1006,7 +1007,6 @@ let main_obj = {
|
||||
hostapd.data.ubus = ubus;
|
||||
hostapd.data.obj = ubus.publish("hostapd", main_obj);
|
||||
|
||||
|
||||
let auth_obj = {};
|
||||
hostapd.data.auth_obj = ubus.publish("hostapd-auth", auth_obj);
|
||||
|
||||
@@ -1026,10 +1026,24 @@ return {
|
||||
hostapd.ubus.disconnect();
|
||||
},
|
||||
afc_request: function(iface, data) {
|
||||
let ret = ubus.call("afc", "request", { data });
|
||||
if (type(ret) != "object")
|
||||
return;
|
||||
return ret.data;
|
||||
let wireless_config = uci.get_all('wireless');
|
||||
for (let l, afc_server in wireless_config) {
|
||||
if (afc_server['.type'] == 'afc-server' && afc_server.url && data) {
|
||||
hostapd.printf(`Sending AFC request: ${data}`);
|
||||
writefile("/tmp/afc-request.json", data);
|
||||
|
||||
if (afc_server.access_token)
|
||||
system(`curl -s -X POST ${afc_server.url} -H \'accept: \*\/\*\' -H \'Authorization: Bearer ${afc_server.access_token}\' -H \'Content-Type: application/json\' -d \'${data}\' --output /tmp/afc-response.json`);
|
||||
else if (afc_server.cert)
|
||||
system(`curl -s -X POST ${afc_server.url} -H \'accept: \*\/\*\' --cert \'${afc_server.cert}\' -H \'Content-Type: application/json\' -d \'${data}\' --output /tmp/afc-response.json`);
|
||||
|
||||
let afc_response = (readfile("/tmp/afc-response.json"));
|
||||
if (afc_response)
|
||||
return afc_response;
|
||||
else
|
||||
return;
|
||||
}
|
||||
}
|
||||
},
|
||||
bss_create: function(phy, name, obj) {
|
||||
phy = hostapd.data.config[phy];
|
||||
|
||||
@@ -31,6 +31,20 @@
|
||||
stdout-path = "serial0";
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
ramoops@49c00000 {
|
||||
compatible = "ramoops";
|
||||
reg = <0x0 0x49c00000 0x0 0x100000>;
|
||||
record-size = <0x20000>;
|
||||
console-size = <0x20000>;
|
||||
pmsg-size = <0x20000>;
|
||||
};
|
||||
};
|
||||
|
||||
soc@0 {
|
||||
mdio:mdio@90000 {
|
||||
pinctrl-0 = <&mdio1_pins>;
|
||||
|
||||
@@ -190,6 +190,14 @@
|
||||
/delete-node/ wcnss@4a900000;
|
||||
/delete-node/ q6_caldb_region@4ce00000;
|
||||
|
||||
ramoops@49c00000 {
|
||||
compatible = "ramoops";
|
||||
reg = <0x0 0x49c00000 0x0 0x100000>;
|
||||
record-size = <0x20000>;
|
||||
console-size = <0x20000>;
|
||||
pmsg-size = <0x20000>;
|
||||
};
|
||||
|
||||
q6_mem_regions: q6_mem_regions@4A900000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4A900000 0x0 0x5100000>;
|
||||
|
||||
@@ -190,6 +190,14 @@
|
||||
/delete-node/ wcnss@4a900000;
|
||||
/delete-node/ q6_caldb_region@4ce00000;
|
||||
|
||||
ramoops@49c00000 {
|
||||
compatible = "ramoops";
|
||||
reg = <0x0 0x49c00000 0x0 0x100000>;
|
||||
record-size = <0x20000>;
|
||||
console-size = <0x20000>;
|
||||
pmsg-size = <0x20000>;
|
||||
};
|
||||
|
||||
q6_mem_regions: q6_mem_regions@4A900000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4A900000 0x0 0x5100000>;
|
||||
|
||||
@@ -190,6 +190,14 @@
|
||||
/delete-node/ wcnss@4a900000;
|
||||
/delete-node/ q6_caldb_region@4ce00000;
|
||||
|
||||
ramoops@49c00000 {
|
||||
compatible = "ramoops";
|
||||
reg = <0x0 0x49c00000 0x0 0x100000>;
|
||||
record-size = <0x20000>;
|
||||
console-size = <0x20000>;
|
||||
pmsg-size = <0x20000>;
|
||||
};
|
||||
|
||||
q6_mem_regions: q6_mem_regions@4A900000 {
|
||||
no-map;
|
||||
reg = <0x0 0x4A900000 0x0 0x5100000>;
|
||||
|
||||
@@ -100,6 +100,7 @@ endif
|
||||
ifdef CONFIG_TARGET_PROFILE
|
||||
TARGET_PROFILE=$(subst ",,$(CONFIG_TARGET_PROFILE))
|
||||
PATCH_PROFILE_NAME=patches-$(subst DEVICE_,,$(TARGET_PROFILE))
|
||||
FILES_PROFILE_NAME=files-$(subst DEVICE_,,$(TARGET_PROFILE))
|
||||
endif
|
||||
|
||||
QCASSDK_CONFIG_OPTS+= TOOL_PATH=$(TOOLCHAIN_BIN_PATH) \
|
||||
@@ -202,6 +203,15 @@ define patch_profile
|
||||
$(call PatchDir/Default,$(PKG_BUILD_DIR),./$(PATCH_PROFILE_NAME))
|
||||
endef
|
||||
|
||||
define files_profile
|
||||
|
||||
if [ -d "./$(FILES_PROFILE_NAME)" ]; then \
|
||||
$(CP) ./$(FILES_PROFILE_NAME)/* ./files/ ; \
|
||||
fi
|
||||
endef
|
||||
|
||||
Hooks/Prepare/Post += patch_profile
|
||||
Hooks/Prepare/Post += files_profile
|
||||
|
||||
$(eval $(call KernelPackage,qca-ssdk-qca-nohnat))
|
||||
$(eval $(call KernelPackage,qca-ssdk-qca-hnat))
|
||||
|
||||
317
feeds/qca-wifi-7/qca-ssdk-qca/files-zyxel_nwa130be/qca-ssdk
Executable file
317
feeds/qca-wifi-7/qca-ssdk-qca/files-zyxel_nwa130be/qca-ssdk
Executable file
@@ -0,0 +1,317 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (c) 2018, 2021, The Linux Foundation. All rights reserved.
|
||||
# Copyright (c) 2022-2024, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
#
|
||||
# Permission to use, copy, modify, and/or distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
|
||||
START=16
|
||||
|
||||
#!/bin/sh
|
||||
ruletype="ip4 ip6"
|
||||
side="wan lan"
|
||||
qwan="1 3 2 0 5 7 6 4"
|
||||
qlan="0 1 2 3 4 5 6 7"
|
||||
|
||||
function create_war_acl_rules(){
|
||||
for lw in $side
|
||||
do
|
||||
#echo $lw
|
||||
if [ "$lw" == "wan" ];then
|
||||
listid=254
|
||||
queue=$qwan
|
||||
portmap=0x20
|
||||
else
|
||||
listid=255
|
||||
queue=$qlan
|
||||
portmap=0x1e
|
||||
fi
|
||||
#echo $queue
|
||||
#echo "creating list $listid"
|
||||
ssdk_sh acl list create $listid 255
|
||||
ruleid=0
|
||||
for rt in $ruletype
|
||||
do
|
||||
for qid in $queue
|
||||
do
|
||||
cmd="ssdk_sh acl rule add $listid $ruleid 1 n 0 0"
|
||||
#echo $cmd
|
||||
if [ "$rt" == "ip4" ];then
|
||||
cmd="$cmd ip4 n n n n n n n n n n n n n n n n n n n n n n n n n n n n n"
|
||||
#echo $cmd
|
||||
else
|
||||
cmd="$cmd ip6 n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n"
|
||||
#echo $cmd
|
||||
fi
|
||||
if [ $ruleid -le 3 ];then
|
||||
#non-zero dscp
|
||||
cmd="$cmd y 0x0 0xff"
|
||||
elif [ $ruleid -le 7 ];then
|
||||
#zero dscp
|
||||
cmd="$cmd n"
|
||||
elif [ $ruleid -le 11 ];then
|
||||
#non-zero dscp
|
||||
cmd="$cmd y 0x0 0xff"
|
||||
else
|
||||
#zero dscp
|
||||
cmd="$cmd n"
|
||||
fi
|
||||
p=$((ruleid/2))
|
||||
cmd="$cmd y mask $((ruleid%2)) 0x1 y mask $((p%2)) 0x1 n n n n n n n n n n n n n n n y n n n n n n n y $qid n n 0 0 n n n n n n n n n n n n n n n n n n n n 0"
|
||||
#echo $cmd
|
||||
$cmd
|
||||
ruleid=`expr $ruleid + 1`
|
||||
done
|
||||
done
|
||||
ssdk_sh acl list bind $listid 0 1 $portmap
|
||||
done
|
||||
}
|
||||
|
||||
function create_war_cosmap(){
|
||||
ssdk_sh cosmap pri2q set 0 0
|
||||
ssdk_sh cosmap pri2q set 1 0
|
||||
ssdk_sh cosmap pri2q set 2 0
|
||||
ssdk_sh cosmap pri2q set 3 0
|
||||
ssdk_sh cosmap pri2q set 4 1
|
||||
ssdk_sh cosmap pri2q set 5 1
|
||||
ssdk_sh cosmap pri2q set 6 1
|
||||
ssdk_sh cosmap pri2q set 7 1
|
||||
ssdk_sh cosmap pri2ehq set 0 0
|
||||
ssdk_sh cosmap pri2ehq set 1 0
|
||||
ssdk_sh cosmap pri2ehq set 2 0
|
||||
ssdk_sh cosmap pri2ehq set 3 0
|
||||
ssdk_sh cosmap pri2ehq set 4 1
|
||||
ssdk_sh cosmap pri2ehq set 5 1
|
||||
ssdk_sh cosmap pri2ehq set 6 1
|
||||
ssdk_sh cosmap pri2ehq set 7 1
|
||||
}
|
||||
|
||||
function create_acl_byp_egstp_rules(){
|
||||
chip_ver=$1
|
||||
cmd="ssdk_sh servcode config set 1 n 0 0xfffefc7f 0xffbdff 0 0 0 0 0 0"
|
||||
if [ "$chip_ver" == "0x2000" ] || [ "$chip_ver" = "0x2001" ] || [ "$chip_ver" = "0x2100" ]; then
|
||||
cmd="$cmd 0"
|
||||
fi
|
||||
#echo $cmd
|
||||
$cmd
|
||||
|
||||
ssdk_sh acl list create 56 48
|
||||
#action bypass eg stp check
|
||||
action="y n n n n n n n n n n 0 0 n n n n n n n n n n n n n y n n n n n n n n n n n n y n n n n n n n n n n n n n n n n n n"
|
||||
if [ "$chip_ver" == "0x2000" ]; then
|
||||
action="$action n n 0"
|
||||
elif [ "$chip_ver" = "0x2001" ] || [ "$chip_ver" = "0x2100" ]; then
|
||||
action="$action n n n 0"
|
||||
else
|
||||
action="$action 0"
|
||||
fi
|
||||
|
||||
for ruleid in $( seq 0 2 )
|
||||
do
|
||||
if [ "$ruleid" == "0" ];then
|
||||
cmd="ssdk_sh acl rule add 56 0 1 n 0 0 mac n n n n n y 01-80-c2-00-00-00 ff-ff-ff-ff-ff-ff n n n n n n n n n n n n n n n n n n n n n n n"
|
||||
elif [ "$ruleid" == "1" ];then
|
||||
cmd="ssdk_sh acl rule add 56 1 1 n 0 0 mac n n n n n n n yes 0x8809 0xffff n n n n n n n n n n n n n n n n n n n n n"
|
||||
else
|
||||
cmd="ssdk_sh acl rule add 56 2 1 n 0 0 mac n n n n n n n yes 0x888e 0xffff n n n n n n n n n n n n n n n n n n n n n"
|
||||
fi
|
||||
if [ "$chip_ver" == "0x2000" ] || [ "$chip_ver" = "0x2001" ] || [ "$chip_ver" = "0x2100" ]; then
|
||||
cmd="$cmd n $action"
|
||||
else
|
||||
cmd="$cmd $action"
|
||||
fi
|
||||
#echo $cmd
|
||||
$cmd
|
||||
done
|
||||
ssdk_sh acl list bind 56 0 2 1
|
||||
}
|
||||
|
||||
function delete_war_acl_rules(){
|
||||
for lw in $side
|
||||
do
|
||||
#echo $lw
|
||||
if [ "$lw" == "wan" ];then
|
||||
listid=254
|
||||
queue=$qwan
|
||||
portmap=0x20
|
||||
else
|
||||
listid=255
|
||||
queue=$qlan
|
||||
portmap=0x1e
|
||||
fi
|
||||
ssdk_sh acl list unbind $listid 0 1 $portmap
|
||||
for rt in $ruletype
|
||||
do
|
||||
for qid in $queue
|
||||
do
|
||||
cmd="ssdk_sh acl rule del $listid 0 1"
|
||||
echo $cmd
|
||||
$cmd
|
||||
done
|
||||
done
|
||||
#echo "deleting list $listid"
|
||||
ssdk_sh acl list destroy $listid
|
||||
done
|
||||
}
|
||||
|
||||
function delete_war_cosmap(){
|
||||
ssdk_sh cosmap pri2q set 0 0
|
||||
ssdk_sh cosmap pri2q set 1 0
|
||||
ssdk_sh cosmap pri2q set 2 1
|
||||
ssdk_sh cosmap pri2q set 3 1
|
||||
ssdk_sh cosmap pri2q set 4 2
|
||||
ssdk_sh cosmap pri2q set 5 2
|
||||
ssdk_sh cosmap pri2q set 6 3
|
||||
ssdk_sh cosmap pri2q set 7 3
|
||||
ssdk_sh cosmap pri2ehq set 0 1
|
||||
ssdk_sh cosmap pri2ehq set 1 0
|
||||
ssdk_sh cosmap pri2ehq set 2 2
|
||||
ssdk_sh cosmap pri2ehq set 3 2
|
||||
ssdk_sh cosmap pri2ehq set 4 3
|
||||
ssdk_sh cosmap pri2ehq set 5 3
|
||||
ssdk_sh cosmap pri2ehq set 6 4
|
||||
ssdk_sh cosmap pri2ehq set 7 5
|
||||
}
|
||||
|
||||
function delete_acl_byp_egstp_rules(){
|
||||
chip_ver=$1
|
||||
cmd="ssdk_sh servcode config set 1 n 0 0xfffefcff 0xffbfff 0 0 0 0 0 0"
|
||||
if [ "$chip_ver" == "0x2000" ] || [ "$chip_ver" = "0x2001" ] || [ "$chip_ver" = "0x2100" ]; then
|
||||
cmd="$cmd 0"
|
||||
fi
|
||||
#echo $cmd
|
||||
$cmd
|
||||
ssdk_sh acl list unbind 56 0 2 1
|
||||
ssdk_sh acl rule del 56 0 1
|
||||
ssdk_sh acl rule del 56 1 1
|
||||
ssdk_sh acl rule del 56 2 1
|
||||
ssdk_sh acl list destroy 56
|
||||
}
|
||||
|
||||
function edma_war_config_add(){
|
||||
create_war_cosmap
|
||||
ssdk_sh acl status set enable
|
||||
create_war_acl_rules
|
||||
}
|
||||
|
||||
function edma_war_config_del(){
|
||||
delete_war_acl_rules
|
||||
delete_war_cosmap
|
||||
}
|
||||
|
||||
function ipq50xx_serdes_monitor () {
|
||||
#if qca808x phy exist, need to monitor the serdes to avoid the effect for WIFI
|
||||
port_id=2
|
||||
old_linkstatus="DISABLE"
|
||||
phy_id_info=`ssdk_sh port phyid get $port_id | grep Org | awk -F '!' '{print $2}'`
|
||||
if [ "$phy_id_info" = "[Org ID]:0x004d[Rev ID]:0xd101" ]; then
|
||||
ssdk_sh debug phy set 29 0xb 0x300d
|
||||
ssdk_sh debug uniphy set 0 0x7ac 0x300d 4
|
||||
|
||||
while true
|
||||
do
|
||||
cur_linkstatus=`ssdk_sh port linkstatus get $port_id | grep Status | awk -F ':' '{print $2}'`
|
||||
#when qca808x phy link status is from down to up, serdes tx would be enabled
|
||||
if [ "$cur_linkstatus" = "ENABLE" ] && [ "$old_linkstatus" = "DISABLE" ]; then
|
||||
ssdk_sh debug phy set 29 0xb 0xb00d
|
||||
ssdk_sh debug uniphy set 0 0x7ac 0xb00d 4
|
||||
fi
|
||||
#when qca808x phy link status is from up to down, serdes tx would be disabled
|
||||
if [ "$cur_linkstatus" = "DISABLE" ] && [ "$old_linkstatus" = "ENABLE" ]; then
|
||||
ssdk_sh debug phy set 29 0xb 0x300d
|
||||
ssdk_sh debug uniphy set 0 0x7ac 0x300d 4
|
||||
fi
|
||||
old_linkstatus=$cur_linkstatus
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
function ipq53xx_phy_amplitude_set () {
|
||||
#for qca808x phy sgmii, set half amplitude with src_half_swing register
|
||||
port_id=2
|
||||
phy_id_info=`ssdk_sh port phyid get $port_id | grep Org | awk -F '!' '{print $2}'`
|
||||
if [ "$phy_id_info" = "[Org ID]:0x004d[Rev ID]:0xd180" ]; then
|
||||
ssdk_sh debug phy set 5 0x40010087 0x208a
|
||||
ssdk_sh debug phy set 6 0x40010087 0x208a
|
||||
#Set the Reg0x67 bits[7:5]=3’b000 and bit4=1’b1
|
||||
ampl_val=$(eval "ssdk_sh debug phy get 5 0x40010067 | grep SSDK | grep -oE '0x[0-9a-fA-F]+' | sed 's/\(0x..\)./\11/'")
|
||||
ssdk_sh debug phy set 5 0x40010067 $ampl_val
|
||||
ampl_val=$(eval "ssdk_sh debug phy get 6 0x40010067 | grep SSDK | grep -oE '0x[0-9a-fA-F]+' | sed 's/\(0x..\)./\11/'")
|
||||
ssdk_sh debug phy set 6 0x40010067 $ampl_val
|
||||
fi
|
||||
}
|
||||
|
||||
function ipq53xx_uniphy_amplitude_set () {
|
||||
#for ipq50xx sgmii, set half amplitude with tx_emp_lvl/margin_index and tx_margin
|
||||
ssdk_sh debug uniphy set 0 0x7ac 0xb10d 4
|
||||
ssdk_sh debug uniphy set 0 0x24 0 4
|
||||
ssdk_sh debug uniphy set 1 0x7ac 0xb10d 4
|
||||
ssdk_sh debug uniphy set 1 0x24 0 4
|
||||
}
|
||||
|
||||
ssdk_dependency() {
|
||||
counter=0
|
||||
[ -e /lib/modules/$(uname -r)/qca-ssdk.ko ] && [ ! -d /sys/module/qca_ssdk ] && {
|
||||
insmod qca-ssdk.ko
|
||||
}
|
||||
while [ ! -d /sys/ssdk ] && [ "$counter" -le 5 ]
|
||||
do
|
||||
sleep 1
|
||||
counter=$((counter+1))
|
||||
done
|
||||
}
|
||||
|
||||
start() {
|
||||
ssdk_dependency
|
||||
chip_ver=`ssdk_sh debug reg get 0 4 | grep Data | tr -d 'SSDK Init OK![Data]:'`
|
||||
#The following commands should be uncommented to enable EDMA WAR
|
||||
if [ "$chip_ver" = "0x1401" ]; then
|
||||
#edma_war_config_add
|
||||
echo ''
|
||||
fi
|
||||
#The following commands should be uncommented to add acl egress stp bypass rules
|
||||
if [ "$chip_ver" = "0x1500" ] || [ "$chip_ver" = "0x1501" ] || [ "$chip_ver" = "0x2000" ] || [ "$chip_ver" = "0x2001" ] || [ "$chip_ver" = "0x2100" ]; then
|
||||
#create_acl_byp_egstp_rules $chip_ver
|
||||
echo ''
|
||||
fi
|
||||
#The following commands should be uncommented to enable WAR for ipq50xx
|
||||
chip_type_info=`cat tmp/sysinfo/model`
|
||||
result=$(echo $chip_type_info | grep "IPQ5018")
|
||||
if [ "$result" != "" ]; then
|
||||
#ipq50xx_serdes_monitor &
|
||||
#ipq50xx_uniphy_amplitude_set
|
||||
#ipq50xx_phy_amplitude_set
|
||||
echo ''
|
||||
fi
|
||||
if [ "$chip_ver" = "0x2001" ]; then
|
||||
ipq53xx_uniphy_amplitude_set
|
||||
ipq53xx_phy_amplitude_set
|
||||
echo ''
|
||||
fi
|
||||
echo starting
|
||||
}
|
||||
|
||||
stop() {
|
||||
chip_ver=`ssdk_sh debug reg get 0 4 | grep Data | tr -d 'SSDK Init OK![Data]:'`
|
||||
#The following commands should be uncommented to disable EDMA WAR
|
||||
if [ "$chip_ver" = "0x1401" ]; then
|
||||
#edma_war_config_del
|
||||
echo ''
|
||||
fi
|
||||
#The following commands should be uncommented to delete acl egress stp bypass rules
|
||||
if [ "$chip_ver" = "0x1500" ] || [ "$chip_ver" = "0x1501" ] || [ "$chip_ver" = "0x2000" ] || [ "$chip_ver" = "0x2001" ] || [ "$chip_ver" = "0x2100" ]; then
|
||||
#delete_acl_byp_egstp_rules $chip_ver
|
||||
echo ''
|
||||
fi
|
||||
echo stoping
|
||||
}
|
||||
@@ -20,6 +20,7 @@ copy_certificates() {
|
||||
[ -z "$country" ] && country=US
|
||||
echo "options cfg80211 ieee80211_regdom="$country > /etc/modules.conf
|
||||
echo -n $country > /etc/ucentral/country
|
||||
sync
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
||||
@@ -6,13 +6,16 @@ check_certificates() {
|
||||
|
||||
check_certificates
|
||||
|
||||
bootconfig_lookup() {
|
||||
case "$(fw_printenv -n cert_part)" in
|
||||
0) echo "0:BOOTCONFIG"
|
||||
;;
|
||||
1) echo "0:BOOTCONFIG1"
|
||||
;;
|
||||
esac
|
||||
tar_part_lookup() {
|
||||
part="$(fw_printenv -n cert_part)"
|
||||
if [ "$part" -eq 0 ]; then
|
||||
echo "$2"
|
||||
part=1
|
||||
else
|
||||
echo "$1"
|
||||
part=0
|
||||
fi
|
||||
fw_setenv cert_part $part
|
||||
}
|
||||
|
||||
. /lib/functions.sh
|
||||
@@ -35,13 +38,40 @@ sonicfi,rap7*)
|
||||
[ -n "$mtd" ] && mount -t ext4 /dev/mtdblock$mtd /certificates
|
||||
fi
|
||||
if [ ! -f /certificates/cert.pem ] || [ ! -f /certificates/key.pem ]; then
|
||||
bootconfig=$(bootconfig_lookup)
|
||||
if [ -n "$bootconfig" ]; then
|
||||
mmc_dev=$(echo $(find_mmc_part "$bootconfig") | sed 's/^.\{5\}//')
|
||||
part=$(tar_part_lookup "0:BOOTCONFIG" "0:BOOTCONFIG1")
|
||||
if [ -n "part" ]; then
|
||||
mmc_dev=$(echo $(find_mmc_part "$part") | sed 's/^.\{5\}//')
|
||||
[ -n "$mmc_dev" ] && tar xf /dev/$mmc_dev -C /certificates
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
udaya,a5-id2|\
|
||||
yuncore,ax820)
|
||||
mtd=$(find_mtd_index certificates)
|
||||
if [ "$(head -c 4 /dev/mtd$mtd)" == "hsqs" ]; then
|
||||
mount -t squashfs /dev/mtdblock$mtd /mnt
|
||||
cp /mnt/* /certificates
|
||||
umount /mnt
|
||||
fi
|
||||
part=$(tar_part_lookup "insta1" "insta2")
|
||||
if [ -n "insta" ]; then
|
||||
mtd=$(find_mtd_index $part)
|
||||
[ -n "$mtd" ] && tar xf /dev/mtdblock$mtd -C /certificates
|
||||
fi
|
||||
;;
|
||||
sonicfi,rap6*)
|
||||
mtd=$(find_mtd_index certificates)
|
||||
if [ "$(head -c 4 /dev/mtd$mtd)" == "hsqs" ]; then
|
||||
mount -t squashfs /dev/mtdblock$mtd /mnt
|
||||
cp /mnt/* /certificates
|
||||
umount /mnt
|
||||
fi
|
||||
part=$(tar_part_lookup "devinfo" "certificates")
|
||||
if [ -n "$part" ]; then
|
||||
mtd=$(find_mtd_index $part)
|
||||
[ -n "$mtd" ] && tar xf /dev/mtdblock$mtd -C /certificates
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
mtd=$(find_mtd_index certificates)
|
||||
|
||||
|
||||
@@ -1,25 +1,44 @@
|
||||
#!/bin/sh
|
||||
|
||||
bootconfig_lookup() {
|
||||
bootconfig="$(fw_printenv -n cert_part)"
|
||||
case "$(fw_printenv -n cert_part)" in
|
||||
0) echo "0:BOOTCONFIG1"
|
||||
bootconfig=1
|
||||
;;
|
||||
*) echo "0:BOOTCONFIG"
|
||||
bootconfig=0
|
||||
;;
|
||||
esac
|
||||
fw_setenv cert_part $bootconfig
|
||||
tar_part_lookup() {
|
||||
part="$(fw_printenv -n cert_part)"
|
||||
if [ "$part" -eq 0 ]; then
|
||||
echo "$2"
|
||||
part=1
|
||||
else
|
||||
echo "$1"
|
||||
part=0
|
||||
fi
|
||||
fw_setenv cert_part $part
|
||||
}
|
||||
|
||||
. /lib/functions.sh
|
||||
case "$(board_name)" in
|
||||
sonicfi,rap7110c-341x)
|
||||
cd /certificates
|
||||
tar cf /tmp/certs.tar
|
||||
bootconfig=$(bootconfig_lookup)
|
||||
mmc_dev=$(echo $(find_mmc_part $bootconfig) | sed 's/^.\{5\}//')
|
||||
dd if=/tmp/certs.tar of=/dev/$bootconfig
|
||||
tar cf /tmp/certs.tar .
|
||||
part=$(tar_part_lookup "0:BOOTCONFIG" "0:BOOTCONFIG1")
|
||||
mmc_dev=$(echo $(find_mmc_part $part) | sed 's/^.\{5\}//')
|
||||
dd if=/tmp/certs.tar of=/dev/$mmc_dev
|
||||
;;
|
||||
udaya,a5-id2|\
|
||||
yuncore,ax820)
|
||||
cd /certificates
|
||||
tar cf /tmp/certs.tar .
|
||||
part=$(tar_part_lookup "insta1" "insta2")
|
||||
mtd=$(find_mtd_index $part)
|
||||
dd if=/tmp/certs.tar of=/dev/mtdblock$mtd
|
||||
;;
|
||||
sonicfi,rap6*)
|
||||
if [ "$(fw_printenv -n store_certs_disabled)" != "1" ]; then
|
||||
cd /certificates
|
||||
tar cf /tmp/certs.tar .
|
||||
part=$(tar_part_lookup "devinfo" "certificates")
|
||||
mtd=$(find_mtd_index $part)
|
||||
block_size=$(cat /sys/class/mtd/mtd$mtd/size)
|
||||
dd if=/tmp/certs.tar of=/tmp/certs_pad.tar bs=$block_size conv=sync
|
||||
mtd write /tmp/certs_pad.tar /dev/mtd$mtd
|
||||
rm -f /tmp/certs.tar /tmp/certs_pad.tar
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -22,6 +22,19 @@ start_service() {
|
||||
[ "$valid" == "true" ] ||
|
||||
/usr/share/ucentral/ucentral.uc /etc/ucentral/ucentral.cfg.0000000001 > /dev/null
|
||||
|
||||
est_client check
|
||||
[ $? -eq 1 ] && {
|
||||
logger ERROR
|
||||
logger ERROR
|
||||
logger ERROR
|
||||
logger The certificate used has a CN that does not match the serial of the device
|
||||
echo The certificate used has a CN that does not match the serial of the device
|
||||
logger ERROR
|
||||
logger ERROR
|
||||
logger ERROR
|
||||
return
|
||||
}
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG"
|
||||
procd_set_param respawn
|
||||
|
||||
@@ -27,6 +27,8 @@ let timeouts = {
|
||||
'validate': 120,
|
||||
'orphan': 2 * 60 * 60,
|
||||
interval: 10000,
|
||||
expiry_interval: 60 * 60 * 1000,
|
||||
expiry_threshold: 3 * 24 * 60 * 60,
|
||||
};
|
||||
|
||||
ulog_open(ULOG_SYSLOG | ULOG_STDIO, LOG_DAEMON, "cloud_discover");
|
||||
@@ -91,6 +93,7 @@ function gateway_write(data) {
|
||||
}
|
||||
if (changed)
|
||||
fs.writefile('/etc/ucentral/gateway.json', new);
|
||||
system('sync');
|
||||
return changed;
|
||||
}
|
||||
|
||||
@@ -328,6 +331,27 @@ let ubus_methods = {
|
||||
},
|
||||
};
|
||||
|
||||
function expiry_handler() {
|
||||
let stat = fs.stat('/etc/ucentral/operational.ca');
|
||||
if (!stat)
|
||||
return;
|
||||
|
||||
let ret = system(`openssl x509 -checkend ${timeouts.expiry_threshold} -noout -in /certificates/operational.pem`);
|
||||
if (!ret) {
|
||||
ulog(LOG_INFO, 'checked certificate expiry - all ok\n');
|
||||
return;
|
||||
}
|
||||
|
||||
ulog(LOG_INFO, 'certificate will expire soon\n');
|
||||
if (system('/usr/bin/est_client reenroll')) {
|
||||
ulog(LOG_INFO, 'reenroll failed\n');
|
||||
return;
|
||||
}
|
||||
ulog(LOG_INFO, 'reenroll succeeded\n');
|
||||
ulog(LOG_INFO, '(re)starting client\n');
|
||||
system('/etc/init.d/ucentral restart');
|
||||
}
|
||||
|
||||
if (gateway_available()) {
|
||||
let status = ubus.call('ucentral', 'status');
|
||||
ulog(LOG_INFO, 'cloud is known\n');
|
||||
@@ -344,6 +368,7 @@ if (gateway_available()) {
|
||||
timeouts_load();
|
||||
|
||||
interval = uloop.interval(timeouts.interval, interval_handler);
|
||||
uloop.interval(timeouts.expiry_interval, expiry_handler);
|
||||
|
||||
ubus.publish('cloud', ubus_methods);
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
import { ulog_open, ulog, ULOG_SYSLOG, ULOG_STDIO, LOG_DAEMON, LOG_INFO } from 'log';
|
||||
import * as fs from 'fs';
|
||||
import * as libuci from 'uci';
|
||||
|
||||
let store_operational_pem = false;
|
||||
let store_operational_ca = false;
|
||||
@@ -139,6 +140,9 @@ function load_operational_ca() {
|
||||
}
|
||||
|
||||
function fwtool() {
|
||||
if (!fs.stat('/etc/ucentral/cert.pem'))
|
||||
return 0;
|
||||
|
||||
let pipe = fs.popen(`openssl x509 -in /etc/ucentral/cert.pem -noout -issuer`);
|
||||
let issuer = pipe.read("all");
|
||||
pipe.close();
|
||||
@@ -163,6 +167,20 @@ function fwtool() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
function check_cert() {
|
||||
if (!fs.stat('/etc/ucentral/cert.pem'))
|
||||
return 0;
|
||||
let pipe = fs.popen("openssl x509 -in /etc/ucentral/cert.pem -noout -subject -nameopt multiline | grep commonName | awk '{ print $3 }'");
|
||||
let cn = pipe.read("all");
|
||||
pipe.close();
|
||||
if (!cn)
|
||||
return 0;
|
||||
cn = lc(trim(cn));
|
||||
let uci = libuci.cursor();
|
||||
let serial = uci.get('ucentral', 'config', 'serial');
|
||||
return cn != serial;
|
||||
}
|
||||
|
||||
switch(ARGV[0]) {
|
||||
case 'enroll':
|
||||
let ret = simpleenroll();
|
||||
@@ -184,4 +202,7 @@ case 'reenroll':
|
||||
|
||||
case 'fwtool':
|
||||
exit(fwtool());
|
||||
|
||||
case 'check':
|
||||
exit(check_cert());
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ function get_center_channel(channel, band, bw) {
|
||||
"225": 227
|
||||
};
|
||||
} else if (bw == 80) {
|
||||
bw = {
|
||||
center_channel_map = {
|
||||
"1": 7, "5": 7, "9": 7, "13": 7,
|
||||
"17": 23, "21": 23, "25": 23, "29": 23,
|
||||
"33": 39, "37": 39, "41": 39, "45": 39,
|
||||
@@ -236,6 +236,8 @@ function get_center_channel(channel, band, bw) {
|
||||
};
|
||||
} else if (bw == 320) {
|
||||
center_channel_map = {
|
||||
"1": 31, "5": 31, "9": 31, "13": 31,
|
||||
"17": 31, "21": 31, "25": 31, "29": 31,
|
||||
"33": 63, "37": 63, "41": 63, "45": 63,
|
||||
"49": 63, "53": 63, "57": 63, "61": 63,
|
||||
"65": 63, "69": 63, "73": 63, "77": 63,
|
||||
@@ -558,7 +560,7 @@ function random_channel_selection(iface, band, htmode, chan_list_valid) {
|
||||
ulog_info(`[%s] Selected channel list from config (default channel list shall be used in case channels haven't been selected) = %s \n`, iface, (chan_list_valid || '[]'));
|
||||
|
||||
if (band == '2g' && bw >= 40) {
|
||||
ulog_info(`[%s] It is highly recommended to NOT use %dMHz bandwidth for 2.4G radio \n`, iface, bw);
|
||||
ulog_info(`[%s] It is highly recommended to NOT use %dMHz bandwidth for 2.4G radio (RRM will not work properly) \n`, iface, bw);
|
||||
} else if (band == '5g' && bw > 160) {
|
||||
ulog_info(`[%s] %dMHz bandwidth not supported for 5G radio. Please use a bandwidth of 160MHz or lower\n`, iface, bw);
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ start_rtty() {
|
||||
procd_set_param command $BIN -h $host -I "$id" -a
|
||||
[ -n "$port" ] && procd_append_param command -p "$port"
|
||||
[ -n "$description" ] && procd_append_param command -d "$description"
|
||||
[ "$ssl" = "1" ] && procd_append_param command -s -c /etc/ucentral/cert.pem -k /etc/ucentral/key.pem
|
||||
[ "$ssl" = "1" ] && procd_append_param command -s -c /etc/ucentral/operational.pem -k /etc/ucentral/key.pem
|
||||
[ -n "$token" ] && procd_append_param command -t "$token"
|
||||
[ "$verbose" = "1" ] && procd_append_param command -v
|
||||
[ "$timeout" -eq "0" ] || procd_append_param command -e $timeout
|
||||
|
||||
@@ -4,10 +4,10 @@ PKG_NAME:=ucentral-client
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL=https://github.com/Telecominfraproject/wlan-ucentral-client.git
|
||||
PKG_MIRROR_HASH:=2e28e0aa61b74851c7daf3634ec34d303a603e881e6c5d1fd76c837dea527582
|
||||
PKG_MIRROR_HASH:=34c912efa9c0dcdbc6122296e236993484b24b3bc4de51608356304afc8df1c3
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2025-07-08
|
||||
PKG_SOURCE_VERSION:=69829f63ea172ce9bd19b7b02073746fe9cf6a52
|
||||
PKG_SOURCE_DATE:=2025-07-27
|
||||
PKG_SOURCE_VERSION:=c536f6957bd96e57301f9d540b75460119d2a69a
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
|
||||
|
||||
@@ -6,9 +6,9 @@ config ucentral config
|
||||
option reporting 10
|
||||
|
||||
config timeouts timeouts
|
||||
option offline 120
|
||||
option offline 14400
|
||||
option validate 120
|
||||
option orphan 120
|
||||
option orphan 7200
|
||||
|
||||
#config event
|
||||
# option type dhcp
|
||||
|
||||
@@ -4,10 +4,9 @@ PKG_NAME:=ucentral-schema
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL=https://github.com/Telecominfraproject/wlan-ucentral-schema.git
|
||||
PKG_MIRROR_HASH:=9b12cf94b94688aaf2245742ac1cd3d7a2bccade7e248c47c5f13a3dd7c07401
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2025-07-11
|
||||
PKG_SOURCE_VERSION:=b971b73d4cedae6175926373adcdc37a04ced11c
|
||||
PKG_SOURCE_DATE:=2025-08-04
|
||||
PKG_SOURCE_VERSION:=1c6b3095cb9e398fcbfcb2bf995365066eb76b21
|
||||
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ function self_healing() {
|
||||
heal_wifi = false;
|
||||
}
|
||||
|
||||
if (time_passed_since_rrm < 120) {
|
||||
if (time_passed_since_rrm < 180) {
|
||||
// RRM in progress, do not restart network!
|
||||
ulog(LOG_INFO, 'RRM with Channel utilization may still be in progress, cannot restart network \n');
|
||||
heal_wifi = false;
|
||||
@@ -265,7 +265,7 @@ let ubus_methods = {
|
||||
current_state = req.args.state;
|
||||
blink_timeout();
|
||||
ulog(LOG_INFO, 'set state -> ' + req.args.state + '\n');
|
||||
|
||||
|
||||
return state_handler[req.args.state](req.args);
|
||||
},
|
||||
args: {
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
From 0b83834085bf536183b0683f4f86800dbe1e2d39 Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Mon, 28 Jul 2025 07:49:07 +0200
|
||||
Subject: [PATCH] toolchain: use older gcc11 for legacy targets
|
||||
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
toolchain/binutils/Config.version | 1 +
|
||||
toolchain/gcc/Config.version | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/toolchain/binutils/Config.version b/toolchain/binutils/Config.version
|
||||
index c9f8584480..5393d389a5 100644
|
||||
--- a/toolchain/binutils/Config.version
|
||||
+++ b/toolchain/binutils/Config.version
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
config BINUTILS_VERSION_2_37
|
||||
bool
|
||||
+ default y if TARGET_ipq40xx
|
||||
|
||||
config BINUTILS_VERSION_2_38
|
||||
bool
|
||||
diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version
|
||||
index 7126a0c883..b7de3d00e3 100644
|
||||
--- a/toolchain/gcc/Config.version
|
||||
+++ b/toolchain/gcc/Config.version
|
||||
@@ -1,5 +1,6 @@
|
||||
config GCC_VERSION_11
|
||||
default y if GCC_USE_VERSION_11
|
||||
+ default y if TARGET_ipq40xx
|
||||
bool
|
||||
|
||||
config GCC_VERSION_13
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From 309a419087da906a2f3b0f39763f021e9729dd85 Mon Sep 17 00:00:00 2001
|
||||
From: Paul White <paul@shasta.cloud>
|
||||
Date: Mon, 4 Aug 2025 04:14:23 +0000
|
||||
Subject: [PATCH] base-files: boot: add sync after uci-defaults
|
||||
|
||||
A scenario was seen where UCI config was not flushed to disk before
|
||||
an AP power-cycle after uci-defaults was completed. Since these
|
||||
scripts are deleted after being ran once, there is no way to recover
|
||||
without a factory reset.
|
||||
|
||||
Adding this sync operation proved to help avoid this situation from
|
||||
happening
|
||||
|
||||
Signed-off-by: Paul White <paul@shasta.cloud>
|
||||
---
|
||||
package/base-files/files/etc/init.d/boot | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot
|
||||
index 15756669a9..c8a803e32c 100755
|
||||
--- a/package/base-files/files/etc/init.d/boot
|
||||
+++ b/package/base-files/files/etc/init.d/boot
|
||||
@@ -15,6 +15,7 @@ uci_apply_defaults() {
|
||||
( . "./$(basename $file)" ) && rm -f "$file"
|
||||
done
|
||||
uci commit
|
||||
+ sync
|
||||
}
|
||||
|
||||
boot() {
|
||||
--
|
||||
2.43.0
|
||||
|
||||
25
patches/0096-uboot-envtools-add-udaya-id5.patch
Normal file
25
patches/0096-uboot-envtools-add-udaya-id5.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
From d366477af72e725524b47f2fffe8a8c1d500060d Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Thu, 31 Jul 2025 14:45:12 +0200
|
||||
Subject: [PATCH] uboot-envtools: add udaya-id5
|
||||
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
package/boot/uboot-envtools/files/ipq40xx | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/package/boot/uboot-envtools/files/ipq40xx b/package/boot/uboot-envtools/files/ipq40xx
|
||||
index 8d993fae36..78299195bd 100644
|
||||
--- a/package/boot/uboot-envtools/files/ipq40xx
|
||||
+++ b/package/boot/uboot-envtools/files/ipq40xx
|
||||
@@ -42,6 +42,7 @@ luma,wrtq-329acn|\
|
||||
netgear,wac510|\
|
||||
openmesh,a42|\
|
||||
openmesh,a62|\
|
||||
+udaya,a5-id2|\
|
||||
pakedge,wr-1|\
|
||||
plasmacloud,pa1200|\
|
||||
plasmacloud,pa2200)
|
||||
--
|
||||
2.34.1
|
||||
|
||||
36
patches/0097-yuncore_ax820-add-insta1-2-partitions.patch
Normal file
36
patches/0097-yuncore_ax820-add-insta1-2-partitions.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
From 3ceb72aaffa13375c049d161702e9d9f55da38c8 Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Mon, 4 Aug 2025 08:34:50 +0200
|
||||
Subject: [PATCH] yuncore_ax820: add insta1/2 partitions
|
||||
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
target/linux/ramips/dts/mt7621_yuncore_ax820.dts | 12 +++++++++++-
|
||||
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/target/linux/ramips/dts/mt7621_yuncore_ax820.dts b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts
|
||||
index b2f55b9be0..cc1b59340b 100644
|
||||
--- a/target/linux/ramips/dts/mt7621_yuncore_ax820.dts
|
||||
+++ b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts
|
||||
@@ -120,7 +120,17 @@
|
||||
partition@90000 {
|
||||
compatible = "denx,uimage";
|
||||
label = "firmware";
|
||||
- reg = <0x90000 0xf60000>;
|
||||
+ reg = <0x90000 0xf40000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@fd0000 {
|
||||
+ label = "insta1";
|
||||
+ reg = <0xfd0000 0x10000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@fe0000 {
|
||||
+ label = "insta2";
|
||||
+ reg = <0xfe0000 0x10000>;
|
||||
};
|
||||
|
||||
partition@ff0000 {
|
||||
--
|
||||
2.34.1
|
||||
|
||||
39
patches/0099-wireless-regdb-fix-channel-14-in-JP.patch
Normal file
39
patches/0099-wireless-regdb-fix-channel-14-in-JP.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
From d0a0f0304f292a40f2fcdd20b320089627b0f05f Mon Sep 17 00:00:00 2001
|
||||
From: John Crispin <john@phrozen.org>
|
||||
Date: Thu, 7 Aug 2025 14:50:51 +0200
|
||||
Subject: [PATCH] wireless-regdb: fix channel 14 in JP
|
||||
|
||||
Signed-off-by: John Crispin <john@phrozen.org>
|
||||
---
|
||||
.../patches/200-jp-no-channel-14.patch | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
create mode 100644 package/firmware/wireless-regdb/patches/200-jp-no-channel-14.patch
|
||||
|
||||
diff --git a/package/firmware/wireless-regdb/patches/200-jp-no-channel-14.patch b/package/firmware/wireless-regdb/patches/200-jp-no-channel-14.patch
|
||||
new file mode 100644
|
||||
index 0000000000..ea1411cfdd
|
||||
--- /dev/null
|
||||
+++ b/package/firmware/wireless-regdb/patches/200-jp-no-channel-14.patch
|
||||
@@ -0,0 +1,19 @@
|
||||
+--- a/db.txt
|
||||
++++ b/db.txt
|
||||
+@@ -16,8 +16,6 @@ country 00:
|
||||
+ (2402 - 2472 @ 40), (20)
|
||||
+ # Channel 12 - 13.
|
||||
+ (2457 - 2482 @ 20), (20), NO-IR, AUTO-BW
|
||||
+- # Channel 14. Only JP enables this and for 802.11b only
|
||||
+- (2474 - 2494 @ 20), (20), NO-IR, NO-OFDM
|
||||
+ # Channel 36 - 48
|
||||
+ (5170 - 5250 @ 80), (20), AUTO-BW
|
||||
+ # Channel 52 - 64
|
||||
+@@ -945,7 +943,6 @@ country JO: DFS-JP
|
||||
+ # https://www.soumu.go.jp/main_content/000833682.pdf
|
||||
+ country JP: DFS-JP
|
||||
+ (2402 - 2482 @ 40), (20)
|
||||
+- (2474 - 2494 @ 20), (20), NO-OFDM
|
||||
+ (4910 - 4990 @ 40), (23)
|
||||
+ (5170 - 5250 @ 80), (20), AUTO-BW
|
||||
+ (5250 - 5330 @ 80), (20), DFS, AUTO-BW
|
||||
--
|
||||
2.34.1
|
||||
|
||||
12
profiles/edgecore_spw2ac1200.yml
Normal file
12
profiles/edgecore_spw2ac1200.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
profile: edgecore_spw2ac1200
|
||||
target: ipq40xx
|
||||
subtarget: generic
|
||||
description: Build image for the Edgecore spw2ac1200
|
||||
image: bin/targets/ipq40xx/generic/openwrt-ipq40xx-generic-edgecore_spw2ac1200-squashfs-nand-sysupgrade.bin
|
||||
packages:
|
||||
- ipq40xx
|
||||
include:
|
||||
- ucentral-ap
|
||||
- hostapd
|
||||
- target-ipq40xx
|
||||
12
profiles/hfcl_ion4.yml
Normal file
12
profiles/hfcl_ion4.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
profile: hfcl_ion4
|
||||
target: ipq40xx
|
||||
subtarget: generic
|
||||
description: Build image for the HFCL ION4
|
||||
image: bin/targets/ipq40xx/generic/openwrt-ipq40xx-generic-hfcl_ion4-squashfs-nand-sysupgrade.bin
|
||||
packages:
|
||||
- ipq40xx
|
||||
include:
|
||||
- ucentral-ap
|
||||
- hostapd
|
||||
- target-ipq40xx
|
||||
Reference in New Issue
Block a user