mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-22 10:03:57 +08:00
Compare commits
1 Commits
json-edito
...
openvswitc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b1986c99e |
@@ -1,16 +1,9 @@
|
||||
/*
|
||||
* Copyright (C) 2019 iopsys Software Solutions AB. All rights reserved.
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*/
|
||||
#
|
||||
# Copyright (C) 2016 inteno
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
@@ -21,15 +14,12 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_VERSION:=f614cba983d827d5185c60a6a5a35530621d44d2
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/mediatek/ated.git
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/ated
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
# support parallel build
|
||||
#PKG_BUILD_PARALLEL:=1
|
||||
|
||||
|
||||
@@ -13,9 +13,6 @@ PKG_MD5SUM:=b72c17870bfab2fd791b1f6de4d79f9e
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=none
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
if PACKAGE_libbbfdm
|
||||
|
||||
config LIBBBFDM_VENDOR_PREFIX
|
||||
string "Vendor Prefix"
|
||||
default "X_IOPSYS_EU_"
|
||||
|
||||
config BBF_TR181
|
||||
bool "Compile with tr181 device features"
|
||||
default y
|
||||
|
||||
config BBF_TR104
|
||||
bool "Compile with tr104 voice features"
|
||||
default y
|
||||
|
||||
config BBF_TR143
|
||||
bool "Compile with tr143 diagnostics features"
|
||||
default y
|
||||
|
||||
config BBF_TR157
|
||||
bool "Compile with tr157 bulkdata collector features"
|
||||
default y
|
||||
|
||||
config BBF_TR064
|
||||
bool "Compile with tr064 features"
|
||||
default n
|
||||
|
||||
endif
|
||||
87
bbf/Makefile
87
bbf/Makefile
@@ -1,87 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2019 Iopsys
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libbbfdm
|
||||
PKG_VERSION:=1.0-2019-10-01
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bbf.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=b3bae9df19df35075ac52f53758288d8e0573790
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libbbfdm
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Library for broadband-forum data model
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libtrace
|
||||
endef
|
||||
|
||||
define Package/libbbfdm/config
|
||||
source "$(SOURCE)/Config_bbfdm.in"
|
||||
endef
|
||||
|
||||
define Package/libbbfdm/description
|
||||
Test description will update later.
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += -DCUSTOM_PREFIX=\\\"$(CONFIG_LIBBBFDM_VENDOR_PREFIX)\\\"
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-D_GNU_SOURCE -D_AADJ
|
||||
|
||||
ifeq ($(CONFIG_BBF_TR181),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-tr181
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_BBF_TR104),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-tr104
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_BBF_TR143),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-tr143
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_BBF_TR157),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-tr157
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_BBF_TR064),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-tr064
|
||||
endif
|
||||
|
||||
define Package/libbbfdm/install
|
||||
$(INSTALL_DIR) $(1)/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/bin/.libs/libbbfdm.so* $(1)/lib/
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/dmmap $(1)/etc/bbfdm
|
||||
$(INSTALL_DIR) $(1)/usr/share/bbfdm
|
||||
$(CP) $(PKG_BUILD_DIR)/scripts/functions $(1)/usr/share/bbfdm
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/include/libbbfdm
|
||||
$(CP) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/libbbfdm/
|
||||
$(CP) $(PKG_BUILD_DIR)/dmtree/tr181/*.h $(1)/usr/include/libbbfdm/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/bin/.libs/libbbfdm.{a,so*} $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libbbfdm))
|
||||
@@ -1,42 +0,0 @@
|
||||
#
|
||||
# Copright (C) 2018 The Internet Foundation In Sweden
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bbk_cli
|
||||
PKG_SOURCE_VERSION:=7b810a696c78b746185c11282bdbe3fb7f8c5d4b
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/dotse/bbk.git
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/bbk_cli
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libpthread +libstdcpp
|
||||
TITLE:=Bredbandskollen CLI - A bandwidth measurement tool
|
||||
endef
|
||||
|
||||
define Package/bbk_cli/description
|
||||
To measure connection speed in an environment that is missing a web browser,
|
||||
for example, in a server, you can use our command line interface bbk_cli,
|
||||
which is available for some of the most common operating systems.
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR)/src/cli CROSS_COMPILE="$(TARGET_CROSS)"
|
||||
endef
|
||||
|
||||
define Package/bbk_cli/install
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/cli/cli $(1)/sbin/bbk_cli
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,bbk_cli))
|
||||
@@ -1,25 +0,0 @@
|
||||
diff --git a/src/framework/engine.h b/src/framework/engine.h
|
||||
index 57a48ad..9e1bc36 100644
|
||||
--- a/src/framework/engine.h
|
||||
+++ b/src/framework/engine.h
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
+#include <sys/select.h>
|
||||
|
||||
#include "logger.h"
|
||||
|
||||
diff --git a/src/framework/mk.inc b/src/framework/mk.inc
|
||||
index 793e211..13275be 100644
|
||||
--- a/src/framework/mk.inc
|
||||
+++ b/src/framework/mk.inc
|
||||
@@ -7,7 +7,7 @@ OS:=$(shell uname)
|
||||
CXXFLAGS += -O2 -W -Wall -I$(DIRLEVEL)
|
||||
|
||||
ifeq ($(OS),Linux)
|
||||
-CXX = g++
|
||||
+CXX = $(CROSS_COMPILE)g++
|
||||
endif
|
||||
|
||||
ifeq ($(OS),Darwin)
|
||||
@@ -18,9 +18,6 @@ PKG_SOURCE_VERSION:=3ab81137cafe25c2ca4bc3a5f322a63646f9ce8d
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=none
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/bootchart2
|
||||
|
||||
@@ -1,19 +1,9 @@
|
||||
#
|
||||
# Copyright (C) 2018 iopsys Software Solutions AB
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=catv
|
||||
PKG_RELEASE:=1
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=none
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/catv
|
||||
|
||||
BIN
catv/files/etc/init.d/.catv.kate-swp
Normal file
BIN
catv/files/etc/init.d/.catv.kate-swp
Normal file
Binary file not shown.
@@ -1,18 +1,9 @@
|
||||
#
|
||||
# Copyright (C) 2019 iopsys Software Solutions AB
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=crashlog
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_RELEASE:=1
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=none
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
#
|
||||
# Copyright (C) 2019 iopsys Software Solutions AB
|
||||
# Copyright (C) 2006-2010 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=1.3.0
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
|
||||
PKG_VERSION:=1.2.0
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/dectmngr2
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=2c8990fd5275d469e8ab6c7a99e17fe0a56052ea
|
||||
PKG_SOURCE_VERSION:=877fcbd58d0ead82dbbc4c65f0ad7f8c938fcf74
|
||||
PKG_NAME:=dectmngr2
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
RSTRIP:=true
|
||||
export BUILD_DIR
|
||||
@@ -30,7 +29,7 @@ define Package/dectmngr2
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Dectmngr2
|
||||
URL:=
|
||||
DEPENDS:= +natalie-dect-h bcmkernel +libubox +ubus +libpicoevent
|
||||
DEPENDS:= +natalie-dect-h bcmkernel +libubox +ubus
|
||||
endef
|
||||
|
||||
define Package/dectmngr2/description
|
||||
@@ -43,7 +42,6 @@ define Package/dectmngr2/install
|
||||
$(INSTALL_DIR) $(1)/etc/dect/
|
||||
$(INSTALL_DIR) $(1)/etc/config/
|
||||
$(INSTALL_DIR) $(1)/etc/init.d/
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults/
|
||||
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dectmngr2 $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/target.bin $(1)/etc/dect/
|
||||
@@ -51,7 +49,6 @@ define Package/dectmngr2/install
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/dect $(1)/etc/init.d/
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/dectmngr-wrapper.sh $(1)/usr/sbin/
|
||||
$(CP) ./files/dect.config $(1)/etc/config/dect
|
||||
$(CP) ./files/etc/uci-defaults/* $(1)/etc/uci-defaults/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,dectmngr2))
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
# Workaround for product DG400 which has an
|
||||
# incorrect value in nvram from factory.
|
||||
|
||||
if [ -e "/proc/nvram/BoardId" ]; then
|
||||
boardid=$(cat /proc/nvram/BoardId)
|
||||
ulBoardStuffOption=$(cat /proc/nvram/ulBoardStuffOption)
|
||||
|
||||
if [ "$boardid" = "DG400R0" -a "$ulBoardStuffOption" = "0xffffffff" ]; then
|
||||
echo "0xfffffff2" >/proc/nvram/ulBoardStuffOption
|
||||
|
||||
db -q batch <<-EOT
|
||||
set hw.board.hasDect=1
|
||||
commit hw.board
|
||||
EOT
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2018 iopsys Software Solutions AB
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dslmngr
|
||||
PKG_VERSION:=1.0.0
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=7522faab4142fe2c0ac8cbf71bb0cc5bd49f0750
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dslmngr.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
endif
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_mips),y)
|
||||
TARGET_PLATFORM=BROADCOM
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
|
||||
TARGET_PLATFORM=BROADCOM
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_ramips),y)
|
||||
TARGET_PLATFORM=MEDIATEK
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_linksys),y)
|
||||
TARGET_PLATFORM=MARVELL
|
||||
else ifeq ($(CONFIG_TARGET_intel_mips),y)
|
||||
TARGET_PLATFORM=INTEL
|
||||
else
|
||||
$(info Unexpected CONFIG_TARGET)
|
||||
endif
|
||||
|
||||
export TARGET_PLATFORM
|
||||
|
||||
define Package/dslmngr
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=XDSL status and configration utility
|
||||
DEPENDS:=+libdsl +libuci +libubox +ubus +libpthread +libnl-genl +easy-soc-libs
|
||||
endef
|
||||
|
||||
define Package/dslmngr/description
|
||||
This package can be used to configure and provide status about
|
||||
the XDSL subsystem through UBUS.
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-I$(STAGING_DIR)/usr/include/libnl3 \
|
||||
-D_GNU_SOURCE
|
||||
|
||||
MAKE_FLAGS += \
|
||||
CFLAGS="$(TARGET_CFLAGS)" \
|
||||
LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
FPIC="$(FPIC)"
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
rsync -r --exclude=.* ~/git/dslmngr/ $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
define Build/Compile
|
||||
+$(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS)
|
||||
endef
|
||||
|
||||
define Package/dslmngr/install
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/dslmngr $(1)/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,dslmngr))
|
||||
@@ -1,51 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2019 iopsys Software Solutions AB
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=easy-qos
|
||||
PKG_VERSION:=1.1
|
||||
PKG_RELEASE:=0
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=none
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/easy-qos
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=Easy QoS
|
||||
DEPENDS:=@(TARGET_intel_mips||TARGET_iopsys_brcm63xx_arm||TARGET_iopsys_brcm63xx_mips)
|
||||
endef
|
||||
|
||||
define Package/easy-qos/description
|
||||
This package contains Easy QoS utility
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
mkdir -p $(PKG_BUILD_DIR)
|
||||
$(CP) ./files/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/easy-qos/install
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(CP) ./files/etc/config/easy_qos $(1)/etc/config/
|
||||
ifeq ($(CONFIG_TARGET_intel_mips),y)
|
||||
$(CP) ./files/etc/init.d/easy_qos.classcfg $(1)/etc/init.d/easy_qos
|
||||
else
|
||||
$(CP) ./files/etc/init.d/easy_qos.iptables $(1)/etc/init.d/easy_qos
|
||||
endif
|
||||
$(CP) ./files/etc/uci-defaults/* $(1)/etc/uci-defaults/
|
||||
$(CP) ./files/etc/firewall.easyqos $(1)/etc/firewall.easyqos
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,easy-qos))
|
||||
@@ -1 +0,0 @@
|
||||
/etc/init.d/easy_qos reload
|
||||
@@ -1,165 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
USE_PROCD=1
|
||||
|
||||
RULE_LIST="/tmp/easy_qos_rule.list"
|
||||
BRIDGE_INTF=""
|
||||
|
||||
[ -f /etc/profile.d/intel.sh ] && {
|
||||
. /etc/profile.d/intel.sh
|
||||
sh /etc/profile.d/intel.sh
|
||||
}
|
||||
|
||||
log() {
|
||||
echo "${@}"|logger -t easy_qos_class -p debug
|
||||
}
|
||||
|
||||
exec_log() {
|
||||
${@} |grep -i successful
|
||||
if [ "${?}" -ne 0 ]; then
|
||||
log "Failed to create ${@}";
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
get_priority() {
|
||||
local prio=$(echo $1|tr [A-Z] [a-z]);
|
||||
case "${prio}" in
|
||||
"lowest")
|
||||
echo 8;;
|
||||
"low")
|
||||
echo 7;;
|
||||
"besteffort")
|
||||
echo 6;;
|
||||
"normal")
|
||||
echo 5;;
|
||||
"video")
|
||||
echo 4;;
|
||||
"medium")
|
||||
echo 3;;
|
||||
"high")
|
||||
echo 2;;
|
||||
"highest")
|
||||
echo 1;;
|
||||
esac
|
||||
}
|
||||
|
||||
is_lan_bridge() {
|
||||
local _section=$1
|
||||
local _type
|
||||
local _is_lan
|
||||
|
||||
config_get _type "$section" "type"
|
||||
config_get _is_lan "$section" "is_lan"
|
||||
|
||||
if [ "${_type}" == "bridge" -a "${_is_lan}" == "1" ]; then
|
||||
BRIDGE_INTF="br-${_section}"
|
||||
fi
|
||||
}
|
||||
|
||||
get_bridge_interface() {
|
||||
config_load network
|
||||
config_foreach is_lan_bridge interface
|
||||
}
|
||||
|
||||
validate_rule_section()
|
||||
{
|
||||
uci_validate_section easy_qos rule "${1}" \
|
||||
'priority:string:none' \
|
||||
'macaddr:string:none' \
|
||||
'proto:string:none' \
|
||||
'port:list(uinteger):none' \
|
||||
'comment:string:none'
|
||||
}
|
||||
|
||||
# Clear existing rules before applying new rules
|
||||
clear_existing_rules() {
|
||||
# execute the delete rules written onto a file then delete the file
|
||||
[ -f ${RULE_LIST} ] || return 0
|
||||
|
||||
while read line
|
||||
do
|
||||
log "Deleting old classification rules"
|
||||
exec_log classcfg -D ${line} -i ${BRIDGE_INTF}
|
||||
done <${RULE_LIST}
|
||||
sync
|
||||
|
||||
[ -f ${RULE_LIST} ] && rm ${RULE_LIST}
|
||||
}
|
||||
|
||||
# classcfg -M local_dhcp -i lo -p udp --dport 67:67 --dport 68:68 -j mark --mark 1
|
||||
create_rule() {
|
||||
local proto=$1; shift
|
||||
local mac_addr=$1; shift
|
||||
local mark=$1; shift
|
||||
local ports=$1;
|
||||
local cmd="";
|
||||
# Rule name is uniqe, so we take hash of all the input as rule_name
|
||||
local rule_name="$(echo ${mac_addr}${proto}${mark}${ports} |md5sum |head -c 30)"
|
||||
|
||||
cmd="-j mark --mark ${mark}";
|
||||
|
||||
if [ "${mac_addr}" != "none" ]; then
|
||||
cmd="--smac ${mac_addr} ${cmd}";
|
||||
fi
|
||||
if [ "${ports}" != "none" ]; then
|
||||
IFS=","
|
||||
for port in ${ports};
|
||||
do
|
||||
cmd="--dport ${port}:${port} ${cmd}";
|
||||
done
|
||||
IFS=' '
|
||||
fi
|
||||
if [ "${proto}" != "none" ]; then
|
||||
cmd="-p ${proto} $cmd"
|
||||
fi
|
||||
cmd="-i ${BRIDGE_INTF} $cmd"
|
||||
cmd="-A ${rule_name} $cmd"
|
||||
|
||||
# Store the rule_names for cleanup on reload
|
||||
exec_log classcfg ${cmd}
|
||||
[ $? -eq 0 ] && \
|
||||
echo ${rule_name} >> ${RULE_LIST}
|
||||
}
|
||||
|
||||
manage_rule() {
|
||||
local cfg="$1"
|
||||
local priority macaddr proto port comment prio_num port_list
|
||||
|
||||
validate_rule_section "${1}" || {
|
||||
log "Validation of section failed"
|
||||
return 1;
|
||||
}
|
||||
|
||||
prio_num=$(get_priority ${priority})
|
||||
port_list=$(echo ${port}|sed 's/ /,/g')
|
||||
|
||||
if [ -n "${prio_num}" ]; then
|
||||
if [ "${proto}" == "none" -o "${proto}" == "tcpudp" ]; then
|
||||
create_rule tcp ${macaddr} ${prio_num} ${port_list}
|
||||
create_rule udp ${macaddr} ${prio_num} ${port_list}
|
||||
else
|
||||
create_rule ${proto} ${macaddr} ${prio_num} ${port_list}
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
get_bridge_interface
|
||||
clear_existing_rules
|
||||
config_load easy_qos
|
||||
config_foreach manage_rule rule
|
||||
}
|
||||
|
||||
start_service() {
|
||||
[ -x /opt/intel/usr/sbin/classcfg ] || exit 0
|
||||
reload_service
|
||||
log "Easy QoS class installed"
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "easy_qos" "network"
|
||||
}
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
USE_PROCD=1
|
||||
|
||||
log() {
|
||||
echo "${@}"|logger -t easy_qos.ebtable -p debug
|
||||
}
|
||||
|
||||
exec_log() {
|
||||
${@}
|
||||
if [ "${?}" -ne 0 ]; then
|
||||
log "Failed to create ${@}";
|
||||
fi
|
||||
}
|
||||
|
||||
get_priority() {
|
||||
local prio=$(echo $1|tr [A-Z] [a-z]);
|
||||
case "${prio}" in
|
||||
"lowest")
|
||||
echo 0;;
|
||||
"low")
|
||||
echo 1;;
|
||||
"besteffort")
|
||||
echo 2;;
|
||||
"normal")
|
||||
echo 3;;
|
||||
"video")
|
||||
echo 4;;
|
||||
"medium")
|
||||
echo 5;;
|
||||
"high")
|
||||
echo 6;;
|
||||
"highest")
|
||||
echo 7;;
|
||||
esac
|
||||
}
|
||||
|
||||
validate_rule_section()
|
||||
{
|
||||
uci_validate_section easy_qos rule "${1}" \
|
||||
'priority:string' \
|
||||
'macaddr:string' \
|
||||
'proto:string:none' \
|
||||
'port:list(uinteger)' \
|
||||
'comment:string:none'
|
||||
}
|
||||
|
||||
# Clear existing rules before applying new rules
|
||||
clear_existing_rules() {
|
||||
local rule=$(ebtables -t broute -L BROUTING|grep -m 1 mark)
|
||||
while [ -n "${rule}" ]; do
|
||||
exec_log ebtables -t broute -D BROUTING ${rule}
|
||||
rule=$(ebtables -t broute -L BROUTING|grep -m 1 mark)
|
||||
done
|
||||
}
|
||||
|
||||
create_rule() {
|
||||
local protocol=$1; shift
|
||||
local mac=$1; shift
|
||||
local mark="0x$1"; shift
|
||||
local forward_port=$1;
|
||||
local cmd="";
|
||||
local protocol_number
|
||||
|
||||
cmd="-j mark --mark-or ${mark}";
|
||||
if [ -n "${forward_port}" ]; then
|
||||
cmd="--ip-destination-port ${forward_port} ${cmd}";
|
||||
fi
|
||||
|
||||
case "${protocol}" in
|
||||
"tcp")
|
||||
protocol_number=6;;
|
||||
"udp")
|
||||
protocol_number=17;;
|
||||
"dccp")
|
||||
protocol_number=33;;
|
||||
"sctp")
|
||||
protocol_number=132;;
|
||||
*)
|
||||
log "Protocol ${protocol} not supported in ebtables"
|
||||
return;;
|
||||
esac
|
||||
|
||||
cmd="--ip-proto ${protocol_number} $cmd"
|
||||
cmd="-p ip $cmd"
|
||||
|
||||
cmd="-s ${mac} $cmd"
|
||||
exec_log ebtables -t broute -A BROUTING ${cmd}
|
||||
}
|
||||
|
||||
manage_rule() {
|
||||
local cfg="$1"
|
||||
local priority macaddr proto port comment prio_num protocol
|
||||
|
||||
validate_rule_section "${1}" || {
|
||||
log "Validation of section failed"
|
||||
return 1;
|
||||
}
|
||||
|
||||
protocol=$(echo ${proto}|tr [A-Z] [a-z])
|
||||
prio_num=$(get_priority ${priority})
|
||||
if [ -n "${macaddr}" -a -n "${prio_num}" ]; then
|
||||
for p in ${port}; do
|
||||
if [ "${protocol}" == "none" -o "${protocol}" == "tcpudp" ]; then
|
||||
create_rule tcp ${macaddr} ${prio_num} ${p}
|
||||
create_rule udp ${macaddr} ${prio_num} ${p}
|
||||
else
|
||||
create_rule ${protocol} ${macaddr} ${prio_num} ${p}
|
||||
fi
|
||||
done
|
||||
# Create rule for all ports if port is not mentioned in uci
|
||||
if [ -z "${port}" ]; then
|
||||
if [ "${protocol}" == "none" -o "${protocol}" == "tcpudp" ]; then
|
||||
create_rule tcp ${macaddr} ${prio_num}
|
||||
create_rule udp ${macaddr} ${prio_num}
|
||||
else
|
||||
create_rule ${protocol} ${macaddr} ${prio_num}
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
# Do not apply rules if ebtables is not present in system
|
||||
[ -x /usr/sbin/ebtables ] || return;
|
||||
|
||||
clear_existing_rules
|
||||
config_load easy_qos
|
||||
config_foreach manage_rule rule
|
||||
}
|
||||
|
||||
start_service() {
|
||||
reload_service
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "easy_qos"
|
||||
}
|
||||
|
||||
@@ -1,186 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
START=99
|
||||
USE_PROCD=1
|
||||
|
||||
CLIENT_LIST="/tmp/easy_qos_client.list"
|
||||
|
||||
log() {
|
||||
echo "${@}"|logger -t easy_qos -p debug
|
||||
}
|
||||
|
||||
exec_log() {
|
||||
${@}
|
||||
if [ "${?}" -ne 0 ]; then
|
||||
log "Failed to create ${@}";
|
||||
fi
|
||||
}
|
||||
|
||||
get_priority() {
|
||||
local prio=$(echo $1|tr [A-Z] [a-z]);
|
||||
case "${prio}" in
|
||||
"lowest")
|
||||
echo 0;;
|
||||
"low")
|
||||
echo 1;;
|
||||
"besteffort")
|
||||
echo 2;;
|
||||
"normal")
|
||||
echo 3;;
|
||||
"video")
|
||||
echo 4;;
|
||||
"medium")
|
||||
echo 5;;
|
||||
"high")
|
||||
echo 6;;
|
||||
"highest")
|
||||
echo 7;;
|
||||
esac
|
||||
}
|
||||
|
||||
clean_client_entries() {
|
||||
[ -f ${CLIENT_LIST} ] && rm ${CLIENT_LIST}
|
||||
}
|
||||
|
||||
map_client_entries() {
|
||||
local clients ip mac host
|
||||
|
||||
json_load "$(ubus call router.network 'clients')"
|
||||
json_get_keys keys
|
||||
|
||||
for key in ${keys};
|
||||
do
|
||||
json_select ${key}
|
||||
json_get_vars ipaddr macaddr hostname
|
||||
clients="${macaddr} ${ipaddr} ${hostname};${clients}"
|
||||
json_select ..
|
||||
done
|
||||
|
||||
json_init
|
||||
|
||||
# json_add_array "clients"
|
||||
IFS=";"
|
||||
for client in ${clients};
|
||||
do
|
||||
macaddr=$(echo ${client} | cut -d" " -f1)
|
||||
json_add_object "${macaddr//:/_}"
|
||||
json_add_string "ip" "$(echo ${client} | cut -d" " -f2)"
|
||||
json_add_string "macaddr" "$(echo ${client} | cut -d" " -f1)"
|
||||
json_add_string "host" "$(echo ${client} | cut -d" " -f3)"
|
||||
json_close_object
|
||||
done
|
||||
|
||||
IFS=' '
|
||||
echo `json_dump` > ${CLIENT_LIST}
|
||||
json_cleanup
|
||||
}
|
||||
|
||||
# Find the IP of a corresponding mac from arp table
|
||||
get_ipaddress() {
|
||||
local clients ip mac host
|
||||
|
||||
json_load "$(cat ${CLIENT_LIST})"
|
||||
json_get_keys keys
|
||||
|
||||
# jshn seems a bit iffy on having : in key, replace by _
|
||||
json_select "${1//:/_}" 2 > /dev/null
|
||||
json_get_var ip ip
|
||||
|
||||
echo "$ip"
|
||||
}
|
||||
|
||||
validate_rule_section()
|
||||
{
|
||||
uci_validate_section easy_qos rule "${1}" \
|
||||
'priority:string' \
|
||||
'macaddr:string' \
|
||||
'proto:string:none' \
|
||||
'port:list(uinteger)' \
|
||||
'comment:string:none'
|
||||
}
|
||||
|
||||
# Clear existing rules before applying new rules
|
||||
clear_existing_rules() {
|
||||
local rule=$(iptables -t mangle -S OUTPUT|grep -m 1 MARK |sed 's/-A/-D/1')
|
||||
while [ -n "${rule}" ]; do
|
||||
exec_log iptables -t mangle ${rule}
|
||||
rule=$(iptables -t mangle -S OUTPUT|grep -m 1 MARK |sed 's/-A/-D/1')
|
||||
done
|
||||
}
|
||||
|
||||
check_and_create() {
|
||||
iptables -t mangle -C OUTPUT ${@} 2>/dev/null
|
||||
# Create rule if not exists
|
||||
if [ ${?} -ne 0 ]; then
|
||||
exec_log iptables -t mangle -A OUTPUT ${@}
|
||||
else
|
||||
log "Rule exists for ${@}"
|
||||
fi
|
||||
}
|
||||
|
||||
create_rule() {
|
||||
local proto=$1; shift
|
||||
local src_ip=$1; shift
|
||||
local mark="0x$1/0x$1"; shift
|
||||
local ports=$1;
|
||||
local cmd="";
|
||||
|
||||
cmd="-j MARK --set-xmark ${mark}";
|
||||
if [ -n "${ports}" ]; then
|
||||
cmd="--match multiport --dports ${ports} ${cmd}";
|
||||
fi
|
||||
|
||||
if [ "${proto}" == "icmp" ]; then
|
||||
cmd="-p icmp -m icmp --icmp-type 8 $cmd"
|
||||
elif [ "${proto}" == "all" ]; then
|
||||
cmd="-p all $cmd"
|
||||
else
|
||||
cmd="-p ${proto} -m ${proto} $cmd"
|
||||
fi
|
||||
cmd="-s ${src_ip} $cmd"
|
||||
|
||||
check_and_create ${cmd}
|
||||
}
|
||||
|
||||
manage_rule() {
|
||||
local cfg="$1"
|
||||
local priority macaddr proto port comment prio_num ip port_list
|
||||
|
||||
validate_rule_section "${1}" || {
|
||||
log "Validation of section failed"
|
||||
return 1;
|
||||
}
|
||||
|
||||
prio_num=$(get_priority ${priority})
|
||||
ip=$(get_ipaddress ${macaddr})
|
||||
port_list=$(echo ${port}|sed 's/ /,/g')
|
||||
|
||||
if [ -n "${ip}" -a -n "${prio_num}" ]; then
|
||||
if [ "${proto}" == "none" -o "${proto}" == "tcpudp" ]; then
|
||||
create_rule tcp ${ip} ${prio_num} ${port_list}
|
||||
create_rule udp ${ip} ${prio_num} ${port_list}
|
||||
else
|
||||
create_rule ${proto} ${ip} ${prio_num} ${port_list}
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
clear_existing_rules
|
||||
map_client_entries
|
||||
config_load easy_qos
|
||||
config_foreach manage_rule rule
|
||||
clean_client_entries
|
||||
}
|
||||
|
||||
start_service() {
|
||||
reload_service
|
||||
echo "Easy QoS installed">/dev/console;
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "easy_qos"
|
||||
}
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
# Add firewall include
|
||||
uci -q batch <<-EOT
|
||||
delete firewall.easyqos
|
||||
set firewall.easyqos=include
|
||||
set firewall.easyqos.path=/etc/firewall.easyqos
|
||||
set firewall.easyqos.reload=1
|
||||
uci del_list firewall.easyqos._access_w="root"
|
||||
uci add_list firewall.easyqos._access_w="root"
|
||||
commit firewall
|
||||
EOT
|
||||
@@ -1,10 +0,0 @@
|
||||
if (PACKAGE_libwifix)
|
||||
menu "configurations"
|
||||
|
||||
config LIBWIFIX_DEBUG
|
||||
depends on PACKAGE_libwifix
|
||||
bool "Enable wifi debugging"
|
||||
default n
|
||||
|
||||
endmenu
|
||||
endif
|
||||
@@ -1,108 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2019 iopsys Software Solutions AB
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=easy-soc-libs.deprecated
|
||||
PKG_VERSION:=1.0.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=b88afddd2f4cb216bfcd190f9096c138299c28e2
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/easy-soc-libs.git
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/easy-soc-libs.deprecated
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=IOPSYS easy SoC libraries (deprecated)
|
||||
SUBMENU:=IOPSYS easy SoC libraries (deprecated)
|
||||
DEPENDS:=+libopenssl
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
define Package/libwifix/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
define Package/libwifix
|
||||
$(call Package/easy-soc-libs.deprecated)
|
||||
TITLE:= WiFi library for wifix (deprecated)
|
||||
DEPENDS+=+libnl +libnl-route
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_mips),y)
|
||||
TARGET_PLATFORM=BROADCOM
|
||||
TARGET_CFLAGS +=-DIOPSYS_BROADCOM -DCONFIG_BCM963138 \
|
||||
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx
|
||||
KERNEL_DIR:=$(BUILD_DIR)/bcmkernel/bcm963xx
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
|
||||
TARGET_PLATFORM=BROADCOM
|
||||
TARGET_CFLAGS +=-DIOPSYS_BROADCOM -DCONFIG_BCM963138 \
|
||||
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_ramips),y)
|
||||
TARGET_PLATFORM=MEDIATEK
|
||||
TARGET_CFLAGS +=-DIOPSYS_MEDIATEK
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_linksys),y)
|
||||
TARGET_PLATFORM=MARVELL
|
||||
TARGET_CFLAGS +=-DIOPSYS_MARVELL
|
||||
else ifeq ($(CONFIG_TARGET_intel_mips),y)
|
||||
TARGET_PLATFORM=INTEL
|
||||
TARGET_CFLAGS +=-DIOPSYS_INTEL
|
||||
else
|
||||
$(info Unexpected CONFIG_TARGET)
|
||||
endif
|
||||
|
||||
export TARGET_PLATFORM
|
||||
|
||||
ifdef CONFIG_LIBWIFIX_DEBUG
|
||||
TARGET_CFLAGS += -DIOP_LLA_LIBS_DEBUG
|
||||
endif
|
||||
|
||||
subdirs := \
|
||||
$(if $(CONFIG_PACKAGE_libwifix),libwifix)
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-I$(STAGING_DIR)/usr/include/openssl \
|
||||
-I$(STAGING_DIR)/usr/include/libnl3
|
||||
|
||||
MAKE_FLAGS += \
|
||||
CFLAGS="$(TARGET_CFLAGS) -Wall -I./" \
|
||||
LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
FPIC="$(FPIC)" \
|
||||
PLATFORM="$(TARGET_PLATFORM)" \
|
||||
subdirs="$(subdirs)"
|
||||
|
||||
define Build/InstallDev/libwifix
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libwifix/wifi.h $(1)/usr/include/wifix.h
|
||||
$(CP) $(PKG_BUILD_DIR)/libwifix/libwifi*.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(call Build/Compile/Default)
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(foreach dir,$(subdirs),$(call Build/InstallDev/$(dir),$(1),$(2));)
|
||||
endef
|
||||
|
||||
define Package/libwifix/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libwifix/libwifi*.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libwifix))
|
||||
@@ -1,23 +0,0 @@
|
||||
if (PACKAGE_libwifi || PACKAGE_libdsl || PACKAGE_libethernet)
|
||||
menu "configurations"
|
||||
|
||||
config IOP_LLA_LIBS_DEBUG
|
||||
bool "Enable debugging support"
|
||||
default n
|
||||
|
||||
config LIBWIFI_DEBUG
|
||||
depends on PACKAGE_libwifi
|
||||
bool "Enable wifi debugging"
|
||||
default n
|
||||
|
||||
config LIBDSL_DEBUG
|
||||
depends on PACKAGE_libdsl
|
||||
bool "Enable xdsl debugging"
|
||||
default n
|
||||
|
||||
config LIBDSL_TEST
|
||||
depends on PACKAGE_libdsl
|
||||
bool "Libdsl test program"
|
||||
default n
|
||||
endmenu
|
||||
endif
|
||||
@@ -1,30 +1,27 @@
|
||||
#
|
||||
# Copyright (C) 2018 IOPSYS Software Solutions AB
|
||||
# Copyright (C) 2006-2010 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=0.2
|
||||
PKG_SOURCE_VERSION:=631e61b7ab5d86f2f4c86756a117badff9fb0f2c
|
||||
PKG_SOURCE_VERSION:=0cb8accbac3355b97a17064ec7da010a2c42db7b
|
||||
|
||||
|
||||
ifeq ($(CONFIG_ENDPT_OPEN),y)
|
||||
BRCM_KERNEL_PROFILE=$(shell echo $(CONFIG_BCM_KERNEL_PROFILE) | sed s/\"//g)
|
||||
PKG_SOURCE:=endptmngr-$(BRCM_KERNEL_PROFILE)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://download.iopsys.eu/iopsys/opensdk/
|
||||
PKG_SOURCE_URL:=http://iopsys.inteno.se/iopsys/consumer/
|
||||
PKG_NAME:=endptmngr-open
|
||||
else
|
||||
PKG_SOURCE_URL:=git@dev.iopsys.eu:iopsys/endptmngr
|
||||
PKG_SOURCE_URL:=git@private.inteno.se:endptmngr
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_NAME:=endptmngr
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
endif
|
||||
|
||||
RSTRIP:=true
|
||||
|
||||
4
endptmngr/files/dect.config
Normal file
4
endptmngr/files/dect.config
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
config dect 'dect'
|
||||
option radio 'auto'
|
||||
|
||||
49
eventlog/Makefile
Normal file
49
eventlog/Makefile
Normal file
@@ -0,0 +1,49 @@
|
||||
#
|
||||
# Copyright (C) 2009-2010 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=eventlog
|
||||
PKG_VERSION:=0.2.9
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_URL:=http://www.balabit.com/downloads/files/eventlog/0.2/
|
||||
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
|
||||
PKG_MD5SUM:=76e3d7a0b8f335c12099e9b91191fbf1
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libeventlog
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=A new API to format and send structured log messages.
|
||||
endef
|
||||
|
||||
define Package/eventlog/description
|
||||
A new API to format and send structured log messages. It supports multiple message
|
||||
representations (plain, XML attributes and XML tags) and multiple output methods
|
||||
(local syslogd).
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/eventlog $(1)/usr/include/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libevtlog.{a,so*} $(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/eventlog.pc $(1)/usr/lib/pkgconfig/
|
||||
endef
|
||||
|
||||
define Package/libeventlog/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libevtlog.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libeventlog))
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# Copyright (C) 2006-2010 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
@@ -20,9 +20,6 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=GPL-3.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
# support parallel build
|
||||
#PKG_BUILD_PARALLEL:=1
|
||||
|
||||
|
||||
3
gigaset-elements/.gitignore
vendored
Normal file
3
gigaset-elements/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
git-src
|
||||
|
||||
65
gigaset-elements/Makefile
Normal file
65
gigaset-elements/Makefile
Normal file
@@ -0,0 +1,65 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=gigaset-elements
|
||||
|
||||
PKG_VERSION:=2.4.2
|
||||
# PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
|
||||
PKG_GIGASET_ELEMENTS_SRC_URL ?= git@public.inteno.se:gigaset-elements.git
|
||||
PKG_GIGASET_ELEMENTS_VERSION ?= v$(PKG_VERSION)
|
||||
|
||||
PKG_SOURCE_URL:=$(PKG_GIGASET_ELEMENTS_SRC_URL)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=aa906b37062b6d7937a9c0f8e7b62b32afe4bdeb
|
||||
|
||||
|
||||
PKG_MAINTAINER:=Magier Marcin, Figlarek Piotr
|
||||
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
######################################################
|
||||
|
||||
define Package/gigaset-elements
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libjson-c +libcurl +libpthread
|
||||
TITLE:=Gigaset elements
|
||||
endef
|
||||
|
||||
######################################################
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) all
|
||||
endef
|
||||
|
||||
|
||||
|
||||
define Package/gigaset-elements/install
|
||||
$(CP) -r $(PKG_BUILD_DIR)/sysroot_common/* $(1)/
|
||||
$(CP) -r $(PKG_BUILD_DIR)/sysroot_$(CONFIG_ARCH)/* $(1)/
|
||||
endef
|
||||
|
||||
|
||||
|
||||
define Package/gigaset-elements/preinst
|
||||
#!/bin/sh
|
||||
mkdir -p $${IPKG_INSTROOT}/usr/gigaset/data/cert
|
||||
mkdir -p $${IPKG_INSTROOT}/usr/gigaset/data/fw
|
||||
endef
|
||||
|
||||
|
||||
define Package/gigaset-elements/postrm
|
||||
#!/bin/sh
|
||||
rm -rf $${IPKG_INSTROOT}/usr/gigaset/data
|
||||
rm -rf /usr/share/gigaset
|
||||
endef
|
||||
|
||||
|
||||
######################################################
|
||||
|
||||
$(eval $(call BuildPackage,gigaset-elements))
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
# Copyright (c) 2017 Genexis B.V.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# version 2 as published by the Free Software Foundation.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
# 02110-1301 USA
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=gryphon-led-kernel-module
|
||||
PKG_RELEASE:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/$(PKG_NAME)
|
||||
SUBMENU:=LED modules
|
||||
TITLE:=LED driver for Gryphon
|
||||
FILES:=$(PKG_BUILD_DIR)/$(PKG_NAME).$(LINUX_KMOD_SUFFIX)
|
||||
KCONFIG:=CONFIG_PACKAGE_kmod-gryphon-led-kernel-module=y
|
||||
AUTOLOAD:=$(call AutoLoad,60,$(PKG_NAME))
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_URL:=
|
||||
endef
|
||||
|
||||
define KernelPackage/$(PKG_NAME)/description
|
||||
This package contains the LED driver for Gryphon devices.
|
||||
endef
|
||||
|
||||
EXTRA_KCONFIG:= CONFIG_RGB_LED=m
|
||||
|
||||
MODULE_INCLUDE=-I$(PKG_BUILD_DIR)
|
||||
|
||||
define Build/Prepare
|
||||
mkdir -p $(PKG_BUILD_DIR)/kdevlinks/
|
||||
$(CP) -s `pwd`/src/* $(PKG_BUILD_DIR)/kdevlinks/
|
||||
$(CP) src/* $(PKG_BUILD_DIR)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C "$(LINUX_DIR)" \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
ARCH="$(LINUX_KARCH)" \
|
||||
SUBDIRS="$(PKG_BUILD_DIR)" \
|
||||
EXTRA_CFLAGS="-DKERNEL_MODULE $(BUILDFLAGS) -I$(LINUX_DIR)/include -include generated/autoconf.h $(MODULE_INCLUDE)" \
|
||||
modules
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,$(PKG_NAME)))
|
||||
@@ -1,26 +0,0 @@
|
||||
# Copyright (c) 2017 Genexis B.V.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# version 2 as published by the Free Software Foundation.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
# 02110-1301 USA
|
||||
|
||||
MODULE_NAME = gryphon-led-kernel-module
|
||||
|
||||
obj-m := $(MODULE_NAME).o
|
||||
|
||||
GENEXIS_FILES= \
|
||||
main.o \
|
||||
sk9822.o \
|
||||
sk9822_bitbang.o
|
||||
|
||||
$(MODULE_NAME)-objs := $(GENEXIS_FILES)
|
||||
@@ -1,253 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2017 Genexis B.V.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#define DEBUG 1
|
||||
|
||||
#include <linux/delay.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/printk.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include "sk9822.h"
|
||||
|
||||
#define DRIVER_NAME "canyon_led"
|
||||
#define DRIVER_AUTHOR "Genexis B.V."
|
||||
#define DRIVER_DESC "Canyon LED driver for SK9822"
|
||||
#define DRIVER_VERSION "1"
|
||||
|
||||
/**
|
||||
* sysfs interfaces
|
||||
*/
|
||||
|
||||
static ssize_t get_led_color(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
/* [ln] todo: dummy implementation */
|
||||
int len;
|
||||
|
||||
len = sprintf(buf, "%d\n", 123);
|
||||
if (len <= 0) {
|
||||
dev_err(dev, "sk9822: Invalid sprintf len: %d\n", len);
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set complete LED strip to a specific color
|
||||
* @retval count number of bytes written
|
||||
* @retval -EMSGSIZE if the message is too big
|
||||
* @retval -EIO for all other errors (e.g. leds cannot be configured)
|
||||
*/
|
||||
static ssize_t set_led_color(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
int ret = 0;
|
||||
size_t buflen = count;
|
||||
struct sk9822_leds *sk9822 = dev_get_drvdata(dev);
|
||||
|
||||
if (IS_ERR(sk9822)) {
|
||||
printk(KERN_ERR "Platform get drvdata returned NULL\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
/* strip newline */
|
||||
if ((count > 0) && (buf[count-1] == '\n')) {
|
||||
buflen--;
|
||||
}
|
||||
|
||||
if (buflen != 6) { // RRGGBB\0
|
||||
return -EMSGSIZE;
|
||||
}
|
||||
|
||||
// Update the LED array here
|
||||
ret = sk9822_set_color_str(sk9822, buf);
|
||||
if (ret != 0) {
|
||||
printk(KERN_ERR "Failed to set led color\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
// Now push to the HW
|
||||
ret = sk9822_update(sk9822);
|
||||
if (ret != 0) {
|
||||
printk(KERN_ERR "Failed to update led\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
static DEVICE_ATTR(led_color, S_IRUGO | S_IWUSR, get_led_color, set_led_color);
|
||||
|
||||
static struct attribute *sk9822_dev_attrs[] = {
|
||||
&dev_attr_led_color.attr,
|
||||
NULL
|
||||
};
|
||||
|
||||
static struct attribute_group sk9822_dev_attr_group = {
|
||||
.name = "sk9822",
|
||||
.attrs = sk9822_dev_attrs,
|
||||
};
|
||||
|
||||
/**
|
||||
* device prope and removal
|
||||
*/
|
||||
|
||||
static int canyon_led_probe(struct platform_device *pdev)
|
||||
{
|
||||
int ret;
|
||||
struct sk9822_leds *leds;
|
||||
|
||||
leds = devm_kzalloc(&pdev->dev, sizeof(*leds), GFP_KERNEL);
|
||||
if (!leds) {
|
||||
return -ENOMEM;
|
||||
}
|
||||
leds->dev = &pdev->dev;
|
||||
leds->led_brightness = SK9822_DEFAULT_BRIGHTNESS;
|
||||
|
||||
ret = of_property_read_u16(pdev->dev.of_node, "led-count", &leds->led_count);
|
||||
if (ret < 0) {
|
||||
dev_warn(&pdev->dev, "Could not read led-count property\n");
|
||||
leds->led_count = SK9822_DEFAULT_NUM_LEDS;
|
||||
}
|
||||
|
||||
leds->led_colors = devm_kzalloc(&pdev->dev,
|
||||
(sizeof(cRGB) * leds->led_count), GFP_KERNEL);
|
||||
if (!leds->led_colors) {
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
platform_set_drvdata(pdev, leds);
|
||||
|
||||
#if LINUX_VERSION_CODE <= KERNEL_VERSION(3, 16, 0)
|
||||
leds->clock_gpio = gpiod_get_index(&pdev->dev, "led", 0);
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
|
||||
leds->clock_gpio = gpiod_get_index(&pdev->dev, "led", 0, GPIOD_OUT_HIGH);
|
||||
#else
|
||||
dev_warn(&pdev->dev, "Kernel version Not supported\n");
|
||||
exit(1);
|
||||
#endif
|
||||
|
||||
gpiod_direction_output(leds->clock_gpio, 1);
|
||||
if (IS_ERR(leds->clock_gpio)) {
|
||||
dev_err(&pdev->dev, "Failed to acquire clock GPIO %ld\n",
|
||||
PTR_ERR(leds->clock_gpio));
|
||||
leds->clock_gpio = NULL;
|
||||
return PTR_ERR(leds->clock_gpio);
|
||||
} else {
|
||||
printk(KERN_INFO "Got clock gpio\n");
|
||||
gpiod_set_value(leds->clock_gpio, 0);
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE <= KERNEL_VERSION(3, 16, 0)
|
||||
leds->data_gpio = gpiod_get_index(&pdev->dev, "led", 1);
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
|
||||
leds->data_gpio = gpiod_get_index(&pdev->dev, "led", 1, GPIOD_OUT_HIGH);
|
||||
#else
|
||||
dev_warn(&pdev->dev, "Kernel version Not supported\n");
|
||||
exit(1);
|
||||
#endif
|
||||
|
||||
gpiod_direction_output(leds->data_gpio, 1);
|
||||
if (IS_ERR(leds->data_gpio)) {
|
||||
dev_err(&pdev->dev, "Failed to acquire data GPIO %ld\n",
|
||||
PTR_ERR(leds->data_gpio));
|
||||
leds->data_gpio = NULL;
|
||||
return PTR_ERR(leds->data_gpio);
|
||||
} else {
|
||||
printk(KERN_INFO "Got data gpio\n");
|
||||
gpiod_set_value(leds->data_gpio, 0);
|
||||
}
|
||||
|
||||
printk(KERN_INFO "Attempt to set filefs stuff\n");
|
||||
ret = sysfs_create_group(&pdev->dev.kobj, &sk9822_dev_attr_group);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "sysfs creation failed\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if 0
|
||||
printk(KERN_INFO "Flash LEDs to verify they work\n");
|
||||
sk9822_set_color_str(leds, "00FF00");
|
||||
sk9822_update(leds);
|
||||
msleep(200);
|
||||
sk9822_set_color_str(leds, "000000");
|
||||
sk9822_update(leds);
|
||||
#endif
|
||||
|
||||
printk(KERN_INFO "canyon led successfully probed\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int canyon_led_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct sk9822_leds *leds;
|
||||
|
||||
sysfs_remove_group(&pdev->dev.kobj, &sk9822_dev_attr_group);
|
||||
|
||||
leds = platform_get_drvdata(pdev);
|
||||
if (IS_ERR(leds)) {
|
||||
printk(KERN_ERR "Platform get drvdata returned NULL\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (leds->clock_gpio) {
|
||||
gpiod_put(leds->clock_gpio);
|
||||
}
|
||||
|
||||
if (leds->data_gpio) {
|
||||
gpiod_put(leds->data_gpio);
|
||||
}
|
||||
|
||||
printk(KERN_NOTICE "Bye, bye\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* platform driver metadata
|
||||
*/
|
||||
|
||||
static const struct of_device_id canyon_led_of_ids[] = {
|
||||
{ .compatible = "canyon,led" },
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct platform_driver canyon_led = {
|
||||
.probe = &canyon_led_probe,
|
||||
.remove = &canyon_led_remove,
|
||||
.driver = {
|
||||
.name = DRIVER_NAME,
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = canyon_led_of_ids,
|
||||
},
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(of, canyon_led_of_ids);
|
||||
module_platform_driver(canyon_led);
|
||||
MODULE_AUTHOR(DRIVER_AUTHOR);
|
||||
MODULE_DESCRIPTION(DRIVER_DESC);
|
||||
MODULE_VERSION(DRIVER_VERSION);
|
||||
MODULE_LICENSE("GPL");
|
||||
@@ -1,82 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2017 Genexis B.V.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#include "sk9822.h"
|
||||
#include "sk9822_bitbang.h"
|
||||
|
||||
cRGB __hexs_to_rgb(const char *hex)
|
||||
{
|
||||
cRGB rgb;
|
||||
int r, g, b;
|
||||
|
||||
sscanf(hex, "%02x%02x%02x", &r, &g, &b);
|
||||
// This needs sanity checking
|
||||
rgb.r = r;
|
||||
rgb.g = g;
|
||||
rgb.b = b;
|
||||
return rgb;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief update the color over the given device struct to the provided HEX color
|
||||
*/
|
||||
int sk9822_set_color_str(struct sk9822_leds *sk9822, const char *hex)
|
||||
{
|
||||
int i;
|
||||
cRGB color = __hexs_to_rgb(hex);
|
||||
|
||||
for (i = 0; i < sk9822->led_count; i++) {
|
||||
sk9822->led_colors[i] = color;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief write device struct to the device
|
||||
*/
|
||||
int sk9822_update(struct sk9822_leds *sk9822)
|
||||
{
|
||||
uint16_t i;
|
||||
uint16_t led_count = sk9822->led_count;
|
||||
|
||||
// Start Frame
|
||||
sk9822_bb_write(sk9822, 0x00);
|
||||
sk9822_bb_write(sk9822, 0x00);
|
||||
sk9822_bb_write(sk9822, 0x00);
|
||||
sk9822_bb_write(sk9822, 0x00);
|
||||
|
||||
for (i = 0; i < led_count; i++) {
|
||||
cRGB *p = &sk9822->led_colors[i];
|
||||
sk9822_bb_write(sk9822, 0xe0+sk9822->led_brightness); // Maximum global brightness
|
||||
sk9822_bb_write(sk9822, p->b);
|
||||
sk9822_bb_write(sk9822, p->g);
|
||||
sk9822_bb_write(sk9822, p->r);
|
||||
}
|
||||
|
||||
// End frame
|
||||
sk9822_bb_write(sk9822, 0xff);
|
||||
sk9822_bb_write(sk9822, 0xff);
|
||||
sk9822_bb_write(sk9822, 0xff);
|
||||
sk9822_bb_write(sk9822, 0xff);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2017 Genexis B.V.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef SK9822_H_
|
||||
#define SK9822_H_
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#define SK9822_DEFAULT_NUM_LEDS 32 // U16, used if DT param fails
|
||||
#define SK9822_DEFAULT_BRIGHTNESS 15 // 5-bit brightness, 0-31
|
||||
|
||||
typedef struct {
|
||||
uint8_t b;
|
||||
uint8_t g;
|
||||
uint8_t r;
|
||||
} cRGB; // BGR (SK9822 Standard)
|
||||
|
||||
struct sk9822_leds {
|
||||
struct device *dev;
|
||||
struct gpio_desc *clock_gpio;
|
||||
struct gpio_desc *data_gpio;
|
||||
|
||||
cRGB *led_colors;
|
||||
uint8_t led_brightness;
|
||||
uint16_t led_count;
|
||||
};
|
||||
|
||||
int sk9822_set_color_str(struct sk9822_leds *sk9822, const char *hex);
|
||||
int sk9822_update(struct sk9822_leds *sk9822);
|
||||
|
||||
#endif /* SK9822_H_ */
|
||||
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2017 Genexis B.V.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#include "sk9822.h"
|
||||
|
||||
/**
|
||||
* @brief Bitbang write operation CLOCK+DATA
|
||||
*
|
||||
* Assumed state before call: CLOCK- Low, DATA- High
|
||||
*/
|
||||
void sk9822_bb_write(struct sk9822_leds *sk9822, uint8_t c)
|
||||
{
|
||||
uint8_t i;
|
||||
|
||||
for (i = 0; i < 8 ; i++) {
|
||||
if (!(c&0x80)) {
|
||||
gpiod_set_value(sk9822->data_gpio, 0); // set data low
|
||||
} else {
|
||||
gpiod_set_value(sk9822->data_gpio, 1); // set data high
|
||||
}
|
||||
|
||||
gpiod_set_value(sk9822->clock_gpio, 1); // set clock high, data sampled here
|
||||
c <<= 1;
|
||||
udelay(1); // stretch clock
|
||||
gpiod_set_value(sk9822->clock_gpio, 0); // set clock low
|
||||
}
|
||||
|
||||
// State after call: SCK Low, Data high
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2017 Genexis B.V.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef _SK9822_BB_H_
|
||||
#define _SK9822_BB_H_
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#include "sk9822.h"
|
||||
|
||||
void sk9822_bb_write(struct sk9822_leds *sk9822, uint8_t c);
|
||||
|
||||
#endif /* _SK9822_BB_H_ */
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
config WIFILIFE_OPEN
|
||||
config ICE_OPEN
|
||||
bool "Use pre-compiled version for Open SDK"
|
||||
default n
|
||||
1046
ice-client/Makefile
Normal file
1046
ice-client/Makefile
Normal file
File diff suppressed because it is too large
Load Diff
67
ice-client/files/ice-client.uci_default
Normal file
67
ice-client/files/ice-client.uci_default
Normal file
@@ -0,0 +1,67 @@
|
||||
#!/bin/sh
|
||||
|
||||
grep -rq "^ice:" /etc/passwd || {
|
||||
adduser -D -H -s /bin/false ice
|
||||
}
|
||||
|
||||
uci -q delete passwords.ice
|
||||
uci -q set passwords.ice=usertype
|
||||
uci -q set passwords.ice.password="\$WPAKEY"
|
||||
uci -q add_list passwords.ice._access_r=root
|
||||
uci -q commit passwords
|
||||
|
||||
uci show rpcd | grep username=.*ice.* >/dev/null || {
|
||||
cat >> /etc/config/rpcd << EOF
|
||||
|
||||
config login
|
||||
option username 'ice'
|
||||
option password '\$p\$ice'
|
||||
list _access_r 'none'
|
||||
list write 'user-user'
|
||||
list write 'juci-broadcom-dsl'
|
||||
list write 'juci-broadcom-dsl-admin'
|
||||
list write 'juci-broadcom-ethernet'
|
||||
list write 'juci-broadcom-iptv'
|
||||
list write 'juci-broadcom-vlan'
|
||||
list write 'juci-broadcom-vlan-admin'
|
||||
list write 'juci-wireless'
|
||||
list write 'juci-wireless-admin'
|
||||
list write 'juci-catv'
|
||||
list write 'juci-ddns'
|
||||
list write 'juci-diagnostics'
|
||||
list write 'juci-dnsmasq-dhcp'
|
||||
list write 'juci-dropbear'
|
||||
list write 'juci-ethernet'
|
||||
list write 'juci-event'
|
||||
list write 'juci-firewall-fw3'
|
||||
list write 'juci-iconnect'
|
||||
list write 'juci-igmpinfo'
|
||||
list write 'juci-inteno-backup'
|
||||
list write 'juci-inteno-multiwan'
|
||||
list write 'juci-inteno-provisioning'
|
||||
list write 'juci-inteno-qos'
|
||||
list write 'juci-inteno-voice-client'
|
||||
list write 'juci-minidlna'
|
||||
list write 'juci-mod-status'
|
||||
list write 'juci-mod-system'
|
||||
list write 'juci-natalie-dect'
|
||||
list write 'juci-netmode'
|
||||
list write 'juci-network-netifd'
|
||||
list write 'juci-owsd'
|
||||
list write 'juci-printer'
|
||||
list write 'juci-realtime-graphs'
|
||||
list write 'juci-samba'
|
||||
list write 'juci-sfp'
|
||||
list write 'juci-snmpd'
|
||||
list write 'juci-sysupgrade'
|
||||
list write 'juci-uhttpd'
|
||||
list write 'juci-upnp'
|
||||
list write 'juci-usb'
|
||||
list write 'core'
|
||||
list write 'unauthenticated'
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2019 iopsys Software Solutions AB
|
||||
# Copyright (C) 2016 Inteno Broadband AB
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
|
||||
@@ -19,9 +19,17 @@ config CWMP_DEBUG
|
||||
bool "Compile with debug options"
|
||||
default y
|
||||
|
||||
config XMPP_ENABLE
|
||||
bool "enable xmpp feature"
|
||||
default n
|
||||
|
||||
config CWMP_DEVEL_DEBUG
|
||||
bool "Compile with development debug options"
|
||||
default n
|
||||
|
||||
config LIBDATAMODEL_VENDOR_PREFIX
|
||||
string "Vendor Prefix"
|
||||
default "X_Inteno_SE_"
|
||||
|
||||
endif
|
||||
|
||||
|
||||
7
icwmp/Config_datamodel.in
Normal file
7
icwmp/Config_datamodel.in
Normal file
@@ -0,0 +1,7 @@
|
||||
if PACKAGE_libdatamodel
|
||||
|
||||
config UPNP_TR064
|
||||
bool "Compile with tr064 features"
|
||||
default n
|
||||
|
||||
endif
|
||||
111
icwmp/Makefile
111
icwmp/Makefile
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2019 iopsys Software Solutions AB
|
||||
# Copyright (C) 2012 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
@@ -8,17 +8,15 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=icwmp
|
||||
PKG_VERSION:=4.0-2019-10-01
|
||||
PKG_VERSION:=4.0-2018-09-03
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/icwmp.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=ed781436f96f2dc3cf58b35adc640c6f9f6783d1
|
||||
PKG_SOURCE_VERSION:=fe324dbae2c8dbcfb55555dee9b3700280151aa1
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_CWMP_ACS_MULTI \
|
||||
@@ -32,6 +30,13 @@ CWMP_REVISION=$(shell svnversion ./src/ -n|cut -f2 -d:)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/libdatamodel
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Library for broadband-forum data model
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c
|
||||
endef
|
||||
|
||||
define Package/icwmp_stun
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
@@ -46,32 +51,11 @@ define Package/icwmp_xmpp
|
||||
DEPENDS:=+libuci +libubox +libexpat +libstrophe
|
||||
endef
|
||||
|
||||
define Package/icwmp_twamp
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=TR-069 twamp feature
|
||||
DEPENDS:=+libuci
|
||||
endef
|
||||
|
||||
define Package/icwmp_udpechoserver
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=TR-069 udpechoserver feature
|
||||
DEPENDS:=+libuci
|
||||
endef
|
||||
|
||||
define Package/icwmp_bulkdata
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=TR-069 BulkData Collection
|
||||
DEPENDS:=+libubus +libuci +libubox +libjson-c +libcurl +curl +libblobmsg-json +libbbfdm
|
||||
endef
|
||||
|
||||
define Package/icwmp/Default
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=CWMP client
|
||||
DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt +zlib +libjson-c +libopenssl +curl +libbbfdm +(PACKAGE_libtr098):libtr098
|
||||
DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt +zlib +libjson-c +libopenssl +libexpat +libstrophe +curl +libtrace +libdatamodel
|
||||
endef
|
||||
|
||||
define Package/icwmp/description
|
||||
@@ -96,6 +80,10 @@ define Package/icwmp-zstream/config
|
||||
source "$(SOURCE)/Config_cwmp.in"
|
||||
endef
|
||||
|
||||
define Package/libdatamodel/config
|
||||
source "$(SOURCE)/Config_datamodel.in"
|
||||
endef
|
||||
|
||||
USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
|
||||
ifneq ($(USE_LOCAL),)
|
||||
define Build/Prepare
|
||||
@@ -107,6 +95,8 @@ ifeq ($(CONFIG_TARGET_iopsys_ramips),y)
|
||||
TARGET_CFLAGS += -DEX400
|
||||
endif
|
||||
|
||||
TARGET_CFLAGS += -DCUSTOM_PREFIX=\\\"$(CONFIG_LIBDATAMODEL_VENDOR_PREFIX)\\\"
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-D_GNU_SOURCE -D_AADJ
|
||||
|
||||
@@ -127,6 +117,16 @@ CONFIGURE_ARGS += \
|
||||
--with-libubox-include-path=$(STAGING_DIR)/usr/include \
|
||||
--with-libubus-include-path=$(STAGING_DIR)/usr/include
|
||||
|
||||
ifeq ($(CONFIG_UPNP_TR064),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-upnptr064
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_XMPP_ENABLE),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-xmpp
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),zstream)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-http=zstream \
|
||||
@@ -158,23 +158,18 @@ CONFIGURE_ARGS += \
|
||||
--enable-devel
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_PACKAGE_libtr098),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-tr098
|
||||
endif
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-tr181
|
||||
define Package/libdatamodel/install
|
||||
$(INSTALL_DIR) $(1)/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/bin/.libs/libdatamodel.so* $(1)/lib/
|
||||
endef
|
||||
|
||||
define Package/icwmp-$(BUILD_VARIANT)/install
|
||||
$(INSTALL_DIR) $(1)/etc/icwmpd
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(CP) $(PKG_BUILD_DIR)/bin/icwmpd $(1)/usr/sbin
|
||||
ifeq ($(CONFIG_PACKAGE_libtr098),y)
|
||||
$(CP) $(PKG_BUILD_DIR)/bin/icwmp_tr098d $(1)/usr/sbin
|
||||
endif
|
||||
$(CP) $(PKG_BUILD_DIR)/bin/.libs/icwmpd $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/cwmp $(1)/etc/config
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/dmmap $(1)/etc/icwmpd
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/firewall.cwmp $(1)/etc/firewall.cwmp
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
@@ -206,35 +201,18 @@ define Package/icwmp_xmpp/install
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init/icwmp_xmppd $(1)/etc/init.d/icwmp_xmppd
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/cwmp_xmpp $(1)/etc/config
|
||||
$(CP) ./xmpp-files/* $(1)/
|
||||
endef
|
||||
|
||||
define Package/icwmp_udpechoserver/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/icwmp_udpechoserverd $(1)/usr/sbin/icwmp_udpechoserverd
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init/icwmp_udpechoserverd $(1)/etc/init.d/icwmp_udpechoserverd
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/cwmp_udpechoserver $(1)/etc/config
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DIR) $(1)/usr/include/libdatamodel
|
||||
$(CP) $(PKG_BUILD_DIR)/dm/*.h $(1)/usr/include/libdatamodel
|
||||
$(CP) $(PKG_BUILD_DIR)/dm/dmtree/common/root.h $(1)/usr/include/libdatamodel
|
||||
$(INSTALL_DIR) $(1)/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/bin/.libs/libdatamodel.so* $(1)/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/bin/.libs/libdatamodel.a $(1)/lib
|
||||
endef
|
||||
|
||||
define Package/icwmp_twamp/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/icwmp_twampd $(1)/usr/sbin/icwmp_twampd
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init/icwmp_twampd $(1)/etc/init.d/icwmp_twampd
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/cwmp_twamp $(1)/etc/config
|
||||
endef
|
||||
|
||||
define Package/icwmp_bulkdata/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/icwmp_bulkdatad $(1)/usr/sbin/icwmp_bulkdatad
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/init/icwmp_bulkdatad $(1)/etc/init.d/icwmp_bulkdatad
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/cwmp_bulkdata $(1)/etc/config
|
||||
endef
|
||||
|
||||
define Package/icwmp-$(BUILD_VARIANT)/postinst
|
||||
#!/bin/sh
|
||||
@@ -255,10 +233,9 @@ define Package/icwmp-$(BUILD_VARIANT)/prerm
|
||||
exit 0
|
||||
endef
|
||||
|
||||
|
||||
$(eval $(call BuildPackage,icwmp-curl))
|
||||
$(eval $(call BuildPackage,libdatamodel))
|
||||
$(eval $(call BuildPackage,icwmp_stun))
|
||||
$(eval $(call BuildPackage,icwmp_xmpp))
|
||||
$(eval $(call BuildPackage,icwmp_udpechoserver))
|
||||
$(eval $(call BuildPackage,icwmp_twamp))
|
||||
$(eval $(call BuildPackage,icwmp_bulkdata))
|
||||
$(eval $(call BuildPackage,icwmp-zstream))
|
||||
|
||||
@@ -63,23 +63,13 @@ handle_icwmp_restart() {
|
||||
network_get_device curdev $INTERFACE
|
||||
[ -n "$curdev" ] && echo $curdev > $devfile || rm -f $devfile
|
||||
|
||||
local prevopt43url=""
|
||||
local curopt43url=""
|
||||
local opt43urlfile=/tmp/ipv4/$INTERFACE-opt43url
|
||||
prevopt43url=$(cat $opt43urlfile 2>/dev/null)
|
||||
curopt43url="$(uci -P /var/state -q get cwmp.acs.dhcp_url)"
|
||||
[ -n "$curopt43url" ] && echo $curopt43url > $opt43urlfile || rm -f $opt43urlfile
|
||||
|
||||
[ \
|
||||
"$prevdev" == "$curdev" -a \
|
||||
"$previpaddr" = "$curipaddr" -a \
|
||||
"$prevgateway" = "$curgateway" -a \
|
||||
"$prevsubnets" = "$cursubnets" -a \
|
||||
"$prevdnsservers" = "$curdnsservers" \
|
||||
] && {
|
||||
[ "$prevopt43url" = "$curopt43url" ] && exit 0
|
||||
[ -z "$prevopt43url" ] && exit 0
|
||||
}
|
||||
] && exit 0
|
||||
|
||||
/etc/init.d/icwmpd reload &
|
||||
}
|
||||
|
||||
@@ -41,14 +41,4 @@ set_cwmp_reqopts() {
|
||||
fi
|
||||
}
|
||||
|
||||
regenerate_ssl_link(){
|
||||
local cert_dir="/etc/ssl/certs"
|
||||
local all_file=$(ls $cert_dir/*.pem)
|
||||
for cfile in $all_file
|
||||
do
|
||||
ln -s $cfile $cert_dir/$(openssl x509 -hash -noout -in $cfile).0
|
||||
done
|
||||
}
|
||||
|
||||
set_cwmp_reqopts
|
||||
regenerate_ssl_link
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -f /etc/config/cwmp_xmpp ] || exit 0
|
||||
|
||||
[ "$ACTION" == "ifup" ] || exit 0
|
||||
[ "$INTERFACE" == "loopback" ] && exit 0
|
||||
|
||||
local defwan=$(uci -q get cwmp.cpe.default_wan_interface)
|
||||
[ -n "$defwan" -a "$(uci -q get network.$defwan)" == "interface" -a "$defwan" != "$INTERFACE" ] && exit 0
|
||||
|
||||
local islan="$(uci -q get network.$INTERFACE.is_lan)"
|
||||
[ "$islan" == "1" ] && exit 0
|
||||
|
||||
local proto="$(uci -q get network.$INTERFACE.proto)"
|
||||
[ "$proto" == "none" ] && exit 0
|
||||
|
||||
local ifname="$(uci -q get network.$INTERFACE.ifname)"
|
||||
[ "${ifname:0:1}" == "@" ] && exit 0
|
||||
|
||||
/etc/init.d/icwmp_xmppd reload &
|
||||
|
||||
@@ -1,45 +1,26 @@
|
||||
#
|
||||
# Copyright (C) 2018 iopsys Software Solutions AB
|
||||
# Copyright (C) 2013 Inteno
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=ifbt
|
||||
PKG_VERSION:=0.2
|
||||
PKG_VERSION:=0.1
|
||||
|
||||
PKG_SOURCE_VERSION:=f6edff47b6c0a154ab892301acf767d19ac8ad73
|
||||
PKG_SOURCE_VERSION:=da97d6668d3c0e3f2be226c66b406e90179ada81
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ifbt.git
|
||||
PKG_SOURCE_URL:=git@private.inteno.se:ifbt.git
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=README
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_mips),y)
|
||||
TARGET_PLATFORM:=-DIOPSYS_BROADCOM
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
|
||||
TARGET_PLATFORM:=-DIOPSYS_BROADCOM
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_linksys),y)
|
||||
TARGET_PLATFORM:=-DIOPSYS_MARVELL
|
||||
else ifeq ($(CONFIG_TARGET_intel_mips),y)
|
||||
TARGET_PLATFORM:=-DIOPSYS_INTEL
|
||||
else ifeq ($(CONFIG_TARGET_iopsys_ramips),y)
|
||||
TARGET_PLATFORM:=-DIOPSYS_MEDIATEK
|
||||
else
|
||||
$(info (UNEXPECTED CONFIG TARGET))
|
||||
endif
|
||||
|
||||
export TARGET_PLATFORM
|
||||
|
||||
define Package/ifbt
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libwifi +libjson-c
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c
|
||||
TITLE:=Fast BSS Transition
|
||||
endef
|
||||
|
||||
|
||||
39
ifsi/Makefile
Normal file
39
ifsi/Makefile
Normal file
@@ -0,0 +1,39 @@
|
||||
#
|
||||
# Copyright (C) 2015 Inteno
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=ifsi
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_RELEASE:=1
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
LDFLAGS+= \
|
||||
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
|
||||
-Wl,-rpath-link=$(STAGING_DIR)/lib
|
||||
|
||||
define Package/ifsi
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:=+ubus +libubox
|
||||
TITLE:=Inteno Functional Script Interface
|
||||
endef
|
||||
|
||||
define Package/ifsi/description
|
||||
Inteno Functional Script Interface
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
mkdir -p $(PKG_BUILD_DIR)
|
||||
$(CP) ./src/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
|
||||
define Package/ifsi/install
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ifsi $(1)/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ifsi))
|
||||
17
ifsi/src/Makefile
Normal file
17
ifsi/src/Makefile
Normal file
@@ -0,0 +1,17 @@
|
||||
CC = gcc
|
||||
CFLAGS = -g -Wall
|
||||
LOCLIBS =
|
||||
LIBS = -lubus -lubox -lblobmsg_json
|
||||
OBJS = ifsi.o
|
||||
SRCS = ifsi.c
|
||||
LIBSRCS =
|
||||
ISRCS =
|
||||
|
||||
all: ifsi
|
||||
|
||||
ifsi: ${OBJS}
|
||||
${CC} ${LDFLAGS} ${LIBSRCS} -o ifsi ${OBJS} ${LIBS}
|
||||
|
||||
clean:
|
||||
rm -f ifsi *.o
|
||||
|
||||
74
ifsi/src/ifsi.c
Normal file
74
ifsi/src/ifsi.c
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* ifsi -- Inteno functional script interface
|
||||
*
|
||||
* Copyright (C) 2012-2013 Inteno Broadband Technology AB. All rights reserved.
|
||||
*
|
||||
* Author: dev@inteno.se
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <libubox/blobmsg.h>
|
||||
#include <libubox/blobmsg_json.h>
|
||||
#include <libubox/uloop.h>
|
||||
|
||||
#include <libubus.h>
|
||||
|
||||
static struct ubus_context *ctx;
|
||||
static struct ubus_event_handler event_listener;
|
||||
static struct blob_buf b;
|
||||
|
||||
|
||||
static void receive_event(struct ubus_context *ctx, struct ubus_event_handler *ev,
|
||||
const char *type, struct blob_attr *msg)
|
||||
{
|
||||
char *str;
|
||||
uint32_t id;
|
||||
|
||||
str = blobmsg_format_json(msg, true);
|
||||
fprintf(stdout, "I got %s event %s\n", type, str);
|
||||
free(str);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
const char *ubus_socket = NULL;
|
||||
int ret;
|
||||
|
||||
uloop_init();
|
||||
|
||||
ctx = ubus_connect(ubus_socket);
|
||||
if (!ctx) {
|
||||
fprintf(stderr, "Failed to connect to ubus\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
ubus_add_uloop(ctx);
|
||||
|
||||
event_listener.cb = receive_event;
|
||||
ret = ubus_register_event_handler(ctx, &event_listener, "*");
|
||||
if (ret)
|
||||
fprintf(stderr, "Couldn't register to router events\n");
|
||||
|
||||
uloop_run();
|
||||
|
||||
ubus_free(ctx);
|
||||
uloop_done();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2018 iopsys
|
||||
# Copyright (C) 2018 Inteno
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
@@ -11,22 +11,20 @@ PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
|
||||
PKG_SOURCE_PROTO=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/imonitor.git
|
||||
PKG_SOURCE_URL:=http://public.inteno.se/imonitor.git
|
||||
PKG_SOURCE_VERSION:=532f4900862bcb45d8cd4bf37555fabda81750b6
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=${PKG_NAME}-${PKG_VERSION}
|
||||
PKG_MAINTAINER:=Sartura Support for Inteno <support-inteno@sartura.hr>
|
||||
PKG_INSTALL:=1
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
define Package/imonitor
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=iopsysWrt process supervisor
|
||||
TITLE:=Inteno process supervisor
|
||||
DEPENDS:=+ubox +uci +ubus +rpcd +rpcd-mod-file
|
||||
endef
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2016 iopsys
|
||||
# Copyright (C) 2016 Inteno
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
@@ -12,17 +12,14 @@ PKG_NAME:=inbd
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_VERSION:=53ca7f58edb87976b5897ccaf487bb0cbbf39d07
|
||||
PKG_SOURCE_VERSION:=f81c146f0b07540877545e5ab644ec8e29905a4d
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/inbd
|
||||
PKG_SOURCE_URL:=http://public.inteno.se/inbd
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
# support parallel build
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
@@ -37,7 +34,7 @@ include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/inbd
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=iopsys Netlink Bridge Daemon
|
||||
TITLE:=Inteno Netlink Bridge Daemon
|
||||
URL:=
|
||||
DEPENDS:=+libuci +libubus +libblobmsg-json +libnl-genl
|
||||
endef
|
||||
|
||||
@@ -20,9 +20,6 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
# support parallel build
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
|
||||
@@ -1,42 +1,36 @@
|
||||
#
|
||||
# Copyright (C) 2019 iopsys
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
# Copyright (C) 2016 Inteno
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=netmode
|
||||
PKG_NAME:=inteno-netmodes
|
||||
PKG_VERSION:=0.2.0
|
||||
|
||||
PKG_SOURCE_VERSION:=6406325e72d7ddd0ff7aaa3a87669519021bdb11
|
||||
PKG_SOURCE_VERSION:=fbd7dcfab03df19b3c32675940e0aee708c7cf75
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/netmoded
|
||||
PKG_SOURCE_URL:=http://public.inteno.se:/netmoded
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/netmode
|
||||
define Package/inteno-netmodes
|
||||
CATEGORY:=Base system
|
||||
DEPENDS:=+fping +ubus +libubox +libuci
|
||||
TITLE:=Predefined Network Modes
|
||||
endef
|
||||
|
||||
define Package/netmode/description
|
||||
define Package/inteno-netmodes/description
|
||||
Predefined Network Modes
|
||||
endef
|
||||
|
||||
define Package/netmode/install
|
||||
define Package/inteno-netmodes/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/netmoded $(1)/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,netmode))
|
||||
$(eval $(call BuildPackage,inteno-netmodes))
|
||||
@@ -3,7 +3,3 @@ config mode 'setup'
|
||||
option detail ''
|
||||
option curmode 'routed'
|
||||
|
||||
config tools 'tools'
|
||||
option wificontrol 0
|
||||
option arp_discovery 1
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
|
||||
[ "$INTERFACE" != "wan" ] && exit
|
||||
|
||||
automode="$(uci -q get netmode.setup.automode)"
|
||||
[ "$automode" == "0" ] && exit
|
||||
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/network.sh
|
||||
. /lib/functions/netmode.sh
|
||||
@@ -12,7 +12,7 @@ start_netmoded() {
|
||||
procd_open_instance
|
||||
procd_set_param command $NETMODED
|
||||
|
||||
procd_append_param command --verbose warning -i macaddr
|
||||
procd_append_param command --verbose warning
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
"CG300",
|
||||
"CG301",
|
||||
"EX400",
|
||||
"SDX810-AP",
|
||||
"NORRLAND"
|
||||
"SDX810-AP"
|
||||
],
|
||||
"acl" : [
|
||||
"admin",
|
||||
@@ -18,8 +18,8 @@ config interface 'lan'
|
||||
config interface 'wan'
|
||||
option type 'anywan'
|
||||
option proto 'dhcp'
|
||||
option hostname 'iopsys-$MAC'
|
||||
option vendorid '$HARDWAREID'
|
||||
option vendorid '$HARDWAREID-INTENO'
|
||||
option hostname 'Inteno_$MAC4'
|
||||
option ifname 'ptm0.1 atm0.1 $WAN.1'
|
||||
option ipv6 '1'
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
config wifi-status 'status'
|
||||
option wlan '1'
|
||||
option wps '1'
|
||||
option sched_status '0'
|
||||
option schedule '0'
|
||||
|
||||
@@ -7,6 +8,9 @@ config bandsteering 'bandsteering'
|
||||
option enabled '0'
|
||||
option policy '0'
|
||||
|
||||
config apsteering 'apsteering'
|
||||
option enabled '0'
|
||||
|
||||
config wifi-device 'wl0'
|
||||
option type 'broadcom'
|
||||
option country 'EU/13'
|
||||
@@ -14,7 +18,7 @@ config wifi-device 'wl0'
|
||||
option bandwidth '80'
|
||||
option hwmode 'auto'
|
||||
option channel 'auto'
|
||||
option scantimer '60'
|
||||
option scantimer '15'
|
||||
option wmm '1'
|
||||
option wmm_noack '0'
|
||||
option wmm_apsd '1'
|
||||
@@ -38,15 +42,15 @@ config wifi-iface
|
||||
option device 'wl0'
|
||||
option network 'lan'
|
||||
option mode 'ap'
|
||||
option ssid 'iopsys-$BSSID4'
|
||||
option ssid 'Inteno-$BSSID4'
|
||||
option encryption 'psk2'
|
||||
option cipher 'auto'
|
||||
option key '$WPAKEY'
|
||||
option gtk_rekey '3600'
|
||||
option macfilter 'disable'
|
||||
option wps '1'
|
||||
option macfilter '0'
|
||||
option wps_pbc '1'
|
||||
option wmf_bss_enable '1'
|
||||
option maxassoc '32'
|
||||
option bss_max '32'
|
||||
option ifname 'wl0'
|
||||
|
||||
config wifi-device 'wl1'
|
||||
@@ -56,7 +60,7 @@ config wifi-device 'wl1'
|
||||
option bandwidth '20'
|
||||
option hwmode 'auto'
|
||||
option channel 'auto'
|
||||
option scantimer '60'
|
||||
option scantimer '15'
|
||||
option wmm '1'
|
||||
option wmm_noack '0'
|
||||
option wmm_apsd '1'
|
||||
@@ -78,14 +82,14 @@ config wifi-iface
|
||||
option device 'wl1'
|
||||
option network 'lan'
|
||||
option mode 'ap'
|
||||
option ssid 'iopsys-$BSSID4'
|
||||
option ssid 'Inteno-$BSSID4'
|
||||
option encryption 'mixed-psk'
|
||||
option cipher 'auto'
|
||||
option key '$WPAKEY'
|
||||
option gtk_rekey '3600'
|
||||
option macfilter 'disable'
|
||||
option wps '1'
|
||||
option macfilter '0'
|
||||
option wps_pbc '1'
|
||||
option wmf_bss_enable '1'
|
||||
option maxassoc '32'
|
||||
option bss_max '32'
|
||||
option ifname 'wl1'
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"description": [
|
||||
{ "en" : "VoIP + Bridged IPTV" },
|
||||
{ "sv" : "VoIP + Brygg IPTV" }
|
||||
],
|
||||
"explanation": [
|
||||
{ "en" : "VoIP on dedicated VLAN + LAN4 port is bridged with IPTV VLAN" },
|
||||
{ "sv" : "VoIP on dedicated VLAN + LAN4 port överbryggas med IPTV VLAN" }
|
||||
],
|
||||
"credentials" : 0,
|
||||
"excluded_boards" : [
|
||||
"CG300",
|
||||
"CG301",
|
||||
"EX400",
|
||||
"F*",
|
||||
"SDX810-AP"
|
||||
],
|
||||
"acl" : [
|
||||
"admin",
|
||||
"support"
|
||||
]
|
||||
}
|
||||
|
||||
117
inteno-netmodes/files/etc/netmodes/internet_iptv_voip/firewall
Normal file
117
inteno-netmodes/files/etc/netmodes/internet_iptv_voip/firewall
Normal file
@@ -0,0 +1,117 @@
|
||||
config settings 'settings'
|
||||
option disabled '0'
|
||||
|
||||
config defaults
|
||||
option syn_flood 1
|
||||
option input ACCEPT
|
||||
option output ACCEPT
|
||||
option forward REJECT
|
||||
# Uncomment this line to disable ipv6 rules
|
||||
# option disable_ipv6 1
|
||||
|
||||
config zone
|
||||
option name lan
|
||||
list network 'lan'
|
||||
option input ACCEPT
|
||||
option output ACCEPT
|
||||
option forward ACCEPT
|
||||
|
||||
config zone
|
||||
option name wan
|
||||
list network 'wan'
|
||||
list network 'wan6'
|
||||
list network 'iptv'
|
||||
option input REJECT
|
||||
option output ACCEPT
|
||||
option forward REJECT
|
||||
option masq 1
|
||||
option mtu_fix 1
|
||||
|
||||
config forwarding
|
||||
option src lan
|
||||
option dest wan
|
||||
|
||||
# We need to accept udp packets on port 68,
|
||||
# see https://dev.openwrt.org/ticket/4108
|
||||
config rule
|
||||
option name Allow-DHCP-Renew
|
||||
option src wan
|
||||
option proto udp
|
||||
option dest_port 68
|
||||
option target ACCEPT
|
||||
option family ipv4
|
||||
option hidden 1
|
||||
|
||||
# Allow IPv4 ping
|
||||
config rule
|
||||
option name Allow-Ping
|
||||
option src wan
|
||||
option proto icmp
|
||||
option icmp_type echo-request
|
||||
option family ipv4
|
||||
option target ACCEPT
|
||||
option hidden 1
|
||||
|
||||
# Allow DHCPv6 replies
|
||||
# see https://dev.openwrt.org/ticket/10381
|
||||
config rule
|
||||
option name Allow-DHCPv6
|
||||
option src wan
|
||||
option proto udp
|
||||
option src_ip fe80::/10
|
||||
option src_port 547
|
||||
option dest_ip fe80::/10
|
||||
option dest_port 546
|
||||
option family ipv6
|
||||
option target ACCEPT
|
||||
option hidden 1
|
||||
|
||||
# Allow essential incoming IPv6 ICMP traffic
|
||||
config rule
|
||||
option name Allow-ICMPv6-Input
|
||||
option src wan
|
||||
option proto icmp
|
||||
list icmp_type echo-request
|
||||
list icmp_type echo-reply
|
||||
list icmp_type destination-unreachable
|
||||
list icmp_type packet-too-big
|
||||
list icmp_type time-exceeded
|
||||
list icmp_type bad-header
|
||||
list icmp_type unknown-header-type
|
||||
list icmp_type router-solicitation
|
||||
list icmp_type neighbour-solicitation
|
||||
list icmp_type router-advertisement
|
||||
list icmp_type neighbour-advertisement
|
||||
option limit 1000/sec
|
||||
option family ipv6
|
||||
option target ACCEPT
|
||||
option hidden 1
|
||||
|
||||
# Allow essential forwarded IPv6 ICMP traffic
|
||||
config rule
|
||||
option name Allow-ICMPv6-Forward
|
||||
option src wan
|
||||
option dest *
|
||||
option proto icmp
|
||||
list icmp_type echo-request
|
||||
list icmp_type echo-reply
|
||||
list icmp_type destination-unreachable
|
||||
list icmp_type packet-too-big
|
||||
list icmp_type time-exceeded
|
||||
list icmp_type bad-header
|
||||
list icmp_type unknown-header-type
|
||||
option limit 1000/sec
|
||||
option family ipv6
|
||||
option target ACCEPT
|
||||
option hidden 1
|
||||
|
||||
# include a file with users custom iptables rules
|
||||
config include
|
||||
option path /etc/firewall.user
|
||||
option reload 1
|
||||
|
||||
# include a file with rules for SIP and RTP traffic
|
||||
config include
|
||||
option path /etc/firewall.sip
|
||||
option reload 1
|
||||
|
||||
18
inteno-netmodes/files/etc/netmodes/internet_iptv_voip/mcpd
Normal file
18
inteno-netmodes/files/etc/netmodes/internet_iptv_voip/mcpd
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
config mcpd 'mcpd'
|
||||
option igmp_query_response_interval '10'
|
||||
option igmp_last_member_query_interval '10'
|
||||
option igmp_robustness_value '2'
|
||||
option igmp_lan_to_lan_multicast '0'
|
||||
option igmp_max_groups '25'
|
||||
option igmp_max_sources '10'
|
||||
option igmp_max_members '25'
|
||||
option igmp_fast_leave '1'
|
||||
option igmp_join_immediate '0'
|
||||
option igmp_proxy_enable '0'
|
||||
option igmp_snooping_enable '2'
|
||||
option igmp_snooping_interfaces 'br-iptv'
|
||||
option igmp_default_version '2'
|
||||
option igmp_query_interval '120'
|
||||
option igmp_proxy_interfaces 'iptv'
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
|
||||
config interface 'loopback'
|
||||
option is_lan '1'
|
||||
option ifname 'lo'
|
||||
option proto 'static'
|
||||
option ipaddr '127.0.0.1'
|
||||
option netmask '255.0.0.0'
|
||||
|
||||
config interface 'lan'
|
||||
option is_lan '1'
|
||||
option type 'bridge'
|
||||
option proto 'static'
|
||||
option ipaddr '192.168.1.1'
|
||||
option netmask '255.255.255.0'
|
||||
option ifname '$LAN1 $LAN2 $LAN3'
|
||||
option ip6assign '60'
|
||||
|
||||
config interface 'wan'
|
||||
option type 'anywan'
|
||||
option proto 'dhcp'
|
||||
option vendorid '$HARDWAREID-INTENO'
|
||||
option hostname 'Inteno_$MAC4'
|
||||
option ifname 'ptm0.1 atm0.1 $WAN.1'
|
||||
option ipv6 '1'
|
||||
|
||||
config interface 'iptv'
|
||||
option type 'bridge'
|
||||
option proto 'dhcp'
|
||||
option gateway '0.0.0.0'
|
||||
option reqopts 'staticroutes'
|
||||
option ifname 'ptm0.100 $WAN.100 $LAN4'
|
||||
option defaultroute '0'
|
||||
|
||||
config interface 'voip'
|
||||
option type 'anywan'
|
||||
option proto 'dhcp'
|
||||
option gateway '0.0.0.0'
|
||||
option reqopts 'staticroutes'
|
||||
option ifname 'ptm0.200 $WAN.200'
|
||||
option defaultroute '0'
|
||||
|
||||
config interface 'wan6'
|
||||
option proto 'dhcpv6'
|
||||
option ifname '@wan'
|
||||
|
||||
config device 'atmwan'
|
||||
option type 'untagged'
|
||||
option ifname 'atm0'
|
||||
option name 'atm0.1'
|
||||
|
||||
config device 'ptmwan'
|
||||
option type 'untagged'
|
||||
option ifname 'ptm0'
|
||||
option name 'ptm0.1'
|
||||
|
||||
config device 'ethwan'
|
||||
option type 'untagged'
|
||||
option ifname '$WAN'
|
||||
option name '$WAN.1'
|
||||
|
||||
config device 'ethtv'
|
||||
option type '8021q'
|
||||
option name '$WAN.100'
|
||||
option ifname '$WAN'
|
||||
option vid '100'
|
||||
option priority '0'
|
||||
|
||||
config device 'ptmtv'
|
||||
option type '8021q'
|
||||
option name 'ptm0.100'
|
||||
option ifname 'ptm0'
|
||||
option vid '100'
|
||||
option priority '0'
|
||||
|
||||
config device 'ethvoip'
|
||||
option type '8021q'
|
||||
option name '$WAN.200'
|
||||
option ifname '$WAN'
|
||||
option vid '200'
|
||||
option priority '0'
|
||||
|
||||
config device 'ptmvoip'
|
||||
option type '8021q'
|
||||
option name 'ptm0.200'
|
||||
option ifname 'ptm0'
|
||||
option vid '200'
|
||||
option priority '0'
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
config wifi-status 'status'
|
||||
option wlan '1'
|
||||
option wps '1'
|
||||
option sched_status '0'
|
||||
option schedule '0'
|
||||
|
||||
@@ -7,6 +8,9 @@ config bandsteering 'bandsteering'
|
||||
option enabled '0'
|
||||
option policy '0'
|
||||
|
||||
config apsteering 'apsteering'
|
||||
option enabled '0'
|
||||
|
||||
config wifi-device 'wl0'
|
||||
option type 'broadcom'
|
||||
option country 'EU/13'
|
||||
@@ -14,7 +18,7 @@ config wifi-device 'wl0'
|
||||
option bandwidth '80'
|
||||
option hwmode 'auto'
|
||||
option channel 'auto'
|
||||
option scantimer '60'
|
||||
option scantimer '15'
|
||||
option wmm '1'
|
||||
option wmm_noack '0'
|
||||
option wmm_apsd '1'
|
||||
@@ -38,15 +42,15 @@ config wifi-iface
|
||||
option device 'wl0'
|
||||
option network 'lan'
|
||||
option mode 'ap'
|
||||
option ssid 'iopsys-$BSSID4'
|
||||
option ssid 'Inteno-$BSSID4'
|
||||
option encryption 'psk2'
|
||||
option cipher 'auto'
|
||||
option key '$WPAKEY'
|
||||
option gtk_rekey '3600'
|
||||
option macfilter 'disable'
|
||||
option wps '1'
|
||||
option macfilter '0'
|
||||
option wps_pbc '1'
|
||||
option wmf_bss_enable '1'
|
||||
option maxassoc '32'
|
||||
option bss_max '32'
|
||||
option ifname 'wl0'
|
||||
|
||||
config wifi-device 'wl1'
|
||||
@@ -56,7 +60,7 @@ config wifi-device 'wl1'
|
||||
option bandwidth '20'
|
||||
option hwmode 'auto'
|
||||
option channel 'auto'
|
||||
option scantimer '60'
|
||||
option scantimer '15'
|
||||
option wmm '1'
|
||||
option wmm_noack '0'
|
||||
option wmm_apsd '1'
|
||||
@@ -78,14 +82,14 @@ config wifi-iface
|
||||
option device 'wl1'
|
||||
option network 'lan'
|
||||
option mode 'ap'
|
||||
option ssid 'iopsys-$BSSID4'
|
||||
option ssid 'Inteno-$BSSID4'
|
||||
option encryption 'mixed-psk'
|
||||
option cipher 'auto'
|
||||
option key '$WPAKEY'
|
||||
option gtk_rekey '3600'
|
||||
option macfilter 'disable'
|
||||
option wps '1'
|
||||
option macfilter '0'
|
||||
option wps_pbc '1'
|
||||
option wmf_bss_enable '1'
|
||||
option maxassoc '32'
|
||||
option bss_max '32'
|
||||
option ifname 'wl1'
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"description": [
|
||||
{ "en" : "Repeater 2.4▴▾5" },
|
||||
{ "sv" : "Repeater 2.4▴▾5" }
|
||||
],
|
||||
"explanation": [
|
||||
{ "en" : "Your router is going to act as a wired extender or wireless repeater to the selected Wireless Access Point. Uplink 2.4G & Downlink 5G" },
|
||||
{ "sv" : "Routern kommer att fungera som en trådbunden extender eller trådlös repeater till den valda trådlösa åtkomstpunkten. Uplink 2.4G & Downlink 5G" }
|
||||
],
|
||||
"excluded_boards" : [
|
||||
"DG15*",
|
||||
"DG40*",
|
||||
"EG40*",
|
||||
"EX40*",
|
||||
"SDX*",
|
||||
"F*"
|
||||
],
|
||||
"uplink_band" : "b",
|
||||
"credentials" : 1,
|
||||
"reboot" : 0
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
config interface 'loopback'
|
||||
option is_lan '1'
|
||||
option ifname 'lo'
|
||||
option proto 'static'
|
||||
option ipaddr '127.0.0.1'
|
||||
option netmask '255.0.0.0'
|
||||
|
||||
config interface 'wan'
|
||||
option type 'bridge'
|
||||
option proto 'dhcp'
|
||||
option hostname 'Inteno-$BSSID4'
|
||||
option ifname '$WAN.1 $LAN1 $LAN2 $LAN3 $LAN4'
|
||||
option reqopts '43'
|
||||
|
||||
config device 'ethwan'
|
||||
option type 'untagged'
|
||||
option ifname '$WAN'
|
||||
option name '$WAN.1'
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
config wifi-status 'status'
|
||||
option wlan '1'
|
||||
option wps '1'
|
||||
option sched_status '0'
|
||||
option schedule '0'
|
||||
|
||||
config bandsteering 'bandsteering'
|
||||
option enabled '0'
|
||||
option policy '0'
|
||||
|
||||
config apsteering 'apsteering'
|
||||
option enabled '0'
|
||||
|
||||
config wifi-device 'wl0'
|
||||
option type 'broadcom'
|
||||
option country 'EU/13'
|
||||
option band 'a'
|
||||
option bandwidth '80'
|
||||
option hwmode '11ac'
|
||||
option channel 'auto'
|
||||
option scantimer '15'
|
||||
option wmm '1'
|
||||
option wmm_noack '0'
|
||||
option wmm_apsd '0'
|
||||
option txpower '100'
|
||||
option rateset 'default'
|
||||
option frag '2346'
|
||||
option rts '2347'
|
||||
option dtim_period '1'
|
||||
option beacon_int '100'
|
||||
option rxchainps '0'
|
||||
option rxchainps_qt '10'
|
||||
option rxchainps_pps '10'
|
||||
option rifs '0'
|
||||
option rifs_advert '0'
|
||||
option maxassoc '32'
|
||||
option beamforming '1'
|
||||
option doth '1'
|
||||
option dfsc '1'
|
||||
|
||||
config wifi-iface
|
||||
option device 'wl0'
|
||||
option network 'wan'
|
||||
option mode 'ap'
|
||||
option ssid 'Inteno-$BSSID4'
|
||||
option encryption 'psk2'
|
||||
option cipher 'auto'
|
||||
option key '$WPAKEY'
|
||||
option gtk_rekey '3600'
|
||||
option macfilter '0'
|
||||
option wps_pbc '1'
|
||||
option wmf_bss_enable '1'
|
||||
option bss_max '32'
|
||||
option ifname 'wl0'
|
||||
|
||||
config wifi-device 'wl1'
|
||||
option type 'broadcom'
|
||||
option country 'EU/13'
|
||||
option band 'b'
|
||||
option bandwidth '20'
|
||||
option hwmode 'auto'
|
||||
option channel 'auto'
|
||||
option scantimer '15'
|
||||
option wmm '1'
|
||||
option wmm_noack '0'
|
||||
option wmm_apsd '0'
|
||||
option txpower '100'
|
||||
option rateset 'default'
|
||||
option frag '2346'
|
||||
option rts '2347'
|
||||
option dtim_period '1'
|
||||
option beacon_int '100'
|
||||
option rxchainps '0'
|
||||
option rxchainps_qt '10'
|
||||
option rxchainps_pps '10'
|
||||
option rifs '0'
|
||||
option rifs_advert '0'
|
||||
option maxassoc '32'
|
||||
option doth '0'
|
||||
option apsta '1'
|
||||
|
||||
config wifi-iface
|
||||
option device 'wl1'
|
||||
option ifname 'wl1'
|
||||
option network 'wan'
|
||||
option mode 'wet'
|
||||
option ssid 'Inteno-$BSSID4'
|
||||
option encryption 'psk2'
|
||||
option cipher 'auto'
|
||||
option wps_pbc '0'
|
||||
option wmf_bss_enable '1'
|
||||
option ifname 'wl1'
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"description": [
|
||||
{ "en" : "Repeater 2.4▴▾2.4&5" },
|
||||
{ "sv" : "Repeater 2.4▴▾2.4&5" }
|
||||
],
|
||||
"explanation": [
|
||||
{ "en" : "Your router is going to act as a wired extender or wireless repeater to the selected Wireless Access Point. Uplink 2.4G & Downlink 2.4G + 5G" },
|
||||
{ "sv" : "Routern kommer att fungera som en trådbunden extender eller trådlös repeater till den valda trådlösa åtkomstpunkten. Uplink 2.4G & Downlink 2.4G + 5G" }
|
||||
],
|
||||
"excluded_boards" : [
|
||||
"DG15*",
|
||||
"DG40*",
|
||||
"EG40*",
|
||||
"EX40*",
|
||||
"SDX*",
|
||||
"F*"
|
||||
],
|
||||
"uplink_band" : "b",
|
||||
"credentials" : 1,
|
||||
"reboot" : 0
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
config interface 'loopback'
|
||||
option is_lan '1'
|
||||
option ifname 'lo'
|
||||
option proto 'static'
|
||||
option ipaddr '127.0.0.1'
|
||||
option netmask '255.0.0.0'
|
||||
|
||||
config interface 'wan'
|
||||
option type 'bridge'
|
||||
option proto 'dhcp'
|
||||
option hostname 'Inteno-$BSSID4'
|
||||
option ifname '$WAN.1 $LAN1 $LAN2 $LAN3 $LAN4'
|
||||
option reqopts '43'
|
||||
|
||||
config device 'ethwan'
|
||||
option type 'untagged'
|
||||
option ifname '$WAN'
|
||||
option name '$WAN.1'
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
config wifi-status 'status'
|
||||
option wlan '1'
|
||||
option wps '1'
|
||||
option sched_status '0'
|
||||
option schedule '0'
|
||||
|
||||
config bandsteering 'bandsteering'
|
||||
option enabled '0'
|
||||
option policy '0'
|
||||
|
||||
config apsteering 'apsteering'
|
||||
option enabled '0'
|
||||
|
||||
config wifi-device 'wl0'
|
||||
option type 'broadcom'
|
||||
option country 'EU/13'
|
||||
option band 'a'
|
||||
option bandwidth '80'
|
||||
option hwmode '11ac'
|
||||
option channel 'auto'
|
||||
option scantimer '15'
|
||||
option wmm '1'
|
||||
option wmm_noack '0'
|
||||
option wmm_apsd '0'
|
||||
option txpower '100'
|
||||
option rateset 'default'
|
||||
option frag '2346'
|
||||
option rts '2347'
|
||||
option dtim_period '1'
|
||||
option beacon_int '100'
|
||||
option rxchainps '0'
|
||||
option rxchainps_qt '10'
|
||||
option rxchainps_pps '10'
|
||||
option rifs '0'
|
||||
option rifs_advert '0'
|
||||
option maxassoc '32'
|
||||
option beamforming '1'
|
||||
option doth '1'
|
||||
option dfsc '1'
|
||||
|
||||
config wifi-iface
|
||||
option device 'wl0'
|
||||
option network 'wan'
|
||||
option mode 'ap'
|
||||
option ssid 'Inteno-$BSSID4'
|
||||
option encryption 'psk2'
|
||||
option cipher 'auto'
|
||||
option key '$WPAKEY'
|
||||
option gtk_rekey '3600'
|
||||
option macfilter '0'
|
||||
option wps_pbc '1'
|
||||
option wmf_bss_enable '1'
|
||||
option bss_max '32'
|
||||
option ifname 'wl0'
|
||||
|
||||
config wifi-device 'wl1'
|
||||
option type 'broadcom'
|
||||
option country 'EU/13'
|
||||
option band 'b'
|
||||
option bandwidth '20'
|
||||
option hwmode 'auto'
|
||||
option channel 'auto'
|
||||
option scantimer '15'
|
||||
option wmm '1'
|
||||
option wmm_noack '0'
|
||||
option wmm_apsd '0'
|
||||
option txpower '100'
|
||||
option rateset 'default'
|
||||
option frag '2346'
|
||||
option rts '2347'
|
||||
option dtim_period '1'
|
||||
option beacon_int '100'
|
||||
option rxchainps '0'
|
||||
option rxchainps_qt '10'
|
||||
option rxchainps_pps '10'
|
||||
option rifs '0'
|
||||
option rifs_advert '0'
|
||||
option maxassoc '32'
|
||||
option doth '0'
|
||||
option apsta '1'
|
||||
|
||||
config wifi-iface
|
||||
option device 'wl1'
|
||||
option ifname 'wl1'
|
||||
option network 'wan'
|
||||
option mode 'wet'
|
||||
option ssid 'Inteno-$BSSID4'
|
||||
option encryption 'psk2'
|
||||
option cipher 'auto'
|
||||
option wps_pbc '0'
|
||||
option wmf_bss_enable '1'
|
||||
option autoconf '1'
|
||||
|
||||
config wifi-iface
|
||||
option device 'wl1'
|
||||
option network 'wan'
|
||||
option mode 'ap'
|
||||
option ssid 'Inteno-$BSSID4'
|
||||
option encryption 'psk2'
|
||||
option cipher 'auto'
|
||||
option key '$WPAKEY'
|
||||
option gtk_rekey '3600'
|
||||
option macfilter '0'
|
||||
option wps_pbc '1'
|
||||
option wmf_bss_enable '1'
|
||||
option bss_max '32'
|
||||
option ifname 'wl1'
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"description": [
|
||||
{ "en" : "Repeater 2.4▴▾2.4&5" },
|
||||
{ "sv" : "Repeater 2.4▴▾2.4&5" }
|
||||
],
|
||||
"explanation": [
|
||||
{ "en" : "Your router is going to act as a wired extender or wireless repeater to the selected Wireless Access Point. Uplink 2.4G & Downlink 2.4G + 5G" },
|
||||
{ "sv" : "Routern kommer att fungera som en trådbunden extender eller trådlös repeater till den valda trådlösa åtkomstpunkten. Uplink 2.4G & Downlink 2.4G + 5G" }
|
||||
],
|
||||
"excluded_boards" : [
|
||||
"*G*",
|
||||
"F*"
|
||||
],
|
||||
"uplink_band" : 'b',
|
||||
"credentials" : 1,
|
||||
"reboot" : 0
|
||||
}
|
||||
@@ -13,10 +13,9 @@ config interface 'wan'
|
||||
option type 'bridge'
|
||||
option ifname 'eth0.2 eth0.1'
|
||||
option proto 'dhcp'
|
||||
option hostname 'iopsys-$MAC'
|
||||
option hostname 'Inteno-$BSSID4'
|
||||
option reqopts '66 67 128 224'
|
||||
option igmp_snooping '0'
|
||||
option macaddr '$MACWAN'
|
||||
|
||||
config device 'wan_dev'
|
||||
option name 'eth0.2'
|
||||
@@ -40,5 +39,5 @@ config switch_vlan
|
||||
config switch_vlan
|
||||
option device 'switch0'
|
||||
option vlan '2'
|
||||
option ports '0 6t'
|
||||
option ports '0 5t'
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
config wifi-status 'status'
|
||||
option wlan '1'
|
||||
option wps '1'
|
||||
option sched_status '0'
|
||||
option schedule '0'
|
||||
|
||||
config bandsteering 'bandsteering'
|
||||
option enabled '0'
|
||||
option policy '0'
|
||||
|
||||
config apsteering 'apsteering'
|
||||
option enabled '0'
|
||||
|
||||
config wifi-device ra0
|
||||
option band b
|
||||
option channel auto
|
||||
option bandwidth '20'
|
||||
option hwmode auto
|
||||
option htmode HT20
|
||||
option country 'DE'
|
||||
|
||||
config wifi-iface
|
||||
option device ra0
|
||||
option network wan
|
||||
option mode ap
|
||||
option ssid Inteno-$BSSID4
|
||||
option encryption psk2
|
||||
option key $WPAKEY
|
||||
option ifname ra0
|
||||
option wps_pbc 1
|
||||
|
||||
config wifi-device rai0
|
||||
option band a
|
||||
option channel auto
|
||||
option bandwidth '80'
|
||||
option hwmode 11ac
|
||||
option htmode VHT80
|
||||
option country 'DE'
|
||||
option beamforming 1
|
||||
|
||||
config wifi-iface
|
||||
option device rai0
|
||||
option network wan
|
||||
option mode ap
|
||||
option ssid Inteno-$BSSID4
|
||||
option encryption psk2
|
||||
option key $WPAKEY
|
||||
option ifname rai0
|
||||
option wps_pbc 1
|
||||
|
||||
config wifi-iface
|
||||
option device ra0
|
||||
option network wan
|
||||
option mode wet
|
||||
option ssid Inteno-$BSSID4
|
||||
option encryption psk2
|
||||
option key $WPAKEY
|
||||
option ifname apcli0
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
],
|
||||
"excluded_boards" : [
|
||||
"*G*",
|
||||
"F*",
|
||||
"NORRLAND"
|
||||
"F*"
|
||||
],
|
||||
"uplink_band" : 'a',
|
||||
"downlink_band" : 'a b',
|
||||
@@ -0,0 +1,43 @@
|
||||
config interface 'loopback'
|
||||
option ifname 'lo'
|
||||
option proto 'static'
|
||||
option ipaddr '127.0.0.1'
|
||||
option netmask '255.0.0.0'
|
||||
|
||||
config device 'lan_dev'
|
||||
option name 'eth0.1'
|
||||
option macaddr '$MACLAN'
|
||||
option vid 1
|
||||
|
||||
config interface 'wan'
|
||||
option type 'bridge'
|
||||
option ifname 'eth0.2 eth0.1'
|
||||
option proto 'dhcp'
|
||||
option hostname 'Inteno-$BSSID4'
|
||||
option reqopts '66 67 128 224'
|
||||
option igmp_snooping '0'
|
||||
|
||||
config device 'wan_dev'
|
||||
option name 'eth0.2'
|
||||
option macaddr '$MACWAN'
|
||||
option vid 2
|
||||
|
||||
config interface 'wan6'
|
||||
option ifname '@wan'
|
||||
option proto 'dhcpv6'
|
||||
|
||||
config switch
|
||||
option name 'switch0'
|
||||
option reset '1'
|
||||
option enable_vlan '1'
|
||||
|
||||
config switch_vlan
|
||||
option device 'switch0'
|
||||
option vlan '1'
|
||||
option ports '1 6t'
|
||||
|
||||
config switch_vlan
|
||||
option device 'switch0'
|
||||
option vlan '2'
|
||||
option ports '0 5t'
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
config wifi-status 'status'
|
||||
option wlan '1'
|
||||
option wps '1'
|
||||
option sched_status '0'
|
||||
option schedule '0'
|
||||
|
||||
@@ -7,6 +8,9 @@ config bandsteering 'bandsteering'
|
||||
option enabled '0'
|
||||
option policy '0'
|
||||
|
||||
config apsteering 'apsteering'
|
||||
option enabled '0'
|
||||
|
||||
config wifi-device ra0
|
||||
option band b
|
||||
option channel auto
|
||||
@@ -19,11 +23,11 @@ config wifi-iface
|
||||
option device ra0
|
||||
option network wan
|
||||
option mode ap
|
||||
option ssid iopsys-$BSSID4
|
||||
option ssid Inteno-$BSSID4
|
||||
option encryption psk2
|
||||
option key $WPAKEY
|
||||
option ifname ra0
|
||||
option wps 1
|
||||
option wps_pbc 1
|
||||
|
||||
config wifi-device rai0
|
||||
option band a
|
||||
@@ -38,17 +42,17 @@ config wifi-iface
|
||||
option device rai0
|
||||
option network wan
|
||||
option mode ap
|
||||
option ssid iopsys-$BSSID4
|
||||
option ssid Inteno-$BSSID4
|
||||
option encryption psk2
|
||||
option key $WPAKEY
|
||||
option ifname rai0
|
||||
option wps 1
|
||||
option wps_pbc 1
|
||||
|
||||
config wifi-iface
|
||||
option device rai0
|
||||
option network wan
|
||||
option mode wet
|
||||
option ssid iopsys-$BSSID4
|
||||
option ssid Inteno-$BSSID4
|
||||
option encryption psk2
|
||||
option key $WPAKEY
|
||||
option ifname apclii0
|
||||
@@ -9,8 +9,7 @@
|
||||
],
|
||||
"excluded_boards" : [
|
||||
"EX4*",
|
||||
"SDX810-AP",
|
||||
"NORRLAND"
|
||||
"SDX810-AP"
|
||||
],
|
||||
"credentials" : 0
|
||||
}
|
||||
@@ -18,8 +18,8 @@ config interface 'lan'
|
||||
config interface 'wan'
|
||||
option type 'anywan'
|
||||
option proto 'dhcp'
|
||||
option hostname 'iopsys-$MAC'
|
||||
option vendorid '$HARDWAREID'
|
||||
option vendorid '$HARDWAREID-INTENO'
|
||||
option hostname 'Inteno_$MAC4'
|
||||
option ifname 'ptm0.1 atm0.1 $WAN.1'
|
||||
option ipv6 '1'
|
||||
|
||||
95
inteno-netmodes/files/etc/netmodes/routed_brcm/wireless
Normal file
95
inteno-netmodes/files/etc/netmodes/routed_brcm/wireless
Normal file
@@ -0,0 +1,95 @@
|
||||
config wifi-status 'status'
|
||||
option wlan '1'
|
||||
option wps '1'
|
||||
option sched_status '0'
|
||||
option schedule '0'
|
||||
|
||||
config bandsteering 'bandsteering'
|
||||
option enabled '0'
|
||||
option policy '0'
|
||||
|
||||
config apsteering 'apsteering'
|
||||
option enabled '0'
|
||||
|
||||
config wifi-device 'wl0'
|
||||
option type 'broadcom'
|
||||
option country 'EU/13'
|
||||
option band 'a'
|
||||
option bandwidth '80'
|
||||
option hwmode 'auto'
|
||||
option channel 'auto'
|
||||
option scantimer '15'
|
||||
option wmm '1'
|
||||
option wmm_noack '0'
|
||||
option wmm_apsd '1'
|
||||
option txpower '100'
|
||||
option rateset 'default'
|
||||
option frag '2346'
|
||||
option rts '2347'
|
||||
option dtim_period '1'
|
||||
option beacon_int '100'
|
||||
option rxchainps '0'
|
||||
option rxchainps_qt '10'
|
||||
option rxchainps_pps '10'
|
||||
option rifs '0'
|
||||
option rifs_advert '0'
|
||||
option maxassoc '32'
|
||||
option beamforming '1'
|
||||
option doth '1'
|
||||
option dfsc '1'
|
||||
|
||||
config wifi-iface
|
||||
option device 'wl0'
|
||||
option network 'lan'
|
||||
option mode 'ap'
|
||||
option ssid 'Inteno-$BSSID4'
|
||||
option encryption 'psk2'
|
||||
option cipher 'auto'
|
||||
option key '$WPAKEY'
|
||||
option gtk_rekey '3600'
|
||||
option macfilter '0'
|
||||
option wps_pbc '1'
|
||||
option wmf_bss_enable '1'
|
||||
option bss_max '32'
|
||||
option ifname 'wl0'
|
||||
|
||||
config wifi-device 'wl1'
|
||||
option type 'broadcom'
|
||||
option country 'EU/13'
|
||||
option band 'b'
|
||||
option bandwidth '20'
|
||||
option hwmode 'auto'
|
||||
option channel 'auto'
|
||||
option scantimer '15'
|
||||
option wmm '1'
|
||||
option wmm_noack '0'
|
||||
option wmm_apsd '1'
|
||||
option txpower '100'
|
||||
option rateset 'default'
|
||||
option frag '2346'
|
||||
option rts '2347'
|
||||
option dtim_period '1'
|
||||
option beacon_int '100'
|
||||
option rxchainps '0'
|
||||
option rxchainps_qt '10'
|
||||
option rxchainps_pps '10'
|
||||
option rifs '0'
|
||||
option rifs_advert '0'
|
||||
option maxassoc '32'
|
||||
option doth '0'
|
||||
|
||||
config wifi-iface
|
||||
option device 'wl1'
|
||||
option network 'lan'
|
||||
option mode 'ap'
|
||||
option ssid 'Inteno-$BSSID4'
|
||||
option encryption 'mixed-psk'
|
||||
option cipher 'auto'
|
||||
option key '$WPAKEY'
|
||||
option gtk_rekey '3600'
|
||||
option macfilter '0'
|
||||
option wps_pbc '1'
|
||||
option wmf_bss_enable '1'
|
||||
option bss_max '32'
|
||||
option ifname 'wl1'
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
],
|
||||
"excluded_boards" : [
|
||||
"*G*",
|
||||
"F*",
|
||||
"NORRLAND"
|
||||
"F*"
|
||||
],
|
||||
"reboot" : 0,
|
||||
"credentials" : 0
|
||||
22
inteno-netmodes/files/etc/netmodes/routed_mtk/dhcp
Normal file
22
inteno-netmodes/files/etc/netmodes/routed_mtk/dhcp
Normal file
@@ -0,0 +1,22 @@
|
||||
config dnsmasq
|
||||
option domainneeded 1
|
||||
option boguspriv 1
|
||||
option filterwin2k 0
|
||||
option localise_queries 1
|
||||
option rebind_protection 0
|
||||
option rebind_localhost 1
|
||||
option local '/lan/'
|
||||
option domain 'lan'
|
||||
option expandhosts 1
|
||||
option nonegcache 0
|
||||
option authoritative 1
|
||||
option readethers 1
|
||||
option leasefile '/tmp/dhcp.leases'
|
||||
option resolvfile '/tmp/resolv.conf.auto'
|
||||
|
||||
config dhcp lan
|
||||
option interface lan
|
||||
option start 100
|
||||
option limit 150
|
||||
option leasetime 12h
|
||||
|
||||
@@ -21,8 +21,8 @@ config device 'lan_dev'
|
||||
config interface 'wan'
|
||||
option ifname 'eth0.2'
|
||||
option proto 'dhcp'
|
||||
option hostname 'iopsys-$MAC'
|
||||
option vendorid '$HARDWAREID'
|
||||
option hostname '$IOPHOSTNAME-$MAC'
|
||||
option vendorid '$HARDWAREID-INTENO'
|
||||
option reqopts '66 67 128 224'
|
||||
|
||||
config device 'wan_dev'
|
||||
@@ -47,5 +47,5 @@ config switch_vlan
|
||||
config switch_vlan
|
||||
option device 'switch0'
|
||||
option vlan '2'
|
||||
option ports '0 6t'
|
||||
option ports '0 5t'
|
||||
|
||||
10
inteno-netmodes/files/etc/netmodes/routed_mtk/omcproxy
Normal file
10
inteno-netmodes/files/etc/netmodes/routed_mtk/omcproxy
Normal file
@@ -0,0 +1,10 @@
|
||||
config proxy
|
||||
option scope global
|
||||
option uplink wan
|
||||
list downlink lan
|
||||
|
||||
config proxy
|
||||
option scope global
|
||||
option uplink wan6
|
||||
list downlink lan
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
config wifi-status 'status'
|
||||
option wlan '1'
|
||||
option wps '1'
|
||||
option sched_status '0'
|
||||
option schedule '0'
|
||||
|
||||
@@ -7,6 +8,9 @@ config bandsteering 'bandsteering'
|
||||
option enabled '0'
|
||||
option policy '0'
|
||||
|
||||
config apsteering 'apsteering'
|
||||
option enabled '0'
|
||||
|
||||
config wifi-device ra0
|
||||
option band b
|
||||
option channel auto
|
||||
@@ -14,16 +18,15 @@ config wifi-device ra0
|
||||
option hwmode auto
|
||||
option htmode HT20
|
||||
option country 'DE'
|
||||
option scantimer '60'
|
||||
|
||||
config wifi-iface
|
||||
option device ra0
|
||||
option network lan
|
||||
option mode ap
|
||||
option ssid iopsys-$BSSID4
|
||||
option ssid Inteno-$BSSID4
|
||||
option encryption psk2
|
||||
option key $WPAKEY
|
||||
option wps 1
|
||||
option wps_pbc 1
|
||||
option ifname ra0
|
||||
|
||||
config wifi-device rai0
|
||||
@@ -34,15 +37,14 @@ config wifi-device rai0
|
||||
option htmode VHT80
|
||||
option country 'DE'
|
||||
option beamforming 1
|
||||
option scantimer '60'
|
||||
|
||||
config wifi-iface
|
||||
option device rai0
|
||||
option network lan
|
||||
option mode ap
|
||||
option ssid iopsys-$BSSID4
|
||||
option ssid Inteno-$BSSID4
|
||||
option encryption psk2
|
||||
option key $WPAKEY
|
||||
option wps 1
|
||||
option wps_pbc 1
|
||||
option ifname rai0
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
NMTMPDIR=/var/netmodes
|
||||
OLD_MODE_FILE=/var/netmodes/old_mode
|
||||
CONF_BACKUP_DIR=/var/netmodes/backup/
|
||||
SWITCHMODELOCK="/tmp/switching_mode"
|
||||
MODEDIR=$(uci -q get netmode.setup.dir)
|
||||
MTK=0
|
||||
@@ -35,7 +34,7 @@ disable_firewall() {
|
||||
/etc/init.d/firewall reload
|
||||
}
|
||||
|
||||
is_known_macaddr()
|
||||
is_inteno_macaddr()
|
||||
{
|
||||
macaddr=$1
|
||||
|
||||
@@ -92,48 +91,22 @@ correct_uplink() {
|
||||
wetcfg="$(get_wifi_iface_cfgstr $WETIF)"
|
||||
wetnet="$(uci -q get $wetcfg.network)"
|
||||
wetmac="$(ifconfig $WETIF | grep HWaddr | awk '{print$NF}')"
|
||||
ethwanmac="$(ifconfig $WANDEV | grep HWaddr | awk '{print$NF}')"
|
||||
if [ -d /sys/class/net/br-$wetnet ]; then
|
||||
if [ "$link" == "up" ]; then
|
||||
ifconfig br-$wetnet hw ether $ethwanmac
|
||||
else
|
||||
ifconfig br-$wetnet hw ether $wetmac
|
||||
fi
|
||||
ifconfig br-$wetnet hw ether $wetmac
|
||||
#touch -f /tmp/netmodes/uplink-macaddr-corrected
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$link" == "up" ]; then
|
||||
ubus call network.device set_state "{\"name\":\"$WETIF\", \"defer\":true}"
|
||||
ifconfig $WETIF down
|
||||
echo ethernet > /tmp/netmodes/uplink_type
|
||||
ubus call network.device set_state "{\"name\":\"$WANDEV\", \"defer\":false}"
|
||||
else
|
||||
ubus call network.device set_state "{\"name\":\"$WETIF\", \"defer\":false}"
|
||||
ifconfig $WETIF up
|
||||
echo wireless > /tmp/netmodes/uplink_type
|
||||
ubus call network.device set_state "{\"name\":\"$WANDEV\", \"defer\":true}"
|
||||
ubus call led.internet set '{"state" : "notice"}'
|
||||
fi
|
||||
}
|
||||
|
||||
run_netmode_scripts() {
|
||||
local mode=$1
|
||||
local when=$2
|
||||
local script
|
||||
local path
|
||||
|
||||
path=$(readlink -f /etc/netmodes/$mode/)
|
||||
[ "${path:0:14}" == "/etc/netmodes/" ] || exit
|
||||
|
||||
if [ -d /etc/netmodes/$mode/scripts/$when ]; then
|
||||
logger -s -p user.info -t "netmode" "Executing $when netmode scripts" >/dev/console
|
||||
for script in $(ls /etc/netmodes/$mode/scripts/$when/); do
|
||||
sh /etc/netmodes/$mode/scripts/$when/$script
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
switch_netmode() {
|
||||
local newmode="$1"
|
||||
|
||||
@@ -182,31 +155,14 @@ switch_netmode() {
|
||||
echo $curmode >$OLD_MODE_FILE
|
||||
|
||||
[ -d "/etc/netmodes/$curmode" ] || return
|
||||
|
||||
run_netmode_scripts $curmode "pre"
|
||||
|
||||
# make backup of current config before switching
|
||||
rm -rf $CONF_BACKUP_DIR
|
||||
mkdir -p $CONF_BACKUP_DIR
|
||||
cp -af /etc/config/* $CONF_BACKUP_DIR
|
||||
|
||||
logger -s -p user.info -t "netmode" "Copying /etc/netmodes/$curmode in /etc/config" >/dev/console
|
||||
|
||||
for file in $(ls /etc/netmodes/$curmode/); do
|
||||
case "$file" in
|
||||
DETAILS|scripts) continue ;;
|
||||
esac
|
||||
cp /etc/netmodes/$curmode/$file /etc/config/
|
||||
done
|
||||
logger -s -p user.info -t $0 "[netmode] Copying /etc/netmodes/$curmode in /etc/config" >/dev/console
|
||||
cp /etc/netmodes/$curmode/* /etc/config/
|
||||
rm -f /etc/config/DETAILS
|
||||
sync
|
||||
|
||||
#commit owsd to reload all init.d scripts dependent on its config
|
||||
ubus call uci commit '{"config":"owsd"}'
|
||||
|
||||
local reboot=$(uci -q get netmode.$curmode.reboot)
|
||||
|
||||
if [ "$reboot" != "0" ]; then
|
||||
run_netmode_scripts $curmode "post"
|
||||
reboot &
|
||||
exit
|
||||
fi
|
||||
@@ -215,10 +171,10 @@ switch_netmode() {
|
||||
case "$curmode" in
|
||||
repeater*)
|
||||
touch $SWITCHMODELOCK
|
||||
logger -s -p user.info -t "netmode" "Switching to $curmode mode" > /dev/console
|
||||
logger -s -p user.info -t $0 "Switching to $curmode mode" > /dev/console
|
||||
ubus call leds set '{"state" : "allflash"}'
|
||||
[ -f /etc/init.d/omcproxy ] && /etc/init.d/omcproxy stop
|
||||
[ -f /etc/init.d/layer2 ] && /etc/init.d/layer2 reload
|
||||
[ -f /etc/init.d/macoffset ] && /etc/init.d/macoffset reload
|
||||
ubus call network reload
|
||||
wifi reload nodat
|
||||
ubus call router.network reload
|
||||
@@ -229,34 +185,9 @@ switch_netmode() {
|
||||
;;
|
||||
*)
|
||||
[ -f /etc/init.d/layer2 ] && /etc/init.d/layer2 reload
|
||||
[ -f /etc/init.d/macoffset ] && /etc/init.d/macoffset reload
|
||||
ubus call uci commit '{"config":"network"}'
|
||||
;;
|
||||
esac
|
||||
|
||||
run_netmode_scripts $curmode "post"
|
||||
}
|
||||
|
||||
revert_netmode() {
|
||||
local from="$1"
|
||||
local to="$2"
|
||||
local rready="$3"
|
||||
|
||||
ubus call leds set '{"state" : "allflash"}'
|
||||
logger -s -p user.info -t "netmode" "Could not switch to '$from' mode; going back to '$to' mode" > /dev/console
|
||||
uci -q set netmode.setup.curmode="$to"
|
||||
uci -q set netmode.setup.repeaterready="$rready"
|
||||
uci commit netmode
|
||||
cp -af $CONF_BACKUP_DIR/* /etc/config/
|
||||
sync
|
||||
rm -rf $CONF_BACKUP_DIR
|
||||
rm -rf $OLD_MODE_FILE
|
||||
|
||||
logger -s -p user.info -t "netmode" "Restarting network services" > /dev/console
|
||||
ubus call network reload
|
||||
wifi reload
|
||||
ubus call router.network reload
|
||||
ubus call leds set '{"state" : "normal"}'
|
||||
}
|
||||
|
||||
wificontrol_takes_over() {
|
||||
@@ -293,10 +224,10 @@ wait_for_netmode_handler() {
|
||||
|
||||
netmode_get_ip_type() {
|
||||
[ -n "$(echo $1 | grep -E '^(192\.168|10\.|172\.1[6789]\.|172\.2[0-9]\.|172\.3[01]\.)')" ] && {
|
||||
logger -t $0 "netmode_get_ip_type: ip $1 is private"
|
||||
logger -t "[netmode]" "netmode_get_ip_type: ip $1 is private"
|
||||
echo "private"
|
||||
} || {
|
||||
logger -t $0 "netmode_get_ip_type: ip $1 is public"
|
||||
logger -t "[netmode]" "netmode_get_ip_type: ip $1 is public"
|
||||
echo "public"
|
||||
}
|
||||
}
|
||||
@@ -384,7 +315,7 @@ populate_netmodes() {
|
||||
done
|
||||
|
||||
local hardware=$(db get hw.board.hardware)
|
||||
local keys lang desc exp exclude support
|
||||
local keys lang desc exp exclude
|
||||
for mode in $(ls $MODEDIR); do
|
||||
|
||||
case "$mode" in
|
||||
@@ -414,32 +345,12 @@ populate_netmodes() {
|
||||
done
|
||||
json_select ..
|
||||
[ $exclude -eq 1 ] && continue
|
||||
elif json_select supported_boards; then
|
||||
support=0
|
||||
_i=1
|
||||
while json_get_var board $_i; do
|
||||
case "$hardware" in
|
||||
$board)
|
||||
support=1
|
||||
break
|
||||
;;
|
||||
esac
|
||||
_i=$((_i+1))
|
||||
done
|
||||
json_select ..
|
||||
[ $support -eq 1 ] || {
|
||||
uci -q delete netmode.$mode
|
||||
continue
|
||||
}
|
||||
fi
|
||||
|
||||
if json_select acl; then
|
||||
_i=1
|
||||
while json_get_var user $_i; do
|
||||
uci del_list netmode.$mode._access_r="$user"
|
||||
uci del_list netmode.$mode._access_w="$user"
|
||||
uci add_list netmode.$mode._access_r="$user"
|
||||
uci add_list netmode.$mode._access_w="$user"
|
||||
_i=$((_i+1))
|
||||
done
|
||||
json_select ..
|
||||
@@ -488,19 +399,17 @@ populate_netmodes() {
|
||||
}
|
||||
|
||||
start_netmode_tools() {
|
||||
local curmode repeaterready wificontrol discover
|
||||
local curmode repeaterready
|
||||
|
||||
killall -9 wificontrol >/dev/null 2>&1
|
||||
killall -9 netmode-discover >/dev/null 2>&1
|
||||
|
||||
config_load netmode
|
||||
config_get_bool repeaterready setup repeaterready 0
|
||||
config_get_bool wificontrol tools wificontrol 1
|
||||
config_get_bool arp_discovery tools arp_discovery 1
|
||||
|
||||
[ $repeaterready -eq 1 ] && {
|
||||
[ $arp_discovery -eq 1 ] && /sbin/netmode-discover &
|
||||
[ $wificontrol -eq 1 ] && /sbin/wificontrol --repeater &
|
||||
/sbin/netmode-discover &
|
||||
/sbin/wificontrol --repeater &
|
||||
return
|
||||
}
|
||||
|
||||
@@ -508,8 +417,8 @@ start_netmode_tools() {
|
||||
|
||||
case "$curmode" in
|
||||
repeater*)
|
||||
[ $arp_discovery -eq 1 ] && /sbin/netmode-discover &
|
||||
[ $wificontrol -eq 1 ] && /sbin/wificontrol --repeater &
|
||||
/sbin/netmode-discover &
|
||||
/sbin/wificontrol --repeater &
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@@ -19,7 +19,7 @@ timed_check() {
|
||||
done
|
||||
}
|
||||
|
||||
is_known_macaddr()
|
||||
is_inteno_macaddr()
|
||||
{
|
||||
macaddr=$1
|
||||
|
||||
@@ -50,8 +50,8 @@ while true ; do
|
||||
json_get_var ipaddr ipaddr
|
||||
json_get_var network network "lan"
|
||||
|
||||
if is_known_macaddr $macaddr; then
|
||||
logger -s -p user.info -t $0 "netmode-client-detect: a new known device detected on '$network' network (MACAddr:$macaddr IPAddr:$ipaddr)" >/dev/console
|
||||
if is_inteno_macaddr $macaddr; then
|
||||
logger -s -p user.info -t $0 "netmode-client-detect: a new Inteno device detected on '$network' network (MACAddr:$macaddr IPAddr:$ipaddr)" >/dev/console
|
||||
ubus call repeater get_creds '{"network":"'$network'","file":"/tmp/wificontrol.txt"}'
|
||||
/sbin/wificontrol --router --destination $ipaddr
|
||||
fi
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user