Compare commits

...

11 Commits

Author SHA1 Message Date
Jakob Olsson
7ecad30e87 map-agent: 4.1.7 2021-09-08 16:17:22 +02:00
Jakob Olsson
f289e94b83 map-agent: 4.1.6 2021-08-26 16:36:46 +02:00
Jakob Olsson
be660f8f1c map-controller: 3.0.13 2021-08-26 16:32:33 +02:00
Jakob Olsson
198b2df969 map-agent: multiap: propagate enabled to mapcontroller conf via wireless 2021-08-26 14:55:05 +02:00
Jakob Olsson
dbfb62cc8a map-controller: sync mapcontroller creds from wireless uci 2021-08-20 15:26:15 +02:00
Jakob Olsson
d1ded0acf7 ieee1905: 3.3.3 2021-08-18 09:42:30 +02:00
Jakob Olsson
ff52804fcb Revert "ieee1905: 3.3.3"
This reverts commit f3c7410240.
2021-08-18 09:40:16 +02:00
Jakob Olsson
f3c7410240 ieee1905: 3.3.3 2021-08-18 09:18:31 +02:00
Jakob Olsson
1519ba425d map-agent: 4.1.5 2021-08-18 09:09:03 +02:00
Jakob Olsson
3fe69b828a map-controller: 3.0.12 2021-08-18 09:08:30 +02:00
Jakob Olsson
3dffaa30e8 map-agent: 4.1.4: move iface teardown to platform script 2021-08-11 11:31:40 +02:00
5 changed files with 162 additions and 8 deletions

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ieee1905
PKG_VERSION:=3.3.2
PKG_VERSION:=3.3.3
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=b7c3f2b45ff232415d32eb97badeb43845ae878d
PKG_SOURCE_VERSION:=9d29a3ce6c186ea20fadb6ed8cc3e8bda0fd7d54
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ieee1905.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip

View File

@@ -5,9 +5,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-agent
PKG_VERSION:=4.1.3
PKG_VERSION:=4.1.7
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=e15d11e438a89934dd9326ad7404641af048917c
PKG_SOURCE_VERSION:=296d49b4c2246e1dc63d3fbd4543c94a16b524e5
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_LICENSE:=PROPRIETARY IOPSYS

View File

@@ -7,7 +7,7 @@
# write_credentials - write bBSS credentials to fBSS
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
diff=0
usage() {
@@ -136,9 +136,11 @@ brcm_write_credentials() {
config_get device $section device
config_get multi_ap $section multi_ap "0"
config_get enabled $section enabled "1"
#echo found dev=$dev device=$device map=$multi_ap
[ "$enabled" == "0" ] && return
[ "$device" != "$dev" ] && return
[ "$multi_ap" != "1" ] && return
@@ -226,6 +228,152 @@ write_bsta_config() {
}
brcm_teardown_iface() {
config_load mapagent
local iface=$1
mapagent_teardown_wireless() {
write_wireless() {
local section=$1
local map_ifname=$2
config_get ifname $section ifname
[ "$ifname" != "$map_ifname" ] && return
uci -q set wireless.${section}.start_disabled="1"
uci -q set wireless.${section}.ssid="DISABLED-SSID"
uci -q set wireless.${section}.key="DISABLED-KEY"
uci -q delete wireless.${section}.multi_ap_backhaul_ssid
uci -q delete wireless.${section}.multi_ap_backhaul_key
}
config_load wireless
config_foreach write_wireless wifi-iface $1
}
mapagent_teardown_bss() {
local section=$1
local iface=$2
config_get ifname $section ifname
[ "$iface" != "$ifname" ] && return
config_get ifname $section ifname
uci -q set mapagent.${section}.enabled="0"
uci -q set mapagent.${section}.ssid="DISABLED-SSID"
uci -q set mapagent.${section}.key="DISABLED-KEY"
# subshell in hopes to maintain mapagent config loaded
$(mapagent_teardown_wireless $ifname)
}
config_foreach mapagent_teardown_bss fh-iface $iface
uci commit wireless
uci commit mapagent
}
sync_mapcontroller_from_wireless() {
ubus -t 5 wait_for wifi
[ "$?" != "0" ] && return
[ ! -f "/etc/config/wireless" ] && return
status=$(ubus -S call wifi status)
device_to_band() {
local ifname=$1
json_load "$status"
json_select "radios"
json_get_keys keys
for key in $keys; do
json_select $key
json_get_var name name
if [ "$name" != "$ifname" ]; then
json_select ..
continue
fi
json_get_var band band
if [ "$band" == "5GHz" ]; then
echo "5"
elif [ "$band" == "2.4GHz" ]; then
echo "2"
fi
break
done
json_cleanup
}
wireless_process_iface() {
local section=$1
local type=""
local enabled="1"
config_get multi_ap $section multi_ap 0
[ "$multi_ap" == "0" ] && return
config_get mode $section mode "ap"
[ "$mode" != "ap" ] && return
if [ "$multi_ap" == "1" ]; then
type="bk-credentials"
else
type="fh-credentials"
fi
config_get ssid $section ssid
config_get key $section key
config_get encryption $section encryption
config_get device $section device
config_get start_disabled $section start_disabled "0"
band=$(device_to_band $device)
[ "$band" == "" ] && return
cntlr_section=$(uci add mapcontroller ${type})
uci set mapcontroller.${cntlr_section}.ssid="$ssid"
uci set mapcontroller.${cntlr_section}.key="$key"
uci set mapcontroller.${cntlr_section}.encryption="$encryption"
uci set mapcontroller.${cntlr_section}.band="$band"
uci set mapcontroller.${cntlr_section}.vlan="1"
uci set mapcontroller.${cntlr_section}.multi_ap="$multi_ap"
[ "$start_disabled" == "1" ] && enabled="0"
uci set mapcontroller.${cntlr_section}.enabled="$enabled"
}
mapcontroller_teardown() {
local section=$1
uci delete mapcontroller.$1
}
config_load mapcontroller
config_foreach mapcontroller_teardown bk-credentials
config_foreach mapcontroller_teardown fh-credentials
config_load wireless
config_foreach wireless_process_iface wifi-iface
uci commit mapcontroller
}
func=$1
shift
@@ -237,6 +385,8 @@ case "$func" in
sync_credentials) brcm_sync_credentials;;
bsta_steer) bsta_steer $@;;
write_bsta_config) write_bsta_config $@;;
teardown_iface) brcm_teardown_iface $@;;
sync_mapcontroller_from_wireless) sync_mapcontroller_from_wireless $@;;
--help|help) usage;;
*) usage; exit 1;;
esac

View File

@@ -5,9 +5,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-controller
PKG_VERSION:=3.0.11
PKG_VERSION:=3.0.13
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=3545f418887d8ac0404cbe44d192ab20626e5268
PKG_SOURCE_VERSION:=92ade3227473bd7755b0443f3d1e99a1b44c4065
PKG_LICENSE:=PROPRIETARY IOPSYS
PKG_LICENSE_FILES:=LICENSE

View File

@@ -19,6 +19,8 @@ start_service() {
config_get_bool enabled controller enabled 1
[ "$enabled" -eq 0 ] && return
/lib/wifi/multiap sync_mapcontroller_from_wireless
procd_open_instance
procd_set_param command "/usr/sbin/mapcontroller" "-d"
@@ -38,12 +40,14 @@ start_service() {
service_triggers()
{
procd_add_reload_trigger "mapcontroller"
procd_add_reload_trigger "mapcontroller" "wireless"
}
reload_service() {
local enabled
/lib/wifi/multiap sync_mapcontroller_from_wireless
config_load "mapcontroller"
config_get_bool enabled controller enabled 1
if [ "$enabled" -eq 0 ]; then