mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
uodate
This commit is contained in:
parent
93b63db492
commit
6d25bb1ee3
58 changed files with 537 additions and 5957 deletions
|
@ -6,3 +6,4 @@ CONFIG_PACKAGE_kmod-ath9k=y
|
|||
CONFIG_PACKAGE_bcm27xx-eeprom=y
|
||||
CONFIG_PACKAGE_bcm27xx-userland=y
|
||||
CONFIG_KERNEL_ARM_MODULE_PLTS=y
|
||||
CONFIG_KERNEL_TCP_CONG_BBR=y
|
||||
|
|
|
@ -1,114 +0,0 @@
|
|||
#
|
||||
# Copyright (C) 2006-2010 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
curdir:=package
|
||||
|
||||
include $(INCLUDE_DIR)/feeds.mk
|
||||
include $(INCLUDE_DIR)/rootfs.mk
|
||||
|
||||
-include $(TMP_DIR)/.packagedeps
|
||||
package-y += kernel/linux
|
||||
$(curdir)/autoremove:=1
|
||||
$(curdir)/builddirs:=$(sort $(package-) $(package-y) $(package-m))
|
||||
$(curdir)/builddirs-default:=. $(sort $(package-y) $(package-m))
|
||||
$(curdir)/builddirs-prereq:=. $(sort $(prereq-y) $(prereq-m))
|
||||
ifdef CHECK_ALL
|
||||
$(curdir)/builddirs-check:=$($(curdir)/builddirs)
|
||||
$(curdir)/builddirs-download:=$($(curdir)/builddirs)
|
||||
endif
|
||||
ifneq ($(IGNORE_ERRORS),)
|
||||
package-y-filter := $(package-y)
|
||||
package-m-filter := $(filter-out $(package-y),$(package-m))
|
||||
package-n-filter := $(filter-out $(package-y) $(package-m),$(package-))
|
||||
package-ignore-errors := $(filter n m y,$(IGNORE_ERRORS))
|
||||
package-ignore-errors := $(if $(package-ignore-errors),$(package-ignore-errors),n m)
|
||||
package-ignore-subdirs := $(sort $(foreach m,$(package-ignore-errors),$(package-$(m)-filter)))
|
||||
$(curdir)/builddirs-ignore-download := $(package-ignore-subdirs)
|
||||
$(curdir)/builddirs-ignore-compile := $(package-ignore-subdirs)
|
||||
$(curdir)/builddirs-ignore-host-download := $(package-ignore-subdirs)
|
||||
$(curdir)/builddirs-ignore-host-compile := $(package-ignore-subdirs)
|
||||
endif
|
||||
|
||||
PACKAGE_INSTALL_FILES:= \
|
||||
$(foreach pkg,$(sort $(package-y)), \
|
||||
$(foreach variant, \
|
||||
$(if $(strip $(package/$(pkg)/variants)), \
|
||||
$(package/$(pkg)/variants), \
|
||||
$(if $(package/$(pkg)/default-variant), \
|
||||
$(package/$(pkg)/default-variant), \
|
||||
default \
|
||||
) \
|
||||
), \
|
||||
$(PKG_INFO_DIR)/$(lastword $(subst /,$(space),$(pkg))).$(variant).install \
|
||||
) \
|
||||
)
|
||||
|
||||
$(curdir)/cleanup: $(TMP_DIR)/.build
|
||||
rm -rf $(STAGING_DIR_ROOT)
|
||||
|
||||
$(curdir)/merge:
|
||||
rm -rf $(PACKAGE_DIR_ALL)
|
||||
mkdir -p $(PACKAGE_DIR_ALL)
|
||||
-$(foreach pdir,$(PACKAGE_SUBDIRS),$(if $(wildcard $(pdir)/*.ipk),ln -s $(pdir)/*.ipk $(PACKAGE_DIR_ALL);))
|
||||
|
||||
$(curdir)/merge-index: $(curdir)/merge
|
||||
(cd $(PACKAGE_DIR_ALL) && $(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages; )
|
||||
|
||||
ifndef SDK
|
||||
$(curdir)/compile: $(curdir)/system/opkg/host/compile
|
||||
endif
|
||||
|
||||
$(curdir)/install: $(TMP_DIR)/.build $(curdir)/merge $(if $(CONFIG_TARGET_PER_DEVICE_ROOTFS),$(curdir)/merge-index)
|
||||
- find $(STAGING_DIR_ROOT) -type d | $(XARGS) chmod 0755
|
||||
rm -rf $(TARGET_DIR) $(TARGET_DIR_ORIG)
|
||||
mkdir -p $(TARGET_DIR)/tmp
|
||||
$(file >$(TMP_DIR)/opkg_install_list,\
|
||||
$(call opkg_package_files,\
|
||||
$(foreach pkg,$(shell cat $(PACKAGE_INSTALL_FILES) 2>/dev/null),$(pkg)$(call GetABISuffix,$(pkg)))))
|
||||
$(call opkg,$(TARGET_DIR)) install $$(cat $(TMP_DIR)/opkg_install_list)
|
||||
@for file in $(PACKAGE_INSTALL_FILES); do \
|
||||
[ -s $$file.flags ] || continue; \
|
||||
for flag in `cat $$file.flags`; do \
|
||||
$(call opkg,$(TARGET_DIR)) flag $$flag `cat $$file`; \
|
||||
done; \
|
||||
done || true
|
||||
|
||||
$(CP) $(TARGET_DIR) $(TARGET_DIR_ORIG)
|
||||
|
||||
$(call prepare_rootfs,$(TARGET_DIR),$(TOPDIR)/files)
|
||||
|
||||
$(curdir)/index: FORCE
|
||||
@echo Generating package index...
|
||||
@for d in $(PACKAGE_SUBDIRS); do ( \
|
||||
mkdir -p $$d; \
|
||||
cd $$d || continue; \
|
||||
$(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages.manifest; \
|
||||
grep -vE '^(Maintainer|LicenseFiles|Source|SourceName|Require|SourceDateEpoch)' Packages.manifest > Packages; \
|
||||
case "$$(((64 + $$(stat -L -c%s Packages)) % 128))" in 110|111) \
|
||||
$(call ERROR_MESSAGE,WARNING: Applying padding in $$d/Packages to workaround usign SHA-512 bug!); \
|
||||
{ echo ""; echo ""; } >> Packages;; \
|
||||
esac; \
|
||||
gzip -9nc Packages > Packages.gz; \
|
||||
); done
|
||||
ifdef CONFIG_SIGNED_PACKAGES
|
||||
@echo Signing package index...
|
||||
@for d in $(PACKAGE_SUBDIRS); do ( \
|
||||
[ -d $$d ] && \
|
||||
cd $$d || continue; \
|
||||
$(STAGING_DIR_HOST)/bin/usign -S -m Packages -s $(BUILD_KEY); \
|
||||
); done
|
||||
endif
|
||||
|
||||
$(curdir)/flags-install:= -j1
|
||||
|
||||
$(eval $(call stampfile,$(curdir),package,prereq,.config))
|
||||
$(eval $(call stampfile,$(curdir),package,cleanup,$(TMP_DIR)/.build))
|
||||
$(eval $(call stampfile,$(curdir),package,compile,$(TMP_DIR)/.build))
|
||||
$(eval $(call stampfile,$(curdir),package,install,$(TMP_DIR)/.build))
|
||||
$(eval $(call stampfile,$(curdir),package,check,$(TMP_DIR)/.build))
|
||||
|
||||
$(eval $(call subdir,$(curdir)))
|
|
@ -1,397 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/system.sh
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
# initialize defaults
|
||||
export MTD_ARGS=""
|
||||
export MTD_CONFIG_ARGS=""
|
||||
export INTERACTIVE=0
|
||||
export VERBOSE=1
|
||||
export SAVE_CONFIG=1
|
||||
export SAVE_OVERLAY=0
|
||||
export SAVE_OVERLAY_PATH=
|
||||
export SAVE_PARTITIONS=1
|
||||
export SAVE_INSTALLED_PKGS=1
|
||||
export SKIP_UNCHANGED=0
|
||||
export CONF_IMAGE=
|
||||
export CONF_BACKUP_LIST=0
|
||||
export CONF_BACKUP=
|
||||
export CONF_RESTORE=
|
||||
export NEED_IMAGE=
|
||||
export HELP=0
|
||||
export FORCE=0
|
||||
export TEST=0
|
||||
export UMOUNT_ETCBACKUP_DIR=0
|
||||
|
||||
# parse options
|
||||
while [ -n "$1" ]; do
|
||||
case "$1" in
|
||||
-i) export INTERACTIVE=1;;
|
||||
-v) export VERBOSE="$(($VERBOSE + 1))";;
|
||||
-q) export VERBOSE="$(($VERBOSE - 1))";;
|
||||
-n) export SAVE_CONFIG=0;;
|
||||
-c) export SAVE_OVERLAY=1 SAVE_OVERLAY_PATH=/etc;;
|
||||
-o) export SAVE_OVERLAY=1 SAVE_OVERLAY_PATH=/;;
|
||||
-p) export SAVE_PARTITIONS=0;;
|
||||
-k) export SAVE_INSTALLED_PKGS=1;;
|
||||
-u) export SKIP_UNCHANGED=1;;
|
||||
-b|--create-backup) export CONF_BACKUP="$2" NEED_IMAGE=1; shift;;
|
||||
-r|--restore-backup) export CONF_RESTORE="$2" NEED_IMAGE=1; shift;;
|
||||
-l|--list-backup) export CONF_BACKUP_LIST=1;;
|
||||
-f) export CONF_IMAGE="$2"; shift;;
|
||||
-F|--force) export FORCE=1;;
|
||||
-T|--test) export TEST=1;;
|
||||
-h|--help) export HELP=1; break;;
|
||||
-*)
|
||||
echo "Invalid option: $1" >&2
|
||||
exit 1
|
||||
;;
|
||||
*) break;;
|
||||
esac
|
||||
shift;
|
||||
done
|
||||
|
||||
export CONFFILES=/tmp/sysupgrade.conffiles
|
||||
export CONF_TAR=/tmp/sysupgrade.tgz
|
||||
export ETCBACKUP_DIR=/etc/backup
|
||||
export INSTALLED_PACKAGES=${ETCBACKUP_DIR}/installed_packages.txt
|
||||
|
||||
IMAGE="$1"
|
||||
|
||||
[ -z "$IMAGE" -a -z "$NEED_IMAGE" -a $CONF_BACKUP_LIST -eq 0 -o $HELP -gt 0 ] && {
|
||||
cat <<EOF
|
||||
Usage: $0 [<upgrade-option>...] <image file or URL>
|
||||
$0 [-q] [-i] [-c] [-u] [-o] [-k] <backup-command> <file>
|
||||
|
||||
upgrade-option:
|
||||
-f <config> restore configuration from .tar.gz (file or url)
|
||||
-i interactive mode
|
||||
-c attempt to preserve all changed files in /etc/
|
||||
-o attempt to preserve all changed files in /, except those
|
||||
from packages but including changed confs.
|
||||
-u skip from backup files that are equal to those in /rom
|
||||
-n do not save configuration over reflash
|
||||
-p do not attempt to restore the partition table after flash.
|
||||
-k include in backup a list of current installed packages at
|
||||
$INSTALLED_PACKAGES
|
||||
-T | --test
|
||||
Verify image and config .tar.gz but do not actually flash.
|
||||
-F | --force
|
||||
Flash image even if image checks fail, this is dangerous!
|
||||
-q less verbose
|
||||
-v more verbose
|
||||
-h | --help display this help
|
||||
|
||||
backup-command:
|
||||
-b | --create-backup <file>
|
||||
create .tar.gz of files specified in sysupgrade.conf
|
||||
then exit. Does not flash an image. If file is '-',
|
||||
i.e. stdout, verbosity is set to 0 (i.e. quiet).
|
||||
-r | --restore-backup <file>
|
||||
restore a .tar.gz created with sysupgrade -b
|
||||
then exit. Does not flash an image. If file is '-',
|
||||
the archive is read from stdin.
|
||||
-l | --list-backup
|
||||
list the files that would be backed up when calling
|
||||
sysupgrade -b. Does not create a backup file.
|
||||
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
[ -n "$IMAGE" -a -n "$NEED_IMAGE" ] && {
|
||||
cat <<-EOF
|
||||
-b|--create-backup and -r|--restore-backup do not perform a firmware upgrade.
|
||||
Do not specify both -b|-r and a firmware image.
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
# prevent messages from clobbering the tarball when using stdout
|
||||
[ "$CONF_BACKUP" = "-" ] && export VERBOSE=0
|
||||
|
||||
missing_lines() {
|
||||
local file1 file2 line
|
||||
file1="$1"
|
||||
file2="$2"
|
||||
oIFS="$IFS"
|
||||
IFS=":"
|
||||
while read line; do
|
||||
set -- $line
|
||||
grep -q "^$1:" "$file2" || echo "$*"
|
||||
done < "$file1"
|
||||
IFS="$oIFS"
|
||||
}
|
||||
|
||||
list_conffiles() {
|
||||
awk '
|
||||
BEGIN { conffiles = 0 }
|
||||
/^Conffiles:/ { conffiles = 1; next }
|
||||
!/^ / { conffiles = 0; next }
|
||||
conffiles == 1 { print }
|
||||
' /usr/lib/opkg/status
|
||||
}
|
||||
|
||||
list_changed_conffiles() {
|
||||
# Cannot handle spaces in filenames - but opkg cannot either...
|
||||
list_conffiles | while read file csum; do
|
||||
[ -r "$file" ] || continue
|
||||
|
||||
echo "${csum} ${file}" | busybox sha256sum -sc - || echo "$file"
|
||||
done
|
||||
}
|
||||
|
||||
list_static_conffiles() {
|
||||
local filter=$1
|
||||
|
||||
find $(sed -ne '/^[[:space:]]*$/d; /^#/d; p' \
|
||||
/etc/sysupgrade.conf /lib/upgrade/keep.d/* 2>/dev/null) \
|
||||
\( -type f -o -type l \) $filter 2>/dev/null
|
||||
}
|
||||
|
||||
add_conffiles() {
|
||||
local file="$1"
|
||||
|
||||
( list_static_conffiles "$find_filter"; list_changed_conffiles ) |
|
||||
sort -u > "$file"
|
||||
return 0
|
||||
}
|
||||
|
||||
add_overlayfiles() {
|
||||
local file="$1"
|
||||
|
||||
local packagesfiles=$1.packagesfiles
|
||||
touch "$packagesfiles"
|
||||
|
||||
if [ "$SAVE_OVERLAY_PATH" = / ]; then
|
||||
local conffiles=$1.conffiles
|
||||
local keepfiles=$1.keepfiles
|
||||
|
||||
list_conffiles | cut -f2 -d ' ' | sort -u > "$conffiles"
|
||||
|
||||
# backup files from /etc/sysupgrade.conf and /lib/upgrade/keep.d, but
|
||||
# ignore those aready controlled by opkg conffiles
|
||||
list_static_conffiles | sort -u |
|
||||
grep -h -v -x -F -f $conffiles > "$keepfiles"
|
||||
|
||||
# backup conffiles, but only those changed if '-u'
|
||||
[ $SKIP_UNCHANGED = 1 ] &&
|
||||
list_changed_conffiles | sort -u > "$conffiles"
|
||||
|
||||
# do not backup files from packages, except those listed
|
||||
# in conffiles and keep.d
|
||||
{
|
||||
find /usr/lib/opkg/info -type f -name "*.list" -exec cat {} \;
|
||||
find /usr/lib/opkg/info -type f -name "*.control" -exec sed \
|
||||
-ne '/^Alternatives/{s/^Alternatives: //;s/, /\n/g;p}' {} \; |
|
||||
cut -f2 -d:
|
||||
} | grep -v -x -F -f $conffiles |
|
||||
grep -v -x -F -f $keepfiles | sort -u > "$packagesfiles"
|
||||
rm -f "$keepfiles" "$conffiles"
|
||||
fi
|
||||
|
||||
# busybox grep bug when file is empty
|
||||
[ -s "$packagesfiles" ] || echo > $packagesfiles
|
||||
|
||||
( cd /overlay/upper/; find .$SAVE_OVERLAY_PATH \( -type f -o -type l \) $find_filter | sed \
|
||||
-e 's,^\.,,' \
|
||||
-e '\,^/etc/board.json$,d' \
|
||||
-e '\,/[^/]*-opkg$,d' \
|
||||
-e '\,^/etc/urandom.seed$,d' \
|
||||
-e "\,^$INSTALLED_PACKAGES$,d" \
|
||||
-e '\,^/usr/lib/opkg/.*,d' \
|
||||
) | grep -v -x -F -f $packagesfiles > "$file"
|
||||
|
||||
rm -f "$packagesfiles"
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
if [ $SAVE_OVERLAY = 1 ]; then
|
||||
[ ! -d /overlay/upper/etc ] && {
|
||||
echo "Cannot find '/overlay/upper/etc', required for '-c'" >&2
|
||||
exit 1
|
||||
}
|
||||
sysupgrade_init_conffiles="add_overlayfiles"
|
||||
else
|
||||
sysupgrade_init_conffiles="add_conffiles"
|
||||
fi
|
||||
|
||||
find_filter=""
|
||||
if [ $SKIP_UNCHANGED = 1 ]; then
|
||||
[ ! -d /rom/ ] && {
|
||||
echo "'/rom/' is required by '-u'"
|
||||
exit 1
|
||||
}
|
||||
find_filter='( ( -exec test -e /rom/{} ; -exec cmp -s /{} /rom/{} ; ) -o -print )'
|
||||
fi
|
||||
|
||||
include /lib/upgrade
|
||||
|
||||
do_save_conffiles() {
|
||||
local conf_tar="$1"
|
||||
|
||||
[ "$(rootfs_type)" = "tmpfs" ] && {
|
||||
echo "Cannot save config while running from ramdisk." >&2
|
||||
ask_bool 0 "Abort" && exit
|
||||
rm -f "$conf_tar"
|
||||
return 0
|
||||
}
|
||||
run_hooks "$CONFFILES" $sysupgrade_init_conffiles
|
||||
ask_bool 0 "Edit config file list" && vi "$CONFFILES"
|
||||
|
||||
if [ "$SAVE_INSTALLED_PKGS" -eq 1 ]; then
|
||||
echo "${INSTALLED_PACKAGES}" >> "$CONFFILES"
|
||||
mkdir -p "$ETCBACKUP_DIR"
|
||||
# Avoid touching filesystem on each backup
|
||||
RAMFS="$(mktemp -d -t sysupgrade.XXXXXX)"
|
||||
mkdir -p "$RAMFS/upper" "$RAMFS/work"
|
||||
mount -t overlay overlay -o lowerdir=$ETCBACKUP_DIR,upperdir=$RAMFS/upper,workdir=$RAMFS/work $ETCBACKUP_DIR &&
|
||||
UMOUNT_ETCBACKUP_DIR=1 || {
|
||||
echo "Cannot mount '$ETCBACKUP_DIR' as tmpfs to avoid touching disk while saving the list of installed packages." >&2
|
||||
ask_bool 0 "Abort" && exit
|
||||
}
|
||||
|
||||
# Format: pkg-name<TAB>{rom,overlay,unkown}
|
||||
# rom is used for pkgs in /rom, even if updated later
|
||||
find /usr/lib/opkg/info -name "*.control" \( \
|
||||
\( -exec test -f /rom/{} \; -exec echo {} rom \; \) -o \
|
||||
\( -exec test -f /overlay/upper/{} \; -exec echo {} overlay \; \) -o \
|
||||
\( -exec echo {} unknown \; \) \
|
||||
\) | sed -e 's,.*/,,;s/\.control /\t/' > ${INSTALLED_PACKAGES}
|
||||
fi
|
||||
|
||||
v "Saving config files..."
|
||||
[ "$VERBOSE" -gt 1 ] && TAR_V="v" || TAR_V=""
|
||||
tar c${TAR_V}zf "$conf_tar" -T "$CONFFILES" 2>/dev/null
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "Failed to create the configuration backup."
|
||||
rm -f "$conf_tar"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ "$UMOUNT_ETCBACKUP_DIR" -eq 1 ] && {
|
||||
umount "$ETCBACKUP_DIR"
|
||||
rm -rf "$RAMFS"
|
||||
}
|
||||
rm -f "$CONFFILES"
|
||||
}
|
||||
|
||||
if [ $CONF_BACKUP_LIST -eq 1 ]; then
|
||||
run_hooks "$CONFFILES" $sysupgrade_init_conffiles
|
||||
[ "$SAVE_INSTALLED_PKGS" -eq 1 ] && echo ${INSTALLED_PACKAGES} >> "$CONFFILES"
|
||||
cat "$CONFFILES"
|
||||
rm -f "$CONFFILES"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -n "$CONF_BACKUP" ]; then
|
||||
do_save_conffiles "$CONF_BACKUP"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if [ -n "$CONF_RESTORE" ]; then
|
||||
if [ "$CONF_RESTORE" != "-" ] && [ ! -f "$CONF_RESTORE" ]; then
|
||||
echo "Backup archive '$CONF_RESTORE' not found." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ "$VERBOSE" -gt 1 ] && TAR_V="v" || TAR_V=""
|
||||
cp /etc/passwd /etc/group /etc/shadow /tmp
|
||||
tar -C / -x${TAR_V}zf "$CONF_RESTORE"
|
||||
missing_lines /tmp/passwd /etc/passwd >> /etc/passwd
|
||||
missing_lines /tmp/group /etc/group >> /etc/group
|
||||
missing_lines /tmp/shadow /etc/shadow >> /etc/shadow
|
||||
rm /tmp/passwd /tmp/group /tmp/shadow
|
||||
|
||||
exit $?
|
||||
fi
|
||||
|
||||
type platform_check_image >/dev/null 2>/dev/null || {
|
||||
echo "Firmware upgrade is not implemented for this platform." >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
case "$IMAGE" in
|
||||
http://*|\
|
||||
https://*)
|
||||
wget -O/tmp/sysupgrade.img "$IMAGE" || exit 1
|
||||
IMAGE=/tmp/sysupgrade.img
|
||||
;;
|
||||
esac
|
||||
|
||||
IMAGE="$(readlink -f "$IMAGE")"
|
||||
|
||||
case "$IMAGE" in
|
||||
'')
|
||||
echo "Image file not found." >&2
|
||||
exit 1
|
||||
;;
|
||||
/tmp/*) ;;
|
||||
*)
|
||||
v "Image not in /tmp, copying..."
|
||||
cp -f "$IMAGE" /tmp/sysupgrade.img
|
||||
IMAGE=/tmp/sysupgrade.img
|
||||
;;
|
||||
esac
|
||||
|
||||
json_load "$(/usr/libexec/validate_firmware_image "$IMAGE")" || {
|
||||
echo "Failed to check image"
|
||||
exit 1
|
||||
}
|
||||
json_get_var valid "valid"
|
||||
[ "$valid" -eq 0 ] && {
|
||||
if [ $FORCE -eq 1 ]; then
|
||||
echo "Image check failed but --force given - will update anyway!" >&2
|
||||
else
|
||||
echo "Image check failed." >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
if [ -n "$CONF_IMAGE" ]; then
|
||||
case "$(get_magic_word $CONF_IMAGE cat)" in
|
||||
# .gz files
|
||||
1f8b) ;;
|
||||
*)
|
||||
echo "Invalid config file. Please use only .tar.gz files" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
get_image "$CONF_IMAGE" "cat" > "$CONF_TAR"
|
||||
export SAVE_CONFIG=1
|
||||
elif ask_bool $SAVE_CONFIG "Keep config files over reflash"; then
|
||||
[ $TEST -eq 1 ] || do_save_conffiles "$CONF_TAR"
|
||||
export SAVE_CONFIG=1
|
||||
else
|
||||
[ $TEST -eq 1 ] || rm -f "$CONF_TAR"
|
||||
export SAVE_CONFIG=0
|
||||
fi
|
||||
|
||||
if [ $TEST -eq 1 ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
install_bin /sbin/upgraded
|
||||
v "Commencing upgrade. Closing all shell sessions."
|
||||
|
||||
COMMAND='/lib/upgrade/do_stage2'
|
||||
|
||||
if [ -n "$FAILSAFE" ]; then
|
||||
printf '%s\x00%s\x00%s' "$RAM_ROOT" "$IMAGE" "$COMMAND" >/tmp/sysupgrade
|
||||
lock -u /tmp/.failsafe
|
||||
else
|
||||
json_init
|
||||
json_add_string prefix "$RAM_ROOT"
|
||||
json_add_string path "$IMAGE"
|
||||
[ $FORCE -eq 1 ] && json_add_boolean force 1
|
||||
[ $SAVE_CONFIG -eq 1 ] && json_add_string backup "$CONF_TAR"
|
||||
json_add_string command "$COMMAND"
|
||||
json_add_object options
|
||||
json_add_int save_partitions "$SAVE_PARTITIONS"
|
||||
json_close_object
|
||||
|
||||
ubus call system sysupgrade "$(json_dump)"
|
||||
fi
|
|
@ -1,45 +0,0 @@
|
|||
#
|
||||
# Copyright (C) 2010-2015 OpenWrt.org
|
||||
# Copyright (C) 2018-2019 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
|
||||
# - Added gateway setting
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=6in4
|
||||
PKG_VERSION:=270
|
||||
PKG_RELEASE:=2
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/6in4
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
DEPENDS:=@IPV6 +kmod-sit +uclient-fetch
|
||||
TITLE:=IPv6-in-IPv4 configuration support
|
||||
MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/6in4/description
|
||||
Provides support for 6in4 tunnels in /etc/config/network.
|
||||
Refer to http://wiki.openwrt.org/doc/uci/network for
|
||||
configuration details.
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Package/6in4/install
|
||||
$(INSTALL_DIR) $(1)/lib/netifd/proto
|
||||
$(INSTALL_BIN) ./files/6in4.sh $(1)/lib/netifd/proto/6in4.sh
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,6in4))
|
|
@ -1,149 +0,0 @@
|
|||
#!/bin/sh
|
||||
# 6in4.sh - IPv6-in-IPv4 tunnel backend
|
||||
# Copyright (c) 2010-2015 OpenWrt.org
|
||||
|
||||
[ -n "$INCLUDE_ONLY" ] || {
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/network.sh
|
||||
. ../netifd-proto.sh
|
||||
init_proto "$@"
|
||||
}
|
||||
|
||||
proto_6in4_update() {
|
||||
sh -c '
|
||||
timeout=5
|
||||
|
||||
(while [ $((timeout--)) -gt 0 ]; do
|
||||
sleep 1
|
||||
kill -0 $$ || exit 0
|
||||
done; kill -9 $$) 2>/dev/null &
|
||||
|
||||
exec "$@"
|
||||
' "$1" "$@"
|
||||
}
|
||||
|
||||
proto_6in4_add_prefix() {
|
||||
append "$3" "$1"
|
||||
}
|
||||
|
||||
proto_6in4_setup() {
|
||||
local cfg="$1"
|
||||
local iface="$2"
|
||||
local link="6in4-$cfg"
|
||||
|
||||
local mtu ttl tos ipaddr peeraddr ip6addr ip6prefix ip6prefixes tunlink tunnelid username password updatekey gateway
|
||||
json_get_vars mtu ttl tos ipaddr peeraddr ip6addr tunlink tunnelid username password updatekey gateway
|
||||
json_for_each_item proto_6in4_add_prefix ip6prefix ip6prefixes
|
||||
|
||||
[ -z "$peeraddr" ] && {
|
||||
proto_notify_error "$cfg" "MISSING_ADDRESS"
|
||||
proto_block_restart "$cfg"
|
||||
return
|
||||
}
|
||||
|
||||
[ -n "$tunlink" ] && ( proto_add_host_dependency "$cfg" "$peeraddr" "$tunlink" )
|
||||
|
||||
[ -z "$ipaddr" ] && {
|
||||
local wanif="$tunlink"
|
||||
if [ -z "$wanif" ] && ! network_find_wan wanif; then
|
||||
proto_notify_error "$cfg" "NO_WAN_LINK"
|
||||
return
|
||||
fi
|
||||
|
||||
if ! network_get_ipaddr ipaddr "$wanif"; then
|
||||
proto_notify_error "$cfg" "NO_WAN_LINK"
|
||||
return
|
||||
fi
|
||||
}
|
||||
|
||||
proto_init_update "$link" 1
|
||||
|
||||
[ -n "$ip6addr" ] && {
|
||||
local local6="${ip6addr%%/*}"
|
||||
local mask6="${ip6addr##*/}"
|
||||
[[ "$local6" = "$mask6" ]] && mask6=
|
||||
proto_add_ipv6_address "$local6" "$mask6"
|
||||
proto_add_ipv6_route "::" 0 "" "" "" "$local6/$mask6"
|
||||
}
|
||||
|
||||
[ -n "$gateway" ] && {
|
||||
proto_add_ipv6_route "::" 0 "$gateway"
|
||||
}
|
||||
|
||||
for ip6prefix in $ip6prefixes; do
|
||||
proto_add_ipv6_prefix "$ip6prefix"
|
||||
proto_add_ipv6_route "::" 0 "" "" "" "$ip6prefix"
|
||||
done
|
||||
|
||||
proto_add_tunnel
|
||||
json_add_string mode sit
|
||||
json_add_int mtu "${mtu:-1280}"
|
||||
json_add_int ttl "${ttl:-64}"
|
||||
[ -n "$tos" ] && json_add_string tos "$tos"
|
||||
json_add_string local "$ipaddr"
|
||||
json_add_string remote "$peeraddr"
|
||||
[ -n "$tunlink" ] && json_add_string link "$tunlink"
|
||||
proto_close_tunnel
|
||||
|
||||
proto_send_update "$cfg"
|
||||
|
||||
[ -n "$tunnelid" -a -n "$username" -a \( -n "$password" -o -n "$updatekey" \) ] && {
|
||||
[ -n "$updatekey" ] && password="$updatekey"
|
||||
|
||||
local http="http"
|
||||
local urlget="uclient-fetch"
|
||||
local urlget_opts="-qO-"
|
||||
local ca_path="${SSL_CERT_DIR:-/etc/ssl/certs}"
|
||||
|
||||
[ -f /lib/libustream-ssl.so ] && http=https
|
||||
[ "$http" = "https" -a -z "$(find $ca_path -name "*.0" 2>/dev/null)" ] && {
|
||||
urlget_opts="$urlget_opts --no-check-certificate"
|
||||
}
|
||||
|
||||
local url="$http://ipv4.tunnelbroker.net/nic/update?hostname=$tunnelid"
|
||||
local try=0
|
||||
local max=3
|
||||
|
||||
(
|
||||
set -o pipefail
|
||||
while [ $((++try)) -le $max ]; do
|
||||
if proto_6in4_update $urlget $urlget_opts --user="$username" --password="$password" "$url" 2>&1 | \
|
||||
sed -e 's,^Killed$,timeout,' -e "s,^,update $try/$max: ," | \
|
||||
logger -t "$link";
|
||||
then
|
||||
logger -t "$link" "updated"
|
||||
return 0
|
||||
fi
|
||||
sleep 5
|
||||
done
|
||||
logger -t "$link" "update failed"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
proto_6in4_teardown() {
|
||||
local cfg="$1"
|
||||
}
|
||||
|
||||
proto_6in4_init_config() {
|
||||
no_device=1
|
||||
available=1
|
||||
|
||||
proto_config_add_string "ipaddr"
|
||||
proto_config_add_string "ip6addr"
|
||||
proto_config_add_array "ip6prefix"
|
||||
proto_config_add_string "peeraddr"
|
||||
proto_config_add_string "tunlink"
|
||||
proto_config_add_string "tunnelid"
|
||||
proto_config_add_string "username"
|
||||
proto_config_add_string "password"
|
||||
proto_config_add_string "updatekey"
|
||||
proto_config_add_string "gateway"
|
||||
proto_config_add_int "mtu"
|
||||
proto_config_add_int "ttl"
|
||||
proto_config_add_string "tos"
|
||||
}
|
||||
|
||||
[ -n "$INCLUDE_ONLY" ] || {
|
||||
add_protocol 6in4
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -1,72 +0,0 @@
|
|||
#
|
||||
# Copyright (C) 2021 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:=nss-firmware
|
||||
PKG_SOURCE_DATE:=2021-09-13
|
||||
PKG_SOURCE_VERSION:=b06171cb0d14360c90a4b8f9f835dc1c4647ea07
|
||||
PKG_MIRROR_HASH:=b4638a25f1b4f63c91d57cad3d4b955fee7c796679cee55c557c2644db0f20e9
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/quic/qca-sdk-nss-fw.git
|
||||
|
||||
PKG_LICENSE_FILES:=LICENSE.md
|
||||
|
||||
PKG_MAINTAINER:=Robert Marko <robimarko@gmail.com>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
VERSION_PATH=$(PKG_BUILD_DIR)/QCA_Networking_2021.SPF_11.4/CS
|
||||
|
||||
define Package/nss-firmware-default
|
||||
SECTION:=firmware
|
||||
CATEGORY:=Firmware
|
||||
URL:=$(PKG_SOURCE_URL)
|
||||
DEPENDS:=@(TARGET_ipq807x||TARGET_ipq60xx)
|
||||
endef
|
||||
|
||||
define Package/nss-firmware-ipq6018
|
||||
$(Package/nss-firmware-default)
|
||||
TITLE:=NSS firmware for IPQ6018 devices
|
||||
NSS_ARCHIVE:=$(VERSION_PATH)/IPQ6018.ATH.11.4/BIN-NSS.CP.11.4.0.5-5-R.tar.bz2
|
||||
endef
|
||||
|
||||
define Package/nss-firmware-ipq8074
|
||||
$(Package/nss-firmware-default)
|
||||
TITLE:=NSS firmware for IPQ8074 devices
|
||||
NSS_ARCHIVE:=$(VERSION_PATH)/IPQ8074.ATH.11.4/BIN-NSS.HK.11.4.0.5-5-R.tar.bz2
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
|
||||
endef
|
||||
|
||||
define Package/nss-firmware-ipq6018/install
|
||||
mkdir -p $(PKG_BUILD_DIR)/IPQ6018
|
||||
$(TAR) -C $(PKG_BUILD_DIR)/IPQ6018 -xf $(NSS_ARCHIVE) --strip-components=1
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/IPQ6018/retail_router0.bin \
|
||||
$(1)/lib/firmware/qca-nss0-retail.bin
|
||||
endef
|
||||
|
||||
define Package/nss-firmware-ipq8074/install
|
||||
mkdir -p $(PKG_BUILD_DIR)/IPQ8074
|
||||
$(TAR) -C $(PKG_BUILD_DIR)/IPQ8074 -xf $(NSS_ARCHIVE) --strip-components=1
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/IPQ8074/retail_router0.bin \
|
||||
$(1)/lib/firmware/qca-nss0-retail.bin
|
||||
$(INSTALL_DATA) \
|
||||
$(PKG_BUILD_DIR)/IPQ8074/retail_router1.bin \
|
||||
$(1)/lib/firmware/qca-nss1-retail.bin
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,nss-firmware-ipq6018))
|
||||
$(eval $(call BuildPackage,nss-firmware-ipq8074))
|
|
@ -1,102 +0,0 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=qca-nss-clients
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_URL:=https://source.codeaurora.org/quic/cc-qrdk/oss/lklm/nss-clients
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2021-04-29
|
||||
PKG_SOURCE_VERSION:=b93c72c1b72c591c2ddc2f0b24f0e2b457720118
|
||||
PKG_MIRROR_HASH:=9fab23da994bfbac9a3cef32cdfec31a87a03ed415f36bc926da32b7b0934259
|
||||
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/qca-nss-drv-pppoe
|
||||
SECTION:=kernel
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Kernel driver for NSS (connection manager) - PPPoE
|
||||
DEPENDS:=@TARGET_ipq807x +kmod-qca-nss-drv +kmod-ppp +kmod-pppoe
|
||||
FILES:=$(PKG_BUILD_DIR)/pppoe/qca-nss-pppoe.ko
|
||||
AUTOLOAD:=$(call AutoLoad,51,qca-nss-pppoe)
|
||||
endef
|
||||
|
||||
define KernelPackage/qca-nss-drv-pppoe/Description
|
||||
Kernel modules for NSS connection manager - Support for PPPoE
|
||||
endef
|
||||
|
||||
define KernelPackage/qca-nss-drv-bridge-mgr
|
||||
SECTION:=kernel
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Kernel driver for NSS bridge manager
|
||||
DEPENDS:=@TARGET_ipq807x +kmod-qca-nss-drv +kmod-qca-nss-drv-vlan-mgr
|
||||
FILES:=$(PKG_BUILD_DIR)/bridge/qca-nss-bridge-mgr.ko
|
||||
AUTOLOAD:=$(call AutoLoad,51,qca-nss-bridge-mgr)
|
||||
endef
|
||||
|
||||
define KernelPackage/qca-nss-drv-bridge-mgr/Description
|
||||
Kernel modules for NSS bridge manager
|
||||
endef
|
||||
|
||||
define KernelPackage/qca-nss-drv-vlan-mgr
|
||||
SECTION:=kernel
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Kernel driver for NSS vlan manager
|
||||
DEPENDS:=@TARGET_ipq807x +kmod-qca-nss-drv
|
||||
FILES:=$(PKG_BUILD_DIR)/vlan/qca-nss-vlan.ko
|
||||
AUTOLOAD:=$(call AutoLoad,51,qca-nss-vlan)
|
||||
endef
|
||||
|
||||
define KernelPackage/qca-nss-drv-vlan-mgr/Description
|
||||
Kernel modules for NSS vlan manager
|
||||
endef
|
||||
|
||||
EXTRA_CFLAGS+= \
|
||||
-I$(STAGING_DIR)/usr/include/qca-nss-drv \
|
||||
-I$(STAGING_DIR)/usr/include/qca-nss-crypto \
|
||||
-I$(STAGING_DIR)/usr/include/qca-nss-cfi \
|
||||
-I$(STAGING_DIR)/usr/include/qca-nss-gmac \
|
||||
-I$(STAGING_DIR)/usr/include/qca-ssdk \
|
||||
-I$(STAGING_DIR)/usr/include/qca-ssdk/fal \
|
||||
-I$(STAGING_DIR)/usr/include/nat46
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-pppoe),)
|
||||
NSS_CLIENTS_MAKE_OPTS+=pppoe=y
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-bridge-mgr),)
|
||||
NSS_CLIENTS_MAKE_OPTS+=bridge-mgr=y
|
||||
#enable OVS bridge if ovsmgr is enabled
|
||||
ifneq ($(CONFIG_PACKAGE_kmod-qca-ovsmgr),)
|
||||
NSS_CLIENTS_MAKE_OPTS+= NSS_BRIDGE_MGR_OVS_ENABLE=y
|
||||
EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/qca-ovsmgr
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_kmod-qca-nss-drv-vlan-mgr),)
|
||||
NSS_CLIENTS_MAKE_OPTS+=vlan-mgr=y
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TARGET_BOARD), "ipq807x")
|
||||
SOC="ipq807x_64"
|
||||
else ifeq ($(CONFIG_TARGET_BOARD), "ipq60xx")
|
||||
SOC="ipq60xx_64"
|
||||
endif
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C "$(LINUX_DIR)" $(strip $(NSS_CLIENTS_MAKE_OPTS)) \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
ARCH="$(LINUX_KARCH)" \
|
||||
M="$(PKG_BUILD_DIR)" \
|
||||
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
|
||||
SoC=$(SOC) \
|
||||
$(KERNEL_MAKE_FLAGS) \
|
||||
modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,qca-nss-drv-pppoe))
|
||||
$(eval $(call KernelPackage,qca-nss-drv-bridge-mgr))
|
||||
$(eval $(call KernelPackage,qca-nss-drv-vlan-mgr))
|
|
@ -1,214 +0,0 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
#
|
||||
# Copyright (c) 2018-2019, 2021 The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Permission to use, copy, modify, and/or distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
NSS_IPSEC_LOG_FILE=/tmp/.nss_ipsec_log
|
||||
NSS_IPSEC_LOG_STR_ECM="ECM_Loaded"
|
||||
NSS_IPSEC_OL_FILE=/tmp/qca_nss_ipsec_ol
|
||||
|
||||
ecm_load () {
|
||||
if [ ! -d /sys/module/ecm ]; then
|
||||
/etc/init.d/qca-nss-ecm start
|
||||
if [ -d /sys/module/ecm ]; then
|
||||
echo ${NSS_IPSEC_LOG_STR_ECM} >> ${NSS_IPSEC_LOG_FILE}
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
ecm_unload () {
|
||||
if [ -f /tmp/.nss_ipsec_log ]; then
|
||||
str=`grep ${NSS_IPSEC_LOG_STR_ECM} ${NSS_IPSEC_LOG_FILE}`
|
||||
if [[ $str == ${NSS_IPSEC_LOG_STR_ECM} ]]; then
|
||||
/etc/init.d/qca-nss-ecm stop
|
||||
`sed 's/${NSS_IPSEC_LOG_STR_ECM}/ /g' $NSS_IPSEC_LOG_FILE > $NSS_IPSEC_LOG_FILE`
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
ecm_disable() {
|
||||
|
||||
if [ ! -d /sys/module/ecm ]; then
|
||||
return;
|
||||
fi
|
||||
|
||||
echo 1 > /sys/kernel/debug/ecm/front_end_ipv4_stop
|
||||
echo 1 > /sys/kernel/debug/ecm/front_end_ipv6_stop
|
||||
echo 1 > /sys/kernel/debug/ecm/ecm_db/defunct_all
|
||||
sleep 2
|
||||
}
|
||||
|
||||
ecm_enable() {
|
||||
if [ ! -d /sys/module/ecm ]; then
|
||||
return;
|
||||
fi
|
||||
|
||||
echo 0 > /sys/kernel/debug/ecm/ecm_db/defunct_all
|
||||
echo 0 > /sys/kernel/debug/ecm/front_end_ipv4_stop
|
||||
echo 0 > /sys/kernel/debug/ecm/front_end_ipv6_stop
|
||||
}
|
||||
|
||||
kernel_version_check_5_4() {
|
||||
major_ver=$(uname -r | awk -F '.' '{print $1}')
|
||||
minor_ver=$(uname -r | awk -F '.' '{print $2}')
|
||||
if [ $major_ver -lt 5 ] || ([ $major_ver -eq 5 ] && [ $minor_ver -lt 4 ] ) ; then
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
start_klips() {
|
||||
if kernel_version_check_5_4
|
||||
then
|
||||
echo "Kernel 5.4 doesn't support klips stack."
|
||||
return $?
|
||||
fi
|
||||
|
||||
touch $NSS_IPSEC_OL_FILE
|
||||
ecm_load
|
||||
|
||||
local kernel_version=$(uname -r)
|
||||
|
||||
insmod /lib/modules/${kernel_version}/qca-nss-ipsec-klips.ko
|
||||
if [ "$?" -gt 0 ]; then
|
||||
echo "Failed to load plugin. Please start ecm if not done already"
|
||||
ecm_enable
|
||||
rm $NSS_IPSEC_OL_FILE
|
||||
return
|
||||
fi
|
||||
|
||||
/etc/init.d/ipsec start
|
||||
sleep 2
|
||||
ipsec eroute
|
||||
|
||||
ecm_enable
|
||||
}
|
||||
|
||||
stop_klips() {
|
||||
if kernel_version_check_5_4
|
||||
then
|
||||
echo "Kernel 5.4 doesn't support klips stack."
|
||||
return $?
|
||||
fi
|
||||
|
||||
ecm_disable
|
||||
|
||||
/etc/init.d/ipsec stop
|
||||
rmmod qca-nss-ipsec-klips
|
||||
rm $NSS_IPSEC_OL_FILE
|
||||
|
||||
ecm_unload
|
||||
}
|
||||
|
||||
start_xfrm() {
|
||||
touch $NSS_IPSEC_OL_FILE
|
||||
ecm_load
|
||||
|
||||
local kernel_version=$(uname -r)
|
||||
|
||||
# load all NETKEY modules first.
|
||||
for mod in xfrm_ipcomp ipcomp xfrm6_tunnel ipcomp6 xfrm6_mode_tunnel xfrm6_mode_beet xfrm6_mode_ro \
|
||||
xfrm6_mode_transport xfrm4_mode_transport xfrm4_mode_tunnel \
|
||||
xfrm4_tunnel xfrm4_mode_beet esp4 esp6 ah4 ah6 af_key
|
||||
do
|
||||
insmod $mod 2> /dev/null
|
||||
done
|
||||
|
||||
# Now load the xfrm plugin
|
||||
insmod /lib/modules/${kernel_version}/qca-nss-ipsec-xfrm.ko
|
||||
if [ "$?" -gt 0 ]; then
|
||||
echo "Failed to load plugin. Please start ecm if not done already"
|
||||
ecm_enable
|
||||
rm $NSS_IPSEC_OL_FILE
|
||||
return
|
||||
fi
|
||||
|
||||
/etc/init.d/ipsec start
|
||||
sleep 2
|
||||
|
||||
ecm_enable
|
||||
}
|
||||
|
||||
stop_xfrm() {
|
||||
ecm_disable
|
||||
|
||||
#Shutdown Pluto first. Then only plugin can be removed.
|
||||
plutopid=/var/run/pluto/pluto.pid
|
||||
if [ -f $plutopid ]; then
|
||||
pid=`cat $plutopid`
|
||||
if [ ! -z "$pid" ]; then
|
||||
ipsec whack --shutdown | grep -v "002";
|
||||
if [ -s $plutopid ]; then
|
||||
echo "Attempt to shut Pluto down failed! Trying kill:"
|
||||
kill $pid;
|
||||
sleep 5;
|
||||
fi
|
||||
fi
|
||||
rm -rf $plutopid
|
||||
fi
|
||||
ip xfrm state flush;
|
||||
ip xfrm policy flush;
|
||||
sleep 2
|
||||
|
||||
#Now we can remove the plugin
|
||||
retries=5
|
||||
while [ -d /sys/module/qca_nss_ipsec_xfrm ]
|
||||
do
|
||||
rmmod qca-nss-ipsec-xfrm
|
||||
if [ "$?" -eq 0 ]; then
|
||||
rm $NSS_IPSEC_OL_FILE
|
||||
break
|
||||
fi
|
||||
|
||||
if [ ${retries} -eq 0 ]; then
|
||||
echo "Failed to unload qca-nss-ipsec-xfrm plugin!"
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "XFRM plugin unload failed; retrying ${retries} times"
|
||||
sleep 1
|
||||
retries=`expr ${retries} - 1`
|
||||
done
|
||||
|
||||
/etc/init.d/ipsec stop
|
||||
ecm_unload
|
||||
}
|
||||
|
||||
start() {
|
||||
local protostack=`uci -q get ipsec.setup.protostack`
|
||||
if [ "$protostack" = "klips" ]; then
|
||||
start_klips
|
||||
return $?
|
||||
fi
|
||||
|
||||
start_xfrm
|
||||
return $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
local protostack=`uci -q get ipsec.setup.protostack`
|
||||
if [ "$protostack" = "klips" ]; then
|
||||
stop_klips
|
||||
return $?
|
||||
fi
|
||||
|
||||
stop_xfrm
|
||||
return $?
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
|
||||
###########################################################################
|
||||
# Copyright (c) 2019, The Linux Foundation. All rights reserved.
|
||||
# Permission to use, copy, modify, and/or distribute this software for
|
||||
# any purpose with or without fee is hereby granted, provided that the
|
||||
# above copyright notice and this permission notice appear in all copies.
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
###########################################################################
|
||||
|
||||
restart() {
|
||||
rmmod act_nssmirred.ko
|
||||
insmod act_nssmirred.ko
|
||||
}
|
||||
|
||||
start() {
|
||||
insmod act_nssmirred.ko
|
||||
}
|
||||
|
||||
stop() {
|
||||
rmmod act_nssmirred.ko
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
|
||||
###########################################################################
|
||||
# Copyright (c) 2019, The Linux Foundation. All rights reserved.
|
||||
# Permission to use, copy, modify, and/or distribute this software for
|
||||
# any purpose with or without fee is hereby granted, provided that the
|
||||
# above copyright notice and this permission notice appear in all copies.
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
###########################################################################
|
||||
|
||||
ecm_disable() {
|
||||
if [ ! -d /sys/module/ecm ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
echo 1 > /sys/kernel/debug/ecm/front_end_ipv4_stop
|
||||
echo 1 > /sys/kernel/debug/ecm/front_end_ipv6_stop
|
||||
echo 1 > /sys/kernel/debug/ecm/ecm_db/defunct_all
|
||||
sleep 2
|
||||
}
|
||||
|
||||
ecm_enable() {
|
||||
if [ ! -d /sys/module/ecm ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
echo 0 > /sys/kernel/debug/ecm/ecm_db/defunct_all
|
||||
echo 0 > /sys/kernel/debug/ecm/front_end_ipv4_stop
|
||||
echo 0 > /sys/kernel/debug/ecm/front_end_ipv6_stop
|
||||
}
|
||||
|
||||
restart() {
|
||||
ecm_disable
|
||||
|
||||
/etc/init.d/openvpn stop
|
||||
rmmod qca-nss-ovpn-link
|
||||
rmmod qca-nss-ovpn-mgr
|
||||
|
||||
insmod qca-nss-ovpn-mgr
|
||||
insmod qca-nss-ovpn-link
|
||||
|
||||
if [ "$?" -gt 0 ]; then
|
||||
echo "Failed to load plugin. Please start ecm if not done already"
|
||||
ecm_enable
|
||||
return
|
||||
fi
|
||||
|
||||
ecm_enable
|
||||
}
|
||||
|
||||
start() {
|
||||
restart
|
||||
}
|
||||
|
||||
stop() {
|
||||
ecm_disable
|
||||
|
||||
/etc/init.d/openvpn stop
|
||||
rmmod qca-nss-ovpn-link
|
||||
rmmod qca-nss-ovpn-mgr
|
||||
|
||||
ecm_enable
|
||||
}
|
|
@ -1,62 +0,0 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=qca-nss-dp
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_URL:=https://source.codeaurora.org/quic/cc-qrdk/oss/lklm/nss-dp
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2021-03-26
|
||||
PKG_SOURCE_VERSION:=e0c89348d5ad99559ce2fbe15d37b3b5bc66aa03
|
||||
PKG_MIRROR_HASH:=f369f0c3b33b5f4ad6d0a6ad6ac5495f63c9ecaf94e4e7fa345169f3e44fcf45
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/qca-nss-dp
|
||||
SECTION:=kernel
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
DEPENDS:=@(TARGET_ipq807x||TARGET_ipq60xx) +kmod-qca-ssdk-nohnat
|
||||
TITLE:=Kernel driver for NSS data plane
|
||||
FILES:=$(PKG_BUILD_DIR)/qca-nss-dp.ko
|
||||
AUTOLOAD:=$(call AutoLoad,31,qca-nss-dp)
|
||||
endef
|
||||
|
||||
define KernelPackage/qca-nss-dp/Description
|
||||
This package contains a NSS data plane driver for QCA chipset
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
mkdir -p $(1)/usr/include/qca-nss-dp
|
||||
$(CP) $(PKG_BUILD_DIR)/exports/* $(1)/usr/include/qca-nss-dp/
|
||||
endef
|
||||
|
||||
EXTRA_CFLAGS+= \
|
||||
-I$(STAGING_DIR)/usr/include/qca-ssdk
|
||||
|
||||
NSS_DP_HAL_DIR:=$(PKG_BUILD_DIR)/hal
|
||||
define Build/Configure
|
||||
$(LN) $(NSS_DP_HAL_DIR)/arch/$(CONFIG_TARGET_BOARD)/nss_$(CONFIG_TARGET_BOARD).h \
|
||||
$(PKG_BUILD_DIR)/exports/nss_dp_arch.h
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_TARGET_BOARD), "ipq807x")
|
||||
SOC="ipq807x_64"
|
||||
else ifeq ($(CONFIG_TARGET_BOARD), "ipq60xx")
|
||||
SOC="ipq60xx_64"
|
||||
endif
|
||||
|
||||
define Build/Compile
|
||||
+$(MAKE) -C "$(LINUX_DIR)" \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
ARCH="$(LINUX_KARCH)" \
|
||||
M="$(PKG_BUILD_DIR)" \
|
||||
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" SoC="$(SOC)" \
|
||||
$(KERNEL_MAKE_FLAGS) \
|
||||
$(PKG_JOBS) \
|
||||
modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,qca-nss-dp))
|
|
@ -1,44 +0,0 @@
|
|||
From 40979666b4371012405715ffa61ab5760fcdc6b3 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <40979666b4371012405715ffa61ab5760fcdc6b3.1620066716.git.baruch@tkos.co.il>
|
||||
From: Baruch Siach <baruch@tkos.co.il>
|
||||
Date: Mon, 3 May 2021 20:07:36 +0300
|
||||
Subject: [PATCH 1/3] edma_tx_rx: support newer kernels time stamping API
|
||||
|
||||
---
|
||||
hal/edma/edma_tx_rx.c | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
--- a/hal/edma/edma_tx_rx.c
|
||||
+++ b/hal/edma/edma_tx_rx.c
|
||||
@@ -226,10 +226,16 @@ void nss_phy_tstamp_rx_buf(__attribute__
|
||||
* set to the correct PTP class value by calling ptp_classify_raw
|
||||
* in drv->rxtstamp function.
|
||||
*/
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0))
|
||||
if (ndev && ndev->phydev && ndev->phydev->drv &&
|
||||
ndev->phydev->drv->rxtstamp)
|
||||
if(ndev->phydev->drv->rxtstamp(ndev->phydev, skb, 0))
|
||||
return;
|
||||
+#else
|
||||
+ if (ndev && phy_has_rxtstamp(ndev->phydev))
|
||||
+ if (phy_rxtstamp(ndev->phydev, skb, 0))
|
||||
+ return;
|
||||
+#endif
|
||||
|
||||
netif_receive_skb(skb);
|
||||
}
|
||||
@@ -247,9 +253,14 @@ void nss_phy_tstamp_tx_buf(struct net_de
|
||||
* set to the correct PTP class value by calling ptp_classify_raw
|
||||
* in the drv->txtstamp function.
|
||||
*/
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0))
|
||||
if (ndev && ndev->phydev && ndev->phydev->drv &&
|
||||
ndev->phydev->drv->txtstamp)
|
||||
ndev->phydev->drv->txtstamp(ndev->phydev, skb, 0);
|
||||
+#else
|
||||
+ if (ndev && phy_has_txtstamp(ndev->phydev))
|
||||
+ phy_rxtstamp(ndev->phydev, skb, 0);
|
||||
+#endif
|
||||
}
|
||||
EXPORT_SYMBOL(nss_phy_tstamp_tx_buf);
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
From cef7873a2d77df13ee702d902ed4e06b2248904b Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <cef7873a2d77df13ee702d902ed4e06b2248904b.1620066716.git.baruch@tkos.co.il>
|
||||
In-Reply-To: <40979666b4371012405715ffa61ab5760fcdc6b3.1620066716.git.baruch@tkos.co.il>
|
||||
References: <40979666b4371012405715ffa61ab5760fcdc6b3.1620066716.git.baruch@tkos.co.il>
|
||||
From: Baruch Siach <baruch@tkos.co.il>
|
||||
Date: Mon, 3 May 2021 20:17:22 +0300
|
||||
Subject: [PATCH 2/3] nss_dp_main: make phy mode code compatible with newer
|
||||
kernels
|
||||
|
||||
---
|
||||
include/nss_dp_dev.h | 4 ++--
|
||||
nss_dp_main.c | 4 ++++
|
||||
2 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/include/nss_dp_dev.h
|
||||
+++ b/include/nss_dp_dev.h
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/if_vlan.h>
|
||||
-#include <linux/switch.h>
|
||||
+#include <linux/phy.h>
|
||||
|
||||
#include "nss_dp_api_if.h"
|
||||
#include "nss_dp_hal_if.h"
|
||||
@@ -46,7 +46,7 @@ struct nss_dp_dev {
|
||||
/* Phy related stuff */
|
||||
struct phy_device *phydev; /* Phy device */
|
||||
struct mii_bus *miibus; /* MII bus */
|
||||
- uint32_t phy_mii_type; /* RGMII/SGMII/QSGMII */
|
||||
+ phy_interface_t phy_mii_type; /* RGMII/SGMII/QSGMII */
|
||||
uint32_t phy_mdio_addr; /* Mdio address */
|
||||
bool link_poll; /* Link polling enable? */
|
||||
uint32_t forced_speed; /* Forced speed? */
|
||||
--- a/nss_dp_main.c
|
||||
+++ b/nss_dp_main.c
|
||||
@@ -463,7 +463,11 @@ static int32_t nss_dp_of_get_pdata(struc
|
||||
hal_pdata->netdev = netdev;
|
||||
hal_pdata->macid = dp_priv->macid;
|
||||
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0))
|
||||
dp_priv->phy_mii_type = of_get_phy_mode(np);
|
||||
+#else
|
||||
+ of_get_phy_mode(np, &dp_priv->phy_mii_type);
|
||||
+#endif
|
||||
dp_priv->link_poll = of_property_read_bool(np, "qcom,link-poll");
|
||||
if (of_property_read_u32(np, "qcom,phy-mdio-addr",
|
||||
&dp_priv->phy_mdio_addr) && dp_priv->link_poll) {
|
|
@ -1,48 +0,0 @@
|
|||
From c8c52512ff48bee578901c381a42f027e79eadf9 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <c8c52512ff48bee578901c381a42f027e79eadf9.1620066716.git.baruch@tkos.co.il>
|
||||
In-Reply-To: <40979666b4371012405715ffa61ab5760fcdc6b3.1620066716.git.baruch@tkos.co.il>
|
||||
References: <40979666b4371012405715ffa61ab5760fcdc6b3.1620066716.git.baruch@tkos.co.il>
|
||||
From: Baruch Siach <baruch@tkos.co.il>
|
||||
Date: Mon, 3 May 2021 20:20:29 +0300
|
||||
Subject: [PATCH 3/3] Drop _nocache variants of ioremap()
|
||||
|
||||
Recent kernels removed them.
|
||||
---
|
||||
hal/edma/edma_data_plane.c | 2 +-
|
||||
hal/gmac_hal_ops/qcom/qcom_if.c | 2 +-
|
||||
hal/gmac_hal_ops/syn/xgmac/syn_if.c | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/hal/edma/edma_data_plane.c
|
||||
+++ b/hal/edma/edma_data_plane.c
|
||||
@@ -797,7 +797,7 @@ int edma_init(void)
|
||||
/*
|
||||
* Remap register resource
|
||||
*/
|
||||
- edma_hw.reg_base = ioremap_nocache((edma_hw.reg_resource)->start,
|
||||
+ edma_hw.reg_base = ioremap((edma_hw.reg_resource)->start,
|
||||
resource_size(edma_hw.reg_resource));
|
||||
if (!edma_hw.reg_base) {
|
||||
pr_warn("Unable to remap EDMA register memory.\n");
|
||||
--- a/hal/gmac_hal_ops/qcom/qcom_if.c
|
||||
+++ b/hal/gmac_hal_ops/qcom/qcom_if.c
|
||||
@@ -400,7 +400,7 @@ static void *qcom_init(struct gmac_hal_p
|
||||
qhd->nghd.mac_id = gmacpdata->macid;
|
||||
|
||||
/* Populate the mac base addresses */
|
||||
- qhd->nghd.mac_base = devm_ioremap_nocache(&dp_priv->pdev->dev,
|
||||
+ qhd->nghd.mac_base = devm_ioremap(&dp_priv->pdev->dev,
|
||||
res->start, resource_size(res));
|
||||
if (!qhd->nghd.mac_base) {
|
||||
netdev_dbg(ndev, "ioremap fail.\n");
|
||||
--- a/hal/gmac_hal_ops/syn/xgmac/syn_if.c
|
||||
+++ b/hal/gmac_hal_ops/syn/xgmac/syn_if.c
|
||||
@@ -422,7 +422,7 @@ static void *syn_init(struct gmac_hal_pl
|
||||
|
||||
/* Populate the mac base addresses */
|
||||
shd->nghd.mac_base =
|
||||
- devm_ioremap_nocache(&dp_priv->pdev->dev, res->start,
|
||||
+ devm_ioremap(&dp_priv->pdev->dev, res->start,
|
||||
resource_size(res));
|
||||
if (!shd->nghd.mac_base) {
|
||||
netdev_dbg(ndev, "ioremap fail.\n");
|
|
@ -1,31 +0,0 @@
|
|||
From d74920e2a7c413ef40eed72f9cf287cf6fbd5fb8 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Thu, 20 May 2021 14:56:46 +0200
|
||||
Subject: [PATCH 1/2] EDMA: Fix NAPI packet counting
|
||||
|
||||
There is a bug in the NAPI packet counting that will
|
||||
cause NAPI over budget warnings.
|
||||
|
||||
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
hal/edma/edma_tx_rx.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/hal/edma/edma_tx_rx.c
|
||||
+++ b/hal/edma/edma_tx_rx.c
|
||||
@@ -458,12 +458,12 @@ int edma_napi(struct napi_struct *napi,
|
||||
|
||||
for (i = 0; i < ehw->txcmpl_rings; i++) {
|
||||
txcmpl_ring = &ehw->txcmpl_ring[i];
|
||||
- work_done += edma_clean_tx(ehw, txcmpl_ring);
|
||||
+ edma_clean_tx(ehw, txcmpl_ring);
|
||||
}
|
||||
|
||||
for (i = 0; i < ehw->rxfill_rings; i++) {
|
||||
rxfill_ring = &ehw->rxfill_ring[i];
|
||||
- work_done += edma_alloc_rx_buffer(ehw, rxfill_ring);
|
||||
+ edma_alloc_rx_buffer(ehw, rxfill_ring);
|
||||
}
|
||||
|
||||
/*
|
|
@ -1,41 +0,0 @@
|
|||
From 44a30d94abcbb10aacc21db29be212518a6b1bf7 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Thu, 20 May 2021 14:57:46 +0200
|
||||
Subject: [PATCH] EDMA: Use NAPI_POLL_WEIGHT as NAPI weight
|
||||
|
||||
Currently a weight of 100 is used by the EDMA, according
|
||||
to upstream max of 64 should be used and that is used for
|
||||
almost any driver.
|
||||
|
||||
They also introduced NAPI_POLL_WEIGHT define which equals
|
||||
to 64.
|
||||
|
||||
So use NAPI_POLL_WEIGHT as the weight.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
hal/edma/edma_data_plane.c | 2 +-
|
||||
hal/edma/edma_data_plane.h | 1 -
|
||||
2 files changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
--- a/hal/edma/edma_data_plane.c
|
||||
+++ b/hal/edma/edma_data_plane.c
|
||||
@@ -582,7 +582,7 @@ static int edma_register_netdevice(struc
|
||||
*/
|
||||
if (!edma_hw.napi_added) {
|
||||
netif_napi_add(netdev, &edma_hw.napi, edma_napi,
|
||||
- EDMA_NAPI_WORK);
|
||||
+ NAPI_POLL_WEIGHT);
|
||||
/*
|
||||
* Register the interrupt handlers and enable interrupts
|
||||
*/
|
||||
--- a/hal/edma/edma_data_plane.h
|
||||
+++ b/hal/edma/edma_data_plane.h
|
||||
@@ -27,7 +27,6 @@
|
||||
#define EDMA_RX_PREHDR_SIZE (sizeof(struct edma_rx_preheader))
|
||||
#define EDMA_TX_PREHDR_SIZE (sizeof(struct edma_tx_preheader))
|
||||
#define EDMA_RING_SIZE 128
|
||||
-#define EDMA_NAPI_WORK 100
|
||||
#define EDMA_START_GMACS NSS_DP_START_IFNUM
|
||||
#define EDMA_MAX_GMACS NSS_DP_HAL_MAX_PORTS
|
||||
#define EDMA_TX_PKT_MIN_SIZE 33 /* IPQ807x EDMA needs a minimum packet size of 33 bytes */
|
|
@ -1,51 +0,0 @@
|
|||
From cadeb62a42296563141d6954eec58e34ef86778d Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Fri, 13 Aug 2021 20:12:08 +0200
|
||||
Subject: [PATCH] NSS-DP: fix of_get_mac_address()
|
||||
|
||||
Recently OpenWrt backported the updated of_get_mac_address()
|
||||
function which returns and error code instead.
|
||||
|
||||
So, patch the SSDK to use it and fix the compilation error.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
nss_dp_main.c | 13 ++++---------
|
||||
1 file changed, 4 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/nss_dp_main.c b/nss_dp_main.c
|
||||
index 5580b13..28df280 100644
|
||||
--- a/nss_dp_main.c
|
||||
+++ b/nss_dp_main.c
|
||||
@@ -434,9 +434,10 @@ static int32_t nss_dp_of_get_pdata(struct device_node *np,
|
||||
struct net_device *netdev,
|
||||
struct gmac_hal_platform_data *hal_pdata)
|
||||
{
|
||||
- uint8_t *maddr;
|
||||
+ u8 maddr[ETH_ALEN];
|
||||
struct nss_dp_dev *dp_priv;
|
||||
struct resource memres_devtree = {0};
|
||||
+ int ret;
|
||||
|
||||
dp_priv = netdev_priv(netdev);
|
||||
|
||||
@@ -475,14 +476,8 @@ static int32_t nss_dp_of_get_pdata(struct device_node *np,
|
||||
of_property_read_u32(np, "qcom,forced-speed", &dp_priv->forced_speed);
|
||||
of_property_read_u32(np, "qcom,forced-duplex", &dp_priv->forced_duplex);
|
||||
|
||||
- maddr = (uint8_t *)of_get_mac_address(np);
|
||||
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(5, 4, 0))
|
||||
- if (IS_ERR((void *)maddr)) {
|
||||
- maddr = NULL;
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
- if (maddr && is_valid_ether_addr(maddr)) {
|
||||
+ ret = of_get_mac_address(np, maddr);
|
||||
+ if (!ret && is_valid_ether_addr(maddr)) {
|
||||
ether_addr_copy(netdev->dev_addr, maddr);
|
||||
} else {
|
||||
random_ether_addr(netdev->dev_addr);
|
||||
--
|
||||
2.31.1
|
||||
|
|
@ -1,119 +0,0 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=qca-nss-drv
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_URL:=https://source.codeaurora.org/quic/qsdk/oss/lklm/nss-drv
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2021-04-26
|
||||
PKG_SOURCE_VERSION:=1cf4bf81fd395f61648efeae78cdf1df60e954ff
|
||||
PKG_MIRROR_HASH:=86b7455565d28a72da981099c67a89ea9e0ae3874a34be30959dcf48f5e2196c
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
NSS_CLIENTS_DIR:=$(TOPDIR)/qca/src/qca-nss-clients
|
||||
|
||||
define KernelPackage/qca-nss-drv
|
||||
SECTION:=kernel
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
DEPENDS:=@(TARGET_ipq807x||TARGET_ipq60xx) +kmod-qca-nss-dp
|
||||
TITLE:=Kernel driver for NSS (core driver)
|
||||
FILES:=$(PKG_BUILD_DIR)/qca-nss-drv.ko
|
||||
AUTOLOAD:=$(call AutoLoad,32,qca-nss-drv)
|
||||
endef
|
||||
|
||||
define KernelPackage/qca-nss-drv/install
|
||||
$(INSTALL_DIR) $(1)/lib/debug
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/etc/sysctl.d
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/firmware
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
|
||||
$(INSTALL_BIN) ./files/qca-nss-drv.debug $(1)/lib/debug/qca-nss-drv
|
||||
$(INSTALL_BIN) ./files/qca-nss-drv.init $(1)/etc/init.d/qca-nss-drv
|
||||
$(INSTALL_BIN) ./files/qca-nss-drv.sysctl $(1)/etc/sysctl.d/qca-nss-drv.conf
|
||||
$(INSTALL_BIN) ./files/qca-nss-drv.hotplug $(1)/etc/hotplug.d/firmware/10-qca-nss-fw
|
||||
$(INSTALL_BIN) ./files/qca-nss-drv.conf $(1)/etc/config/nss
|
||||
|
||||
endef
|
||||
|
||||
define KernelPackage/qca-nss-drv/Description
|
||||
This package contains a NSS driver for QCA chipset
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
mkdir -p $(1)/usr/include/qca-nss-drv
|
||||
$(CP) $(PKG_BUILD_DIR)/exports/* $(1)/usr/include/qca-nss-drv/
|
||||
endef
|
||||
|
||||
EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/qca-nss-gmac -I$(STAGING_DIR)/usr/include/qca-nss-dp -I$(STAGING_DIR)/usr/include/qca-ssdk
|
||||
|
||||
ifneq (, $(findstring $(CONFIG_TARGET_BOARD), "ipq807x" "ipq60xx"))
|
||||
EXTRA_CFLAGS+= -DNSS_MEM_PROFILE_MEDIUM
|
||||
LOW_MEM_PROFILE_MAKE_OPTS=y
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_KERNEL_SKB_FIXED_SIZE_2K),y)
|
||||
EXTRA_CFLAGS+= -DNSS_SKB_FIXED_SIZE_2K
|
||||
endif
|
||||
|
||||
DRV_MAKE_OPTS:=
|
||||
ifeq ($(LOW_MEM_PROFILE_MAKE_OPTS),y)
|
||||
DRV_MAKE_OPTS+=NSS_DRV_C2C_ENABLE=n \
|
||||
NSS_DRV_CAPWAP_ENABLE=n \
|
||||
NSS_DRV_CLMAP_ENABLE=n \
|
||||
NSS_DRV_CRYPTO_ENABLE=n \
|
||||
NSS_DRV_DTLS_ENABLE=n \
|
||||
NSS_DRV_GRE_ENABLE=n \
|
||||
NSS_DRV_GRE_REDIR_ENABLE=n \
|
||||
NSS_DRV_GRE_TUNNEL_ENABLE=n \
|
||||
NSS_DRV_IGS_ENABLE=n \
|
||||
NSS_DRV_IPSEC_ENABLE=n \
|
||||
NSS_DRV_LAG_ENABLE=n \
|
||||
NSS_DRV_L2TP_ENABLE=n \
|
||||
NSS_DRV_MAPT_ENABLE=n \
|
||||
NSS_DRV_OAM_ENABLE=n \
|
||||
NSS_DRV_PPTP_ENABLE=n \
|
||||
NSS_DRV_PORTID_ENABLE=n \
|
||||
NSS_DRV_PVXLAN_ENABLE=n \
|
||||
NSS_DRV_QRFS_ENABLE=n \
|
||||
NSS_DRV_QVPN_ENABLE=n \
|
||||
NSS_DRV_RMNET_ENABLE=n \
|
||||
NSS_DRV_SHAPER_ENABLE=n \
|
||||
NSS_DRV_SJACK_ENABLE=n \
|
||||
NSS_DRV_TLS_ENABLE=n \
|
||||
NSS_DRV_TRUSTSEC_ENABLE=n \
|
||||
NSS_DRV_TSTAMP_ENABLE=n \
|
||||
NSS_DRV_TUN6RD_ENABLE=n \
|
||||
NSS_DRV_TUNIPIP6_ENABLE=n \
|
||||
NSS_DRV_VXLAN_ENABLE=n \
|
||||
NSS_DRV_MATCH_ENABLE=n \
|
||||
NSS_DRV_MIRROR_ENABLE=n
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TARGET_BOARD), "ipq807x")
|
||||
SOC="ipq807x_64"
|
||||
else ifeq ($(CONFIG_TARGET_BOARD), "ipq60xx")
|
||||
SOC="ipq60xx_64"
|
||||
endif
|
||||
|
||||
define Build/Configure
|
||||
$(LN) arch/nss_$(SOC).h $(PKG_BUILD_DIR)/exports/nss_arch.h
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
+$(MAKE) -C "$(LINUX_DIR)" $(strip $(DRV_MAKE_OPTS)) \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
ARCH="$(LINUX_KARCH)" \
|
||||
M="$(PKG_BUILD_DIR)" \
|
||||
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" SoC=$(SOC) \
|
||||
$(KERNEL_MAKE_FLAGS) \
|
||||
$(PKG_JOBS) \
|
||||
modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,qca-nss-drv))
|
|
@ -1,6 +0,0 @@
|
|||
config nss_firmware 'qca_nss_0'
|
||||
|
||||
config nss_firmware 'qca_nss_1'
|
||||
|
||||
config general
|
||||
option enable_rps '1'
|
|
@ -1,26 +0,0 @@
|
|||
#!/bin/sh /sbin/sysdebug
|
||||
#
|
||||
# Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Permission to use, copy, modify, and/or distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
|
||||
log cat /sys/kernel/debug/qca-nss-drv/stats/pppoe
|
||||
log cat /sys/kernel/debug/qca-nss-drv/stats/n2h
|
||||
log cat /sys/kernel/debug/qca-nss-drv/stats/ipv6
|
||||
log cat /sys/kernel/debug/qca-nss-drv/stats/ipv4
|
||||
log cat /sys/kernel/debug/qca-nss-drv/stats/gmac
|
||||
log cat /sys/kernel/debug/qca-nss-drv/stats/drv
|
||||
log cat /sys/kernel/debug/qca-nss-drv/stats/wifi
|
||||
log cat /sys/kernel/debug/qca-nss-drv/stats/wifi_if
|
||||
log cat /sys/kernel/debug/qca-nss-drv/stats/eth_rx
|
|
@ -1,70 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Permission to use, copy, modify, and/or distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
|
||||
KERNEL=`uname -r`
|
||||
case "${KERNEL}" in
|
||||
3.4*)
|
||||
select_or_load=load_nss_fw
|
||||
;;
|
||||
*)
|
||||
select_or_load=select_nss_fw
|
||||
;;
|
||||
esac
|
||||
|
||||
load_nss_fw () {
|
||||
ls -l $1 | awk ' { print $9,$5 } '> /dev/console
|
||||
echo 1 > /sys/class/firmware/$DEVICENAME/loading
|
||||
cat $1 > /sys/class/firmware/$DEVICENAME/data
|
||||
echo 0 > /sys/class/firmware/$DEVICENAME/loading
|
||||
}
|
||||
|
||||
select_nss_fw () {
|
||||
rm -f /lib/firmware/$DEVICENAME
|
||||
ln -s $1 /lib/firmware/$DEVICENAME
|
||||
ls -l /lib/firmware/$DEVICENAME | awk ' { print $9,$5 } '> /dev/console
|
||||
}
|
||||
|
||||
[ "$ACTION" != "add" ] && exit
|
||||
|
||||
# dev name for UCI, since it doesn't let you use . or -
|
||||
SDEVNAME=$(echo ${DEVICENAME} | sed s/[.-]/_/g)
|
||||
|
||||
SELECTED_FW=$(uci get nss.${SDEVNAME}.firmware 2>/dev/null)
|
||||
[ -e "${SELECTED_FW}" ] && {
|
||||
$select_or_load ${SELECTED_FW}
|
||||
exit
|
||||
}
|
||||
|
||||
case $DEVICENAME in
|
||||
qca-nss0* | qca-nss.0*)
|
||||
if [ -e /lib/firmware/qca-nss0-enterprise.bin ] ; then
|
||||
$select_or_load /lib/firmware/qca-nss0-enterprise.bin
|
||||
else
|
||||
$select_or_load /lib/firmware/qca-nss0-retail.bin
|
||||
fi
|
||||
exit
|
||||
;;
|
||||
qca-nss1* | qca-nss.1*)
|
||||
if [ -e /lib/firmware/qca-nss1-enterprise.bin ] ; then
|
||||
$select_or_load /lib/firmware/qca-nss1-enterprise.bin
|
||||
else
|
||||
$select_or_load /lib/firmware/qca-nss1-retail.bin
|
||||
fi
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
#
|
||||
# Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Permission to use, copy, modify, and/or distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
|
||||
START=70
|
||||
|
||||
enable_rps() {
|
||||
irq_nss_rps=`grep nss_queue1 /proc/interrupts | cut -d ':' -f 1 | tr -d ' '`
|
||||
for entry in $irq_nss_rps
|
||||
do
|
||||
echo 2 > /proc/irq/$entry/smp_affinity
|
||||
done
|
||||
|
||||
irq_nss_rps=`grep nss_queue2 /proc/interrupts | cut -d ':' -f 1 | tr -d ' '`
|
||||
for entry in $irq_nss_rps
|
||||
do
|
||||
echo 4 > /proc/irq/$entry/smp_affinity
|
||||
done
|
||||
|
||||
irq_nss_rps=`grep nss_queue3 /proc/interrupts | cut -d ':' -f 1 | tr -d ' '`
|
||||
for entry in $irq_nss_rps
|
||||
do
|
||||
echo 8 > /proc/irq/$entry/smp_affinity
|
||||
done
|
||||
|
||||
# Enable NSS RPS
|
||||
sysctl -w dev.nss.rps.enable=1 >/dev/null 2>/dev/null
|
||||
|
||||
}
|
||||
|
||||
|
||||
start() {
|
||||
local rps_enabled="$(uci_get nss @general[0] enable_rps)"
|
||||
if [ "$rps_enabled" -eq 1 ]; then
|
||||
enable_rps
|
||||
fi
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
# Default Number of connection configuration
|
||||
dev.nss.ipv4cfg.ipv4_conn=4096
|
||||
dev.nss.ipv6cfg.ipv6_conn=4096
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
From 3885c752e12f74cad6c97888b797e5903ad1930d Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Thu, 13 May 2021 23:22:38 +0200
|
||||
Subject: [PATCH] core: add 5.10 kernel to version check
|
||||
|
||||
NSS DRV has a kernel version check, so simply add
|
||||
5.10 as supported.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
nss_core.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/nss_core.c
|
||||
+++ b/nss_core.c
|
||||
@@ -52,7 +52,8 @@
|
||||
(((LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0)))) || \
|
||||
(((LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)))) || \
|
||||
(((LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)))) || \
|
||||
-(((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0))))))
|
||||
+(((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0)))) || \
|
||||
+(((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0))))))
|
||||
#error "Check skb recycle code in this file to match Linux version"
|
||||
#endif
|
||||
|
|
@ -1,164 +0,0 @@
|
|||
From b5e2a7167ca3df9fce34f0d7c05468d4f5597275 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Thu, 13 May 2021 23:33:18 +0200
|
||||
Subject: [PATCH] nss-drv: replace ioremap_nocache() with ioremap()
|
||||
|
||||
ioremap_nocache() does not exist anymore.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
nss_hal/ipq50xx/nss_hal_pvt.c | 6 +++---
|
||||
nss_hal/ipq60xx/nss_hal_pvt.c | 8 ++++----
|
||||
nss_hal/ipq806x/nss_hal_pvt.c | 4 ++--
|
||||
nss_hal/ipq807x/nss_hal_pvt.c | 6 +++---
|
||||
nss_hal/nss_hal.c | 4 ++--
|
||||
nss_meminfo.c | 2 +-
|
||||
nss_ppe.c | 2 +-
|
||||
7 files changed, 16 insertions(+), 16 deletions(-)
|
||||
|
||||
--- a/nss_hal/ipq50xx/nss_hal_pvt.c
|
||||
+++ b/nss_hal/ipq50xx/nss_hal_pvt.c
|
||||
@@ -184,13 +184,13 @@ static struct nss_platform_data *__nss_h
|
||||
npd->nphys = res_nphys.start;
|
||||
npd->qgic_phys = res_qgic_phys.start;
|
||||
|
||||
- npd->nmap = ioremap_nocache(npd->nphys, resource_size(&res_nphys));
|
||||
+ npd->nmap = ioremap(npd->nphys, resource_size(&res_nphys));
|
||||
if (!npd->nmap) {
|
||||
nss_info_always("%px: nss%d: ioremap() fail for nphys\n", nss_ctx, nss_ctx->id);
|
||||
goto out;
|
||||
}
|
||||
|
||||
- npd->qgic_map = ioremap_nocache(npd->qgic_phys, resource_size(&res_qgic_phys));
|
||||
+ npd->qgic_map = ioremap(npd->qgic_phys, resource_size(&res_qgic_phys));
|
||||
if (!npd->qgic_map) {
|
||||
nss_info_always("%px: nss%d: ioremap() fail for qgic map\n", nss_ctx, nss_ctx->id);
|
||||
goto out;
|
||||
@@ -348,7 +348,7 @@ static int __nss_hal_common_reset(struct
|
||||
|
||||
of_node_put(cmn);
|
||||
|
||||
- nss_misc_reset = ioremap_nocache(res_nss_misc_reset.start, resource_size(&res_nss_misc_reset));
|
||||
+ nss_misc_reset = ioremap(res_nss_misc_reset.start, resource_size(&res_nss_misc_reset));
|
||||
if (!nss_misc_reset) {
|
||||
pr_err("%px: ioremap fail for nss_misc_reset\n", nss_dev);
|
||||
return -EFAULT;
|
||||
--- a/nss_hal/ipq60xx/nss_hal_pvt.c
|
||||
+++ b/nss_hal/ipq60xx/nss_hal_pvt.c
|
||||
@@ -207,13 +207,13 @@ static struct nss_platform_data *__nss_h
|
||||
npd->nphys = res_nphys.start;
|
||||
npd->qgic_phys = res_qgic_phys.start;
|
||||
|
||||
- npd->nmap = ioremap_nocache(npd->nphys, resource_size(&res_nphys));
|
||||
+ npd->nmap = ioremap(npd->nphys, resource_size(&res_nphys));
|
||||
if (!npd->nmap) {
|
||||
nss_info_always("%px: nss%d: ioremap() fail for nphys\n", nss_ctx, nss_ctx->id);
|
||||
goto out;
|
||||
}
|
||||
|
||||
- npd->qgic_map = ioremap_nocache(npd->qgic_phys, resource_size(&res_qgic_phys));
|
||||
+ npd->qgic_map = ioremap(npd->qgic_phys, resource_size(&res_qgic_phys));
|
||||
if (!npd->qgic_map) {
|
||||
nss_info_always("%px: nss%d: ioremap() fail for qgic map\n", nss_ctx, nss_ctx->id);
|
||||
goto out;
|
||||
@@ -433,13 +433,13 @@ static int __nss_hal_common_reset(struct
|
||||
|
||||
of_node_put(cmn);
|
||||
|
||||
- nss_misc_reset = ioremap_nocache(res_nss_misc_reset.start, resource_size(&res_nss_misc_reset));
|
||||
+ nss_misc_reset = ioremap(res_nss_misc_reset.start, resource_size(&res_nss_misc_reset));
|
||||
if (!nss_misc_reset) {
|
||||
pr_err("%px: ioremap fail for nss_misc_reset\n", nss_dev);
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
- nss_misc_reset_flag = ioremap_nocache(res_nss_misc_reset_flag.start, resource_size(&res_nss_misc_reset_flag));
|
||||
+ nss_misc_reset_flag = ioremap(res_nss_misc_reset_flag.start, resource_size(&res_nss_misc_reset_flag));
|
||||
if (!nss_misc_reset_flag) {
|
||||
pr_err("%px: ioremap fail for nss_misc_reset_flag\n", nss_dev);
|
||||
return -EFAULT;
|
||||
--- a/nss_hal/ipq806x/nss_hal_pvt.c
|
||||
+++ b/nss_hal/ipq806x/nss_hal_pvt.c
|
||||
@@ -458,7 +458,7 @@ static struct nss_platform_data *__nss_h
|
||||
npd->nphys = res_nphys.start;
|
||||
npd->vphys = res_vphys.start;
|
||||
|
||||
- npd->nmap = ioremap_nocache(npd->nphys, resource_size(&res_nphys));
|
||||
+ npd->nmap = ioremap(npd->nphys, resource_size(&res_nphys));
|
||||
if (!npd->nmap) {
|
||||
nss_info_always("%px: nss%d: ioremap() fail for nphys\n", nss_ctx, nss_ctx->id);
|
||||
goto out;
|
||||
@@ -711,7 +711,7 @@ static int __nss_hal_common_reset(struct
|
||||
}
|
||||
of_node_put(cmn);
|
||||
|
||||
- fpb_base = ioremap_nocache(res_nss_fpb_base.start, resource_size(&res_nss_fpb_base));
|
||||
+ fpb_base = ioremap(res_nss_fpb_base.start, resource_size(&res_nss_fpb_base));
|
||||
if (!fpb_base) {
|
||||
pr_err("%px: ioremap fail for nss_fpb_base\n", nss_dev);
|
||||
return -EFAULT;
|
||||
--- a/nss_hal/ipq807x/nss_hal_pvt.c
|
||||
+++ b/nss_hal/ipq807x/nss_hal_pvt.c
|
||||
@@ -234,7 +234,7 @@ static struct nss_platform_data *__nss_h
|
||||
npd->vphys = res_vphys.start;
|
||||
npd->qgic_phys = res_qgic_phys.start;
|
||||
|
||||
- npd->nmap = ioremap_nocache(npd->nphys, resource_size(&res_nphys));
|
||||
+ npd->nmap = ioremap(npd->nphys, resource_size(&res_nphys));
|
||||
if (!npd->nmap) {
|
||||
nss_info_always("%px: nss%d: ioremap() fail for nphys\n", nss_ctx, nss_ctx->id);
|
||||
goto out;
|
||||
@@ -247,7 +247,7 @@ static struct nss_platform_data *__nss_h
|
||||
goto out;
|
||||
}
|
||||
|
||||
- npd->qgic_map = ioremap_nocache(npd->qgic_phys, resource_size(&res_qgic_phys));
|
||||
+ npd->qgic_map = ioremap(npd->qgic_phys, resource_size(&res_qgic_phys));
|
||||
if (!npd->qgic_map) {
|
||||
nss_info_always("%px: nss%d: ioremap() fail for qgic map\n", nss_ctx, nss_ctx->id);
|
||||
goto out;
|
||||
@@ -467,7 +467,7 @@ static int __nss_hal_common_reset(struct
|
||||
}
|
||||
of_node_put(cmn);
|
||||
|
||||
- nss_misc_reset = ioremap_nocache(res_nss_misc_reset.start, resource_size(&res_nss_misc_reset));
|
||||
+ nss_misc_reset = ioremap(res_nss_misc_reset.start, resource_size(&res_nss_misc_reset));
|
||||
if (!nss_misc_reset) {
|
||||
pr_err("%px: ioremap fail for nss_misc_reset\n", nss_dev);
|
||||
return -EFAULT;
|
||||
--- a/nss_hal/nss_hal.c
|
||||
+++ b/nss_hal/nss_hal.c
|
||||
@@ -78,9 +78,9 @@ int nss_hal_firmware_load(struct nss_ctx
|
||||
return rc;
|
||||
}
|
||||
|
||||
- load_mem = ioremap_nocache(npd->load_addr, nss_fw->size);
|
||||
+ load_mem = ioremap(npd->load_addr, nss_fw->size);
|
||||
if (!load_mem) {
|
||||
- nss_info_always("%px: ioremap_nocache failed: %x", nss_ctx, npd->load_addr);
|
||||
+ nss_info_always("%px: ioremap failed: %x", nss_ctx, npd->load_addr);
|
||||
release_firmware(nss_fw);
|
||||
return rc;
|
||||
}
|
||||
--- a/nss_meminfo.c
|
||||
+++ b/nss_meminfo.c
|
||||
@@ -728,7 +728,7 @@ bool nss_meminfo_init(struct nss_ctx_ins
|
||||
/*
|
||||
* meminfo_start is the label where the start address of meminfo map is stored.
|
||||
*/
|
||||
- meminfo_start = (uint32_t *)ioremap_nocache(nss_ctx->load + NSS_MEMINFO_MAP_START_OFFSET,
|
||||
+ meminfo_start = (uint32_t *)ioremap(nss_ctx->load + NSS_MEMINFO_MAP_START_OFFSET,
|
||||
NSS_MEMINFO_RESERVE_AREA_SIZE);
|
||||
if (!meminfo_start) {
|
||||
nss_info_always("%px: cannot remap meminfo start\n", nss_ctx);
|
||||
--- a/nss_ppe.c
|
||||
+++ b/nss_ppe.c
|
||||
@@ -357,7 +357,7 @@ void nss_ppe_init(void)
|
||||
/*
|
||||
* Get the PPE base address
|
||||
*/
|
||||
- ppe_pvt.ppe_base = ioremap_nocache(PPE_BASE_ADDR, PPE_REG_SIZE);
|
||||
+ ppe_pvt.ppe_base = ioremap(PPE_BASE_ADDR, PPE_REG_SIZE);
|
||||
if (!ppe_pvt.ppe_base) {
|
||||
nss_warning("DRV can't get PPE base address\n");
|
||||
return;
|
|
@ -1,49 +0,0 @@
|
|||
From 62e457f262aaa0db7113ad3ccbcb7ae49d4d7ea8 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Tue, 8 Jun 2021 23:24:43 +0200
|
||||
Subject: [PATCH] DMA: Fix NULL pointer exceptions
|
||||
|
||||
There are multiple instances that pass NULL instead
|
||||
of device to DMA functions.
|
||||
That is incorrect and will cause kernel NULL pointer
|
||||
exceptions.
|
||||
|
||||
So, simply pass the device structure pointers.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
nss_core.c | 2 +-
|
||||
nss_coredump.c | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/nss_core.c
|
||||
+++ b/nss_core.c
|
||||
@@ -1617,7 +1617,7 @@ static int32_t nss_core_handle_cause_que
|
||||
*
|
||||
*/
|
||||
if (unlikely((buffer_type == N2H_BUFFER_CRYPTO_RESP))) {
|
||||
- dma_unmap_single(NULL, (desc->buffer + desc->payload_offs), desc->payload_len, DMA_FROM_DEVICE);
|
||||
+ dma_unmap_single(nss_ctx->dev, (desc->buffer + desc->payload_offs), desc->payload_len, DMA_FROM_DEVICE);
|
||||
goto consume;
|
||||
}
|
||||
|
||||
--- a/nss_coredump.c
|
||||
+++ b/nss_coredump.c
|
||||
@@ -154,7 +154,7 @@ void nss_fw_coredump_notify(struct nss_c
|
||||
dma_addr = nss_own->meminfo_ctx.logbuffer_dma;
|
||||
}
|
||||
|
||||
- dma_sync_single_for_cpu(NULL, dma_addr, sizeof(struct nss_log_descriptor), DMA_FROM_DEVICE);
|
||||
+ dma_sync_single_for_cpu(nss_own->dev, dma_addr, sizeof(struct nss_log_descriptor), DMA_FROM_DEVICE);
|
||||
|
||||
/*
|
||||
* If the current entry is smaller than or equal to the number of NSS_LOG_COREDUMP_LINE_NUM,
|
||||
@@ -181,7 +181,7 @@ void nss_fw_coredump_notify(struct nss_c
|
||||
|
||||
offset = (index * sizeof(struct nss_log_entry))
|
||||
+ offsetof(struct nss_log_descriptor, log_ring_buffer);
|
||||
- dma_sync_single_for_cpu(NULL, dma_addr + offset,
|
||||
+ dma_sync_single_for_cpu(nss_own->dev, dma_addr + offset,
|
||||
sizeof(struct nss_log_entry), DMA_FROM_DEVICE);
|
||||
nss_info_always("%px: %s\n", nss_own, nle_print->message);
|
||||
nle_print++;
|
|
@ -1,97 +0,0 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=qca-nss-ecm
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_URL:=https://source.codeaurora.org/quic/cc-qrdk/oss/lklm/qca-nss-ecm
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2021-04-29
|
||||
PKG_SOURCE_VERSION:=c115aec34867b582e2e5ea79fc5315971e0e953c
|
||||
PKG_MIRROR_HASH:=a772996af7bbae7031eebc2f789431d29be67f11eb0a1e874c08b74eec6f4585
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/qca-nss-ecm
|
||||
SECTION:=kernel
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Support
|
||||
DEPENDS:=@(TARGET_ipq807x||TARGET_ipq60xx) \
|
||||
+kmod-qca-nss-drv \
|
||||
+iptables-mod-extra \
|
||||
+kmod-ipt-conntrack \
|
||||
+kmod-ipt-physdev \
|
||||
+iptables-mod-physdev \
|
||||
+kmod-ppp \
|
||||
+kmod-pppoe
|
||||
TITLE:=QCA NSS Enhanced Connection Manager (ECM)
|
||||
FILES:=$(PKG_BUILD_DIR)/*.ko
|
||||
KCONFIG:=CONFIG_BRIDGE_NETFILTER=y \
|
||||
CONFIG_NF_CONNTRACK_EVENTS=y \
|
||||
CONFIG_NF_CONNTRACK_CHAIN_EVENTS=n \
|
||||
CONFIG_NF_CONNTRACK_DSCPREMARK_EXT=n
|
||||
endef
|
||||
|
||||
define KernelPackage/qca-nss-ecm/Description
|
||||
This package contains the QCA NSS Enhanced Connection Manager
|
||||
endef
|
||||
|
||||
define KernelPackage/qca-nss-ecm/install
|
||||
$(INSTALL_DIR) $(1)/etc/firewall.d $(1)/etc/init.d $(1)/usr/bin $(1)/lib/netifd/offload $(1)/etc/config $(1)/etc/uci-defaults $(1)/etc/sysctl.d
|
||||
$(INSTALL_DATA) ./files/qca-nss-ecm.firewall $(1)/etc/firewall.d/qca-nss-ecm
|
||||
$(INSTALL_BIN) ./files/qca-nss-ecm.init $(1)/etc/init.d/qca-nss-ecm
|
||||
$(INSTALL_BIN) ./files/ecm_dump.sh $(1)/usr/bin/
|
||||
$(INSTALL_BIN) ./files/on-demand-down $(1)/lib/netifd/offload/on-demand-down
|
||||
$(INSTALL_DATA) ./files/qca-nss-ecm.uci $(1)/etc/config/ecm
|
||||
$(INSTALL_DATA) ./files/qca-nss-ecm.defaults $(1)/etc/uci-defaults/99-qca-nss-ecm
|
||||
$(INSTALL_BIN) ./files/qca-nss-ecm.sysctl $(1)/etc/sysctl.d/qca-nss-ecm.conf
|
||||
echo 'net.netfilter.nf_conntrack_max=8192' >> $(1)/etc/sysctl.d/qca-nss-ecm.conf
|
||||
endef
|
||||
|
||||
EXTRA_CFLAGS+=-I$(STAGING_DIR)/usr/include/qca-nss-drv
|
||||
|
||||
ifneq (, $(findstring $(CONFIG_TARGET_BOARD), "ipq807x" "ipq60xx"))
|
||||
ECM_MAKE_OPTS+= ECM_FRONT_END_NSS_ENABLE=y \
|
||||
ECM_CLASSIFIER_HYFI_ENABLE=n \
|
||||
ECM_MULTICAST_ENABLE=n \
|
||||
ECM_INTERFACE_IPSEC_ENABLE=n \
|
||||
ECM_INTERFACE_PPTP_ENABLE=n \
|
||||
ECM_INTERFACE_L2TPV2_ENABLE=n \
|
||||
ECM_INTERFACE_GRE_TAP_ENABLE=n \
|
||||
ECM_INTERFACE_GRE_TUN_ENABLE=n \
|
||||
ECM_INTERFACE_SIT_ENABLE=n \
|
||||
ECM_INTERFACE_TUNIPIP6_ENABLE=n \
|
||||
ECM_INTERFACE_RAWIP_ENABLE=n \
|
||||
ECM_INTERFACE_VLAN_ENABLE=n \
|
||||
ECM_CLASSIFIER_MARK_ENABLE=n \
|
||||
ECM_CLASSIFIER_DSCP_ENABLE=n \
|
||||
ECM_CLASSIFIER_PCC_ENABLE=n \
|
||||
ECM_BAND_STEERING_ENABLE=n \
|
||||
ECM_INTERFACE_PPPOE_ENABLE=y
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TARGET_BOARD), "ipq807x")
|
||||
SOC="ipq807x_64"
|
||||
else ifeq ($(CONFIG_TARGET_BOARD), "ipq60xx")
|
||||
SOC="ipq60xx_64"
|
||||
endif
|
||||
|
||||
define Build/InstallDev
|
||||
mkdir -p $(1)/usr/include/qca-nss-ecm
|
||||
$(CP) $(PKG_BUILD_DIR)/exports/* $(1)/usr/include/qca-nss-ecm
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
+$(MAKE) -C "$(LINUX_DIR)" $(strip $(ECM_MAKE_OPTS)) \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
ARCH="$(LINUX_KARCH)" \
|
||||
M="$(PKG_BUILD_DIR)" \
|
||||
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" SoC=$(SOC) \
|
||||
$(KERNEL_MAKE_FLAGS) \
|
||||
$(PKG_JOBS) \
|
||||
modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,qca-nss-ecm))
|
|
@ -1,95 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Permission to use, copy, modify, and/or distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
|
||||
ECM_MODULE=${1:-ecm_state}
|
||||
MOUNT_ROOT=/dev/ecm
|
||||
|
||||
#
|
||||
# usage: ecm_dump.sh [module=ecm_db]
|
||||
#
|
||||
# with no parameters, ecm_dump.sh will attempt to mount the
|
||||
# ecm_db state file and cat its contents.
|
||||
#
|
||||
# example with a parameter: ecm_dump.sh ecm_classifier_default
|
||||
#
|
||||
# this will cause ecm_dump to attempt to find and mount the state
|
||||
# file for the ecm_classifier_default module, and if successful
|
||||
# cat the contents.
|
||||
#
|
||||
|
||||
# this is one of the state files, which happens to be the
|
||||
# last module started in ecm
|
||||
ECM_STATE=/sys/kernel/debug/ecm/ecm_state/state_dev_major
|
||||
|
||||
# tests to see if ECM is up and ready to receive commands.
|
||||
# returns 0 if ECM is fully up and ready, else 1
|
||||
ecm_is_ready() {
|
||||
if [ ! -e "${ECM_STATE}" ]
|
||||
then
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
#
|
||||
# module_state_mount(module_name)
|
||||
# Mounts the state file of the module, if supported
|
||||
#
|
||||
module_state_mount() {
|
||||
local module_name=$1
|
||||
local mount_dir=$2
|
||||
local state_file="/sys/kernel/debug/ecm/${module_name}/state_dev_major"
|
||||
|
||||
if [ -e "${mount_dir}/${module_name}" ]
|
||||
then
|
||||
# already mounted
|
||||
return 0
|
||||
fi
|
||||
|
||||
#echo "Mount state file for $module_name ..."
|
||||
if [ ! -e "$state_file" ]
|
||||
then
|
||||
#echo "... $module_name does not support state"
|
||||
return 1
|
||||
fi
|
||||
|
||||
local major="`cat $state_file`"
|
||||
#echo "... Mounting state $state_file with major: $major"
|
||||
mknod "${mount_dir}/${module_name}" c $major 0
|
||||
}
|
||||
|
||||
#
|
||||
# main
|
||||
#
|
||||
ecm_is_ready || {
|
||||
#echo "ECM is not running"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# all state files are mounted under MOUNT_ROOT, so make sure it exists
|
||||
mkdir -p ${MOUNT_ROOT}
|
||||
|
||||
#
|
||||
# attempt to mount state files for the requested module and cat it
|
||||
# if the mount succeeded
|
||||
#
|
||||
module_state_mount ${ECM_MODULE} ${MOUNT_ROOT} && {
|
||||
cat ${MOUNT_ROOT}/${ECM_MODULE}
|
||||
exit 0
|
||||
}
|
||||
|
||||
exit 2
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Copyright (c) 2016 The Linux Foundation. All rights reserved.
|
||||
|
||||
[ -e "/sys/kernel/debug/ecm/ecm_db/defunct_all" ] && {
|
||||
echo 1 > /sys/kernel/debug/ecm/ecm_db/defunct_all
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Permission to use, copy, modify, and/or distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
|
||||
uci -q batch << EOF
|
||||
delete firewall.qcanssecm
|
||||
set firewall.qcanssecm=include
|
||||
set firewall.qcanssecm.type=script
|
||||
set firewall.qcanssecm.path=/etc/firewall.d/qca-nss-ecm
|
||||
set firewall.qcanssecm.family=any
|
||||
set firewall.qcanssecm.reload=1
|
||||
commit firewall
|
||||
EOF
|
||||
|
||||
exit 0
|
|
@ -1,18 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Permission to use, copy, modify, and/or distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
|
||||
iptables -A FORWARD -m physdev --physdev-is-bridged -j ACCEPT
|
|
@ -1,140 +0,0 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
#
|
||||
# Copyright (c) 2014, 2019-2020 The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Permission to use, copy, modify, and/or distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# The shebang above has an extra space intentially to avoid having
|
||||
# openwrt build scripts automatically enable this package starting
|
||||
# at boot.
|
||||
|
||||
START=19
|
||||
|
||||
get_front_end_mode() {
|
||||
config_load "ecm"
|
||||
config_get front_end global acceleration_engine "auto"
|
||||
|
||||
case $front_end in
|
||||
auto)
|
||||
echo '0'
|
||||
;;
|
||||
nss)
|
||||
echo '1'
|
||||
;;
|
||||
sfe)
|
||||
echo '2'
|
||||
;;
|
||||
*)
|
||||
echo 'uci_option_acceleration_engine is invalid'
|
||||
esac
|
||||
}
|
||||
|
||||
support_bridge() {
|
||||
#NSS support bridge acceleration
|
||||
[ -d /sys/kernel/debug/ecm/ecm_nss_ipv4 ] && return 0
|
||||
#SFE doesn't support bridge acceleration
|
||||
[ -d /sys/kernel/debug/ecm/ecm_sfe_ipv4 ] && return 1
|
||||
}
|
||||
|
||||
load_sfe() {
|
||||
local kernel_version=$(uname -r)
|
||||
|
||||
[ -e "/lib/modules/$kernel_version/shortcut-fe.ko" ] && {
|
||||
[ -d /sys/module/shortcut_fe ] || insmod shortcut-fe
|
||||
}
|
||||
|
||||
[ -e "/lib/modules/$kernel_version/shortcut-fe-ipv6.ko" ] && {
|
||||
[ -d /sys/module/shortcut_fe_ipv6 ] || insmod shortcut-fe-ipv6
|
||||
}
|
||||
|
||||
[ -e "/lib/modules/$kernel_version/shortcut-fe-drv.ko" ] && {
|
||||
[ -d /sys/module/shortcut_fe_drv ] || insmod shortcut-fe-drv
|
||||
}
|
||||
}
|
||||
|
||||
load_ecm() {
|
||||
[ -d /sys/module/ecm ] || {
|
||||
[ ! -e /proc/device-tree/MP_256 ] && load_sfe
|
||||
insmod ecm front_end_selection=$(get_front_end_mode)
|
||||
}
|
||||
|
||||
support_bridge && {
|
||||
sysctl -w net.bridge.bridge-nf-call-ip6tables=1
|
||||
sysctl -w net.bridge.bridge-nf-call-iptables=1
|
||||
}
|
||||
}
|
||||
|
||||
unload_ecm() {
|
||||
sysctl -w net.bridge.bridge-nf-call-ip6tables=0
|
||||
sysctl -w net.bridge.bridge-nf-call-iptables=0
|
||||
|
||||
if [ -d /sys/module/ecm ]; then
|
||||
#
|
||||
# Stop ECM frontends
|
||||
#
|
||||
echo 1 > /sys/kernel/debug/ecm/front_end_ipv4_stop
|
||||
echo 1 > /sys/kernel/debug/ecm/front_end_ipv6_stop
|
||||
|
||||
#
|
||||
# Defunct the connections
|
||||
#
|
||||
echo 1 > /sys/kernel/debug/ecm/ecm_db/defunct_all
|
||||
sleep 5;
|
||||
|
||||
rmmod ecm
|
||||
sleep 1
|
||||
fi
|
||||
}
|
||||
|
||||
start() {
|
||||
# If SFE CM is loaded, return.
|
||||
if [ -d /sys/module/shortcut_fe_cm ]; then
|
||||
echo "shortcut_fe CM is loaded, unload it first"
|
||||
echo "cmd: /etc/init.d/shortcut_fe stop"
|
||||
return
|
||||
fi
|
||||
|
||||
load_ecm
|
||||
|
||||
# If the acceleration engine is NSS, enable wifi redirect.
|
||||
[ -d /sys/kernel/debug/ecm/ecm_nss_ipv4 ] && sysctl -w dev.nss.general.redirect=1
|
||||
|
||||
support_bridge && {
|
||||
echo 'net.bridge.bridge-nf-call-ip6tables=1' >> /etc/sysctl.d/qca-nss-ecm.conf
|
||||
echo 'net.bridge.bridge-nf-call-iptables=1' >> /etc/sysctl.d/qca-nss-ecm.conf
|
||||
}
|
||||
|
||||
if [ -d /sys/module/qca_ovsmgr ]; then
|
||||
insmod ecm_ovs
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
stop() {
|
||||
# If ECM is already not loaded, just return.
|
||||
if [ ! -d /sys/module/ecm ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
# If the acceleration engine is NSS, disable wifi redirect.
|
||||
[ -d /sys/kernel/debug/ecm/ecm_nss_ipv4 ] && sysctl -w dev.nss.general.redirect=0
|
||||
|
||||
sed '/net.bridge.bridge-nf-call-ip6tables=1/d' -i /etc/sysctl.d/qca-nss-ecm.conf
|
||||
sed '/net.bridge.bridge-nf-call-iptables=1/d' -i /etc/sysctl.d/qca-nss-ecm.conf
|
||||
|
||||
if [ -d /sys/module/ecm_ovs ]; then
|
||||
rmmod ecm_ovs
|
||||
fi
|
||||
|
||||
unload_ecm
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
# nf_conntrack_tcp_no_window_check is 0 by default, set it to 1
|
||||
net.netfilter.nf_conntrack_tcp_no_window_check=1
|
|
@ -1,2 +0,0 @@
|
|||
config ecm 'global'
|
||||
option acceleration_engine 'auto'
|
|
@ -1,335 +0,0 @@
|
|||
From 73345c87b28a473b35b57e673f8de963c3d73da1 Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Wed, 19 May 2021 02:38:53 +0200
|
||||
Subject: [PATCH] treewide: componentize the module even more
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
---
|
||||
Makefile | 56 +++++++++++++++++++++++++-------
|
||||
ecm_db/ecm_db_connection.c | 8 +++++
|
||||
ecm_db/ecm_db_node.c | 4 +++
|
||||
ecm_interface.c | 8 +++++
|
||||
frontends/ecm_front_end_common.c | 7 ++++
|
||||
5 files changed, 72 insertions(+), 11 deletions(-)
|
||||
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -82,10 +82,18 @@ ccflags-$(ECM_INTERFACE_BOND_ENABLE) +=
|
||||
# Define ECM_INTERFACE_PPPOE_ENABLE=y in order
|
||||
# to enable support for PPPoE acceleration.
|
||||
# #############################################################################
|
||||
-ECM_INTERFACE_PPPOE_ENABLE=y
|
||||
+ifndef $(ECM_INTERFACE_PPPOE_ENABLE)
|
||||
+ ECM_INTERFACE_PPPOE_ENABLE=y
|
||||
+endif
|
||||
ccflags-$(ECM_INTERFACE_PPPOE_ENABLE) += -DECM_INTERFACE_PPPOE_ENABLE
|
||||
|
||||
# #############################################################################
|
||||
+# Define ECM_INTERFACE_L2TPV2_PPTP_ENABLE=y in order
|
||||
+# to enable support for l2tpv2 or PPTP detection.
|
||||
+# #############################################################################
|
||||
+ccflags-$(ECM_INTERFACE_L2TPV2_PPTP_ENABLE) += -DECM_INTERFACE_L2TPV2_PPTP_ENABLE
|
||||
+
|
||||
+# #############################################################################
|
||||
# Define ECM_INTERFACE_L2TPV2_ENABLE=y in order
|
||||
# to enable support for l2tpv2 acceleration.
|
||||
# #############################################################################
|
||||
@@ -118,6 +126,12 @@ ccflags-$(ECM_INTERFACE_PPP_ENABLE) += -
|
||||
ccflags-$(ECM_INTERFACE_MAP_T_ENABLE) += -DECM_INTERFACE_MAP_T_ENABLE
|
||||
|
||||
# #############################################################################
|
||||
+# Define ECM_INTERFACE_GRE_ENABLE=y in order
|
||||
+# to enable support for GRE detection.
|
||||
+# #############################################################################
|
||||
+ccflags-$(ECM_INTERFACE_GRE_ENABLE) += -DECM_INTERFACE_GRE_ENABLE
|
||||
+
|
||||
+# #############################################################################
|
||||
# Define ECM_INTERFACE_GRE_TAP_ENABLE=y in order
|
||||
# to enable support for GRE TAP interface.
|
||||
# #############################################################################
|
||||
@@ -186,7 +200,9 @@ ccflags-$(ECM_INTERFACE_OVS_BRIDGE_ENABL
|
||||
# #############################################################################
|
||||
# Define ECM_INTERFACE_VLAN_ENABLE=y in order to enable support for VLAN
|
||||
# #############################################################################
|
||||
-ECM_INTERFACE_VLAN_ENABLE=y
|
||||
+ifndef $(ECM_INTERFACE_VLAN_ENABLE)
|
||||
+ ECM_INTERFACE_VLAN_ENABLE=y
|
||||
+endif
|
||||
ccflags-$(ECM_INTERFACE_VLAN_ENABLE) += -DECM_INTERFACE_VLAN_ENABLE
|
||||
|
||||
# #############################################################################
|
||||
@@ -228,7 +244,9 @@ ccflags-$(ECM_CLASSIFIER_OVS_ENABLE) +=
|
||||
# #############################################################################
|
||||
# Define ECM_CLASSIFIER_MARK_ENABLE=y in order to enable mark classifier.
|
||||
# #############################################################################
|
||||
-ECM_CLASSIFIER_MARK_ENABLE=y
|
||||
+ifndef $(ECM_CLASSIFIER_MARK_ENABLE)
|
||||
+ ECM_CLASSIFIER_MARK_ENABLE=y
|
||||
+endif
|
||||
ecm-$(ECM_CLASSIFIER_MARK_ENABLE) += ecm_classifier_mark.o
|
||||
ccflags-$(ECM_CLASSIFIER_MARK_ENABLE) += -DECM_CLASSIFIER_MARK_ENABLE
|
||||
|
||||
@@ -247,7 +265,9 @@ ccflags-$(ECM_CLASSIFIER_NL_ENABLE) += -
|
||||
# #############################################################################
|
||||
# Define ECM_CLASSIFIER_DSCP_ENABLE=y in order to enable DSCP classifier.
|
||||
# #############################################################################
|
||||
-ECM_CLASSIFIER_DSCP_ENABLE=y
|
||||
+ifndef $(ECM_CLASSIFIER_DSCP_ENABLE)
|
||||
+ ECM_CLASSIFIER_DSCP_ENABLE=y
|
||||
+endif
|
||||
ecm-$(ECM_CLASSIFIER_DSCP_ENABLE) += ecm_classifier_dscp.o
|
||||
ccflags-$(ECM_CLASSIFIER_DSCP_ENABLE) += -DECM_CLASSIFIER_DSCP_ENABLE
|
||||
ccflags-$(ECM_CLASSIFIER_DSCP_IGS) += -DECM_CLASSIFIER_DSCP_IGS
|
||||
@@ -274,7 +294,9 @@ endif
|
||||
# the Parental Controls subsystem classifier in ECM. Currently disabled until
|
||||
# customers require it / if they need to integrate their Parental Controls with it.
|
||||
# #############################################################################
|
||||
-ECM_CLASSIFIER_PCC_ENABLE=y
|
||||
+ifndef $(ECM_CLASSIFIER_PCC_ENABLE)
|
||||
+ ECM_CLASSIFIER_PCC_ENABLE=y
|
||||
+endif
|
||||
ecm-$(ECM_CLASSIFIER_PCC_ENABLE) += ecm_classifier_pcc.o
|
||||
ccflags-$(ECM_CLASSIFIER_PCC_ENABLE) += -DECM_CLASSIFIER_PCC_ENABLE
|
||||
|
||||
@@ -301,28 +323,36 @@ ccflags-$(ECM_NON_PORTED_SUPPORT_ENABLE)
|
||||
# #############################################################################
|
||||
# Define ECM_STATE_OUTPUT_ENABLE=y to support XML state output
|
||||
# #############################################################################
|
||||
-ECM_STATE_OUTPUT_ENABLE=y
|
||||
+ifndef $(ECM_STATE_OUTPUT_ENABLE)
|
||||
+ ECM_STATE_OUTPUT_ENABLE=y
|
||||
+endif
|
||||
ecm-$(ECM_STATE_OUTPUT_ENABLE) += ecm_state.o
|
||||
ccflags-$(ECM_STATE_OUTPUT_ENABLE) += -DECM_STATE_OUTPUT_ENABLE
|
||||
|
||||
# #############################################################################
|
||||
# Define ECM_DB_ADVANCED_STATS_ENABLE to support XML state output
|
||||
# #############################################################################
|
||||
-ECM_DB_ADVANCED_STATS_ENABLE=y
|
||||
+ifndef $(ECM_DB_ADVANCED_STATS_ENABLE)
|
||||
+ ECM_DB_ADVANCED_STATS_ENABLE=y
|
||||
+endif
|
||||
ccflags-$(ECM_DB_ADVANCED_STATS_ENABLE) += -DECM_DB_ADVANCED_STATS_ENABLE
|
||||
|
||||
# #############################################################################
|
||||
# Define ECM_DB_CONNECTION_CROSS_REFERENCING_ENABLE=y in order to enable
|
||||
# the database to track relationships between objects.
|
||||
# #############################################################################
|
||||
-ECM_DB_CONNECTION_CROSS_REFERENCING_ENABLE=y
|
||||
+ifndef $(ECM_DB_CONNECTION_CROSS_REFERENCING_ENABLE)
|
||||
+ ECM_DB_CONNECTION_CROSS_REFERENCING_ENABLE=y
|
||||
+endif
|
||||
ccflags-$(ECM_DB_CONNECTION_CROSS_REFERENCING_ENABLE) += -DECM_DB_XREF_ENABLE
|
||||
|
||||
# #############################################################################
|
||||
# Define ECM_TRACKER_DPI_SUPPORT_ENABLE=y in order to enable support for
|
||||
# deep packet inspection and tracking of data with the trackers.
|
||||
# #############################################################################
|
||||
-ECM_TRACKER_DPI_SUPPORT_ENABLE=y
|
||||
+ifndef $(ECM_TRACKER_DPI_SUPPORT_ENABLE)
|
||||
+ ECM_TRACKER_DPI_SUPPORT_ENABLE=y
|
||||
+endif
|
||||
ccflags-$(ECM_TRACKER_DPI_SUPPORT_ENABLE) += -DECM_TRACKER_DPI_SUPPORT_ENABLE
|
||||
|
||||
# #############################################################################
|
||||
@@ -330,14 +360,18 @@ ccflags-$(ECM_TRACKER_DPI_SUPPORT_ENABLE
|
||||
# support for the database keeping lists of connections that are assigned
|
||||
# on a per TYPE of classifier basis.
|
||||
# #############################################################################
|
||||
-ECM_DB_CLASSIFIER_TYPE_ASSIGNMENTS_TRACK_ENABLE=y
|
||||
+ifndef $(ECM_DB_CLASSIFIER_TYPE_ASSIGNMENTS_TRACK_ENABLE)
|
||||
+ ECM_DB_CLASSIFIER_TYPE_ASSIGNMENTS_TRACK_ENABLE=y
|
||||
+endif
|
||||
ccflags-$(ECM_DB_CLASSIFIER_TYPE_ASSIGNMENTS_TRACK_ENABLE) += -DECM_DB_CTA_TRACK_ENABLE
|
||||
|
||||
# #############################################################################
|
||||
# Define ECM_BAND_STEERING_ENABLE=y in order to enable
|
||||
# band steering feature.
|
||||
# #############################################################################
|
||||
-ECM_BAND_STEERING_ENABLE=y
|
||||
+ifndef $(ECM_BAND_STEERING_ENABLE)
|
||||
+ ECM_BAND_STEERING_ENABLE=y
|
||||
+endif
|
||||
ccflags-$(ECM_BAND_STEERING_ENABLE) += -DECM_BAND_STEERING_ENABLE
|
||||
|
||||
# #############################################################################
|
||||
--- a/ecm_db/ecm_db_connection.c
|
||||
+++ b/ecm_db/ecm_db_connection.c
|
||||
@@ -430,7 +430,9 @@ EXPORT_SYMBOL(ecm_db_connection_make_def
|
||||
*/
|
||||
void ecm_db_connection_data_totals_update(struct ecm_db_connection_instance *ci, bool is_from, uint64_t size, uint64_t packets)
|
||||
{
|
||||
+#ifdef ECM_DB_ADVANCED_STATS_ENABLE
|
||||
int32_t i;
|
||||
+#endif
|
||||
|
||||
DEBUG_CHECK_MAGIC(ci, ECM_DB_CONNECTION_INSTANCE_MAGIC, "%px: magic failed\n", ci);
|
||||
|
||||
@@ -529,7 +531,9 @@ EXPORT_SYMBOL(ecm_db_connection_data_tot
|
||||
*/
|
||||
void ecm_db_connection_data_totals_update_dropped(struct ecm_db_connection_instance *ci, bool is_from, uint64_t size, uint64_t packets)
|
||||
{
|
||||
+#ifdef ECM_DB_ADVANCED_STATS_ENABLE
|
||||
int32_t i;
|
||||
+#endif
|
||||
|
||||
DEBUG_CHECK_MAGIC(ci, ECM_DB_CONNECTION_INSTANCE_MAGIC, "%px: magic failed\n", ci);
|
||||
|
||||
@@ -1508,6 +1512,7 @@ void ecm_db_connection_defunct_all(void)
|
||||
}
|
||||
EXPORT_SYMBOL(ecm_db_connection_defunct_all);
|
||||
|
||||
+#ifdef ECM_INTERFACE_OVS_BRIDGE_ENABLE
|
||||
/*
|
||||
* ecm_db_connection_defunct_by_classifier()
|
||||
* Make defunct based on masked fields
|
||||
@@ -1667,6 +1672,7 @@ next_ci:
|
||||
ECM_IP_ADDR_TO_OCTAL(dest_addr_mask), dest_port_mask, proto_mask, cnt);
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* ecm_db_connection_defunct_by_port()
|
||||
@@ -1956,6 +1962,7 @@ struct ecm_db_node_instance *ecm_db_conn
|
||||
}
|
||||
EXPORT_SYMBOL(ecm_db_connection_node_get_and_ref);
|
||||
|
||||
+#ifdef ECM_DB_XREF_ENABLE
|
||||
/*
|
||||
* ecm_db_connection_mapping_get_and_ref_next()
|
||||
* Return reference to next connection in the mapping chain in the specified direction.
|
||||
@@ -1997,6 +2004,7 @@ struct ecm_db_connection_instance *ecm_d
|
||||
return nci;
|
||||
}
|
||||
EXPORT_SYMBOL(ecm_db_connection_iface_get_and_ref_next);
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* ecm_db_connection_mapping_get_and_ref()
|
||||
--- a/ecm_db/ecm_db_node.c
|
||||
+++ b/ecm_db/ecm_db_node.c
|
||||
@@ -224,9 +224,11 @@ EXPORT_SYMBOL(ecm_db_node_get_and_ref_ne
|
||||
*/
|
||||
int ecm_db_node_deref(struct ecm_db_node_instance *ni)
|
||||
{
|
||||
+#ifdef ECM_DB_XREF_ENABLE
|
||||
#if (DEBUG_LEVEL >= 1)
|
||||
int dir;
|
||||
#endif
|
||||
+#endif
|
||||
DEBUG_CHECK_MAGIC(ni, ECM_DB_NODE_INSTANCE_MAGIC, "%px: magic failed\n", ni);
|
||||
|
||||
spin_lock_bh(&ecm_db_lock);
|
||||
@@ -486,9 +488,11 @@ EXPORT_SYMBOL(ecm_db_node_iface_get_and_
|
||||
void ecm_db_node_add(struct ecm_db_node_instance *ni, struct ecm_db_iface_instance *ii, uint8_t *address,
|
||||
ecm_db_node_final_callback_t final, void *arg)
|
||||
{
|
||||
+#ifdef ECM_DB_XREF_ENABLE
|
||||
#if (DEBUG_LEVEL >= 1)
|
||||
int dir;
|
||||
#endif
|
||||
+#endif
|
||||
ecm_db_node_hash_t hash_index;
|
||||
struct ecm_db_listener_instance *li;
|
||||
|
||||
--- a/ecm_interface.c
|
||||
+++ b/ecm_interface.c
|
||||
@@ -1343,6 +1343,7 @@ struct neighbour *ecm_interface_ipv6_nei
|
||||
*/
|
||||
bool ecm_interface_is_pptp(struct sk_buff *skb, const struct net_device *out)
|
||||
{
|
||||
+#ifdef ECM_INTERFACE_PPTP_ENABLE
|
||||
struct net_device *in;
|
||||
|
||||
/*
|
||||
@@ -1367,6 +1368,7 @@ bool ecm_interface_is_pptp(struct sk_buf
|
||||
}
|
||||
|
||||
dev_put(in);
|
||||
+#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1379,6 +1381,7 @@ bool ecm_interface_is_pptp(struct sk_buf
|
||||
*/
|
||||
bool ecm_interface_is_l2tp_packet_by_version(struct sk_buff *skb, const struct net_device *out, int ver)
|
||||
{
|
||||
+#ifdef ECM_INTERFACE_L2TPV2_PPTP_ENABLE
|
||||
uint32_t flag = 0;
|
||||
struct net_device *in;
|
||||
|
||||
@@ -1411,6 +1414,7 @@ bool ecm_interface_is_l2tp_packet_by_ver
|
||||
}
|
||||
|
||||
dev_put(in);
|
||||
+#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1423,6 +1427,7 @@ bool ecm_interface_is_l2tp_packet_by_ver
|
||||
*/
|
||||
bool ecm_interface_is_l2tp_pptp(struct sk_buff *skb, const struct net_device *out)
|
||||
{
|
||||
+#ifdef ECM_INTERFACE_L2TPV2_PPTP_ENABLE
|
||||
struct net_device *in;
|
||||
|
||||
/*
|
||||
@@ -1445,6 +1450,7 @@ bool ecm_interface_is_l2tp_pptp(struct s
|
||||
}
|
||||
|
||||
dev_put(in);
|
||||
+#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -6630,6 +6636,7 @@ static void ecm_interface_regenerate_con
|
||||
return;
|
||||
}
|
||||
|
||||
+#ifdef ECM_DB_XREF_ENABLE
|
||||
for (dir = 0; dir < ECM_DB_OBJ_DIR_MAX; dir++) {
|
||||
/*
|
||||
* Re-generate all connections associated with this interface
|
||||
@@ -6645,6 +6652,7 @@ static void ecm_interface_regenerate_con
|
||||
ci[dir] = cin;
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
#ifdef ECM_MULTICAST_ENABLE
|
||||
/*
|
||||
--- a/frontends/ecm_front_end_common.c
|
||||
+++ b/frontends/ecm_front_end_common.c
|
||||
@@ -106,6 +106,7 @@ bool ecm_front_end_gre_proto_is_accel_al
|
||||
struct nf_conntrack_tuple *tuple,
|
||||
int ip_version)
|
||||
{
|
||||
+#ifdef ECM_INTERFACE_GRE_ENABLE
|
||||
struct net_device *dev;
|
||||
struct gre_base_hdr *greh;
|
||||
|
||||
@@ -117,10 +118,12 @@ bool ecm_front_end_gre_proto_is_accel_al
|
||||
/*
|
||||
* Case 1: PPTP locally terminated
|
||||
*/
|
||||
+#ifdef ECM_INTERFACE_PPTP_ENABLE
|
||||
if (ecm_interface_is_pptp(skb, outdev)) {
|
||||
DEBUG_TRACE("%px: PPTP GRE locally terminated - allow acceleration\n", skb);
|
||||
return true;
|
||||
}
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* Case 2: PPTP pass through
|
||||
@@ -223,6 +226,10 @@ bool ecm_front_end_gre_proto_is_accel_al
|
||||
*/
|
||||
DEBUG_TRACE("%px: GRE IPv%d pass through - allow acceleration\n", skb, ip_version);
|
||||
return true;
|
||||
+#else
|
||||
+ DEBUG_TRACE("%px: GRE%d feature is disabled - do not allow acceleration\n", skb, ip_version);
|
||||
+ return false;
|
||||
+#endif
|
||||
}
|
||||
|
||||
#ifdef ECM_CLASSIFIER_DSCP_ENABLE
|
|
@ -1,831 +0,0 @@
|
|||
From e8b642c23af9146c973e828a7f4e0fb56cfc8d0b Mon Sep 17 00:00:00 2001
|
||||
From: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
Date: Sat, 15 May 2021 03:51:14 +0200
|
||||
Subject: [PATCH] add support for kernel 5.10
|
||||
|
||||
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
---
|
||||
ecm_classifier_default.c | 24 +++---------
|
||||
ecm_classifier_dscp.c | 8 +---
|
||||
ecm_classifier_emesh.c | 16 ++------
|
||||
ecm_classifier_hyfi.c | 7 +---
|
||||
ecm_classifier_mark.c | 8 +---
|
||||
ecm_classifier_ovs.c | 8 +---
|
||||
ecm_classifier_pcc.c | 8 +---
|
||||
ecm_conntrack_notifier.c | 8 +---
|
||||
ecm_db/ecm_db_connection.c | 7 +---
|
||||
ecm_db/ecm_db_host.c | 7 +---
|
||||
ecm_db/ecm_db_iface.c | 7 +---
|
||||
ecm_db/ecm_db_mapping.c | 7 +---
|
||||
ecm_db/ecm_db_node.c | 7 +---
|
||||
ecm_interface.c | 4 +-
|
||||
ecm_state.c | 14 ++-----
|
||||
frontends/ecm_front_end_common.c | 4 +-
|
||||
frontends/ecm_front_end_ipv4.c | 7 +---
|
||||
frontends/ecm_front_end_ipv6.c | 7 +---
|
||||
frontends/nss/ecm_nss_bond_notifier.c | 8 +---
|
||||
frontends/nss/ecm_nss_ipv4.c | 49 +++++++------------------
|
||||
frontends/nss/ecm_nss_ipv6.c | 49 +++++++------------------
|
||||
frontends/nss/ecm_nss_multicast_ipv4.c | 7 +---
|
||||
frontends/nss/ecm_nss_multicast_ipv6.c | 7 +---
|
||||
frontends/nss/ecm_nss_non_ported_ipv4.c | 7 +---
|
||||
frontends/nss/ecm_nss_non_ported_ipv6.c | 7 +---
|
||||
frontends/nss/ecm_nss_ported_ipv4.c | 8 +---
|
||||
frontends/nss/ecm_nss_ported_ipv6.c | 8 +---
|
||||
frontends/sfe/ecm_sfe_ipv4.c | 49 +++++++------------------
|
||||
frontends/sfe/ecm_sfe_ipv6.c | 49 +++++++------------------
|
||||
frontends/sfe/ecm_sfe_non_ported_ipv4.c | 7 +---
|
||||
frontends/sfe/ecm_sfe_non_ported_ipv6.c | 7 +---
|
||||
frontends/sfe/ecm_sfe_ported_ipv4.c | 8 +---
|
||||
frontends/sfe/ecm_sfe_ported_ipv6.c | 8 +---
|
||||
33 files changed, 122 insertions(+), 314 deletions(-)
|
||||
|
||||
--- a/ecm_classifier_default.c
|
||||
+++ b/ecm_classifier_default.c
|
||||
@@ -776,26 +776,14 @@ int ecm_classifier_default_init(struct d
|
||||
return -1;
|
||||
}
|
||||
|
||||
- if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry,
|
||||
- (u32 *)&ecm_classifier_default_enabled)) {
|
||||
- DEBUG_ERROR("Failed to create ecm deafult classifier enabled file in debugfs\n");
|
||||
- debugfs_remove_recursive(ecm_classifier_default_dentry);
|
||||
- return -1;
|
||||
- }
|
||||
+ debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry,
|
||||
+ (u32 *)&ecm_classifier_default_enabled);
|
||||
|
||||
- if (!debugfs_create_u32("accel_mode", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry,
|
||||
- (u32 *)&ecm_classifier_default_accel_mode)) {
|
||||
- DEBUG_ERROR("Failed to create ecm deafult classifier accel_mode file in debugfs\n");
|
||||
- debugfs_remove_recursive(ecm_classifier_default_dentry);
|
||||
- return -1;
|
||||
- }
|
||||
+ debugfs_create_u32("accel_mode", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry,
|
||||
+ (u32 *)&ecm_classifier_default_accel_mode);
|
||||
|
||||
- if (!debugfs_create_u32("accel_delay_pkts", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry,
|
||||
- (u32 *)&ecm_classifier_accel_delay_pkts)) {
|
||||
- DEBUG_ERROR("Failed to create accel delay packet counts in debugfs\n");
|
||||
- debugfs_remove_recursive(ecm_classifier_default_dentry);
|
||||
- return -1;
|
||||
- }
|
||||
+ debugfs_create_u32("accel_delay_pkts", S_IRUGO | S_IWUSR, ecm_classifier_default_dentry,
|
||||
+ (u32 *)&ecm_classifier_accel_delay_pkts);
|
||||
|
||||
return 0;
|
||||
}
|
||||
--- a/ecm_classifier_dscp.c
|
||||
+++ b/ecm_classifier_dscp.c
|
||||
@@ -747,12 +747,8 @@ int ecm_classifier_dscp_init(struct dent
|
||||
return -1;
|
||||
}
|
||||
|
||||
- if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_dscp_dentry,
|
||||
- (u32 *)&ecm_classifier_dscp_enabled)) {
|
||||
- DEBUG_ERROR("Failed to create dscp enabled file in debugfs\n");
|
||||
- debugfs_remove_recursive(ecm_classifier_dscp_dentry);
|
||||
- return -1;
|
||||
- }
|
||||
+ debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_dscp_dentry,
|
||||
+ (u32 *)&ecm_classifier_dscp_enabled);
|
||||
|
||||
return 0;
|
||||
}
|
||||
--- a/ecm_classifier_emesh.c
|
||||
+++ b/ecm_classifier_emesh.c
|
||||
@@ -977,19 +977,11 @@ int ecm_classifier_emesh_init(struct den
|
||||
return -1;
|
||||
}
|
||||
|
||||
- if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_dentry,
|
||||
- (u32 *)&ecm_classifier_emesh_enabled)) {
|
||||
- DEBUG_ERROR("Failed to create ecm emesh classifier enabled file in debugfs\n");
|
||||
- debugfs_remove_recursive(ecm_classifier_emesh_dentry);
|
||||
- return -1;
|
||||
- }
|
||||
+ debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_dentry,
|
||||
+ (u32 *)&ecm_classifier_emesh_enabled);
|
||||
|
||||
- if (!debugfs_create_u32("latency_config_enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_dentry,
|
||||
- (u32 *)&ecm_classifier_emesh_latency_config_enabled)) {
|
||||
- DEBUG_ERROR("Failed to create ecm emesh classifier latency config enabled file in debugfs\n");
|
||||
- debugfs_remove_recursive(ecm_classifier_emesh_dentry);
|
||||
- return -1;
|
||||
- }
|
||||
+ debugfs_create_u32("latency_config_enabled", S_IRUGO | S_IWUSR, ecm_classifier_emesh_dentry,
|
||||
+ (u32 *)&ecm_classifier_emesh_latency_config_enabled);
|
||||
|
||||
/*
|
||||
* Register for service prioritization notification update.
|
||||
--- a/ecm_classifier_hyfi.c
|
||||
+++ b/ecm_classifier_hyfi.c
|
||||
@@ -1099,11 +1099,8 @@ int ecm_classifier_hyfi_rules_init(struc
|
||||
goto classifier_task_cleanup;
|
||||
}
|
||||
|
||||
- if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_hyfi_dentry,
|
||||
- (u32 *)&ecm_classifier_hyfi_enabled)) {
|
||||
- DEBUG_ERROR("Failed to create ecm hyfi classifier enabled file in debugfs\n");
|
||||
- goto classifier_task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_hyfi_dentry,
|
||||
+ (u32 *)&ecm_classifier_hyfi_enabled);
|
||||
|
||||
if (!debugfs_create_file("cmd", S_IWUSR, ecm_classifier_hyfi_dentry,
|
||||
NULL, &ecm_classifier_hyfi_cmd_fops)) {
|
||||
--- a/ecm_classifier_mark.c
|
||||
+++ b/ecm_classifier_mark.c
|
||||
@@ -753,12 +753,8 @@ int ecm_classifier_mark_init(struct dent
|
||||
return -1;
|
||||
}
|
||||
|
||||
- if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_mark_dentry,
|
||||
- (u32 *)&ecm_classifier_mark_enabled)) {
|
||||
- DEBUG_ERROR("Failed to create mark enabled file in debugfs\n");
|
||||
- debugfs_remove_recursive(ecm_classifier_mark_dentry);
|
||||
- return -1;
|
||||
- }
|
||||
+ debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_mark_dentry,
|
||||
+ (u32 *)&ecm_classifier_mark_enabled);
|
||||
|
||||
return 0;
|
||||
}
|
||||
--- a/ecm_classifier_ovs.c
|
||||
+++ b/ecm_classifier_ovs.c
|
||||
@@ -2200,12 +2200,8 @@ int ecm_classifier_ovs_init(struct dentr
|
||||
return -1;
|
||||
}
|
||||
|
||||
- if (!debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_ovs_dentry,
|
||||
- (u32 *)&ecm_classifier_ovs_enabled)) {
|
||||
- DEBUG_ERROR("Failed to create ovs enabled file in debugfs\n");
|
||||
- debugfs_remove_recursive(ecm_classifier_ovs_dentry);
|
||||
- return -1;
|
||||
- }
|
||||
+ debugfs_create_u32("enabled", S_IRUGO | S_IWUSR, ecm_classifier_ovs_dentry,
|
||||
+ (u32 *)&ecm_classifier_ovs_enabled);
|
||||
|
||||
return 0;
|
||||
}
|
||||
--- a/ecm_classifier_pcc.c
|
||||
+++ b/ecm_classifier_pcc.c
|
||||
@@ -1308,12 +1308,8 @@ int ecm_classifier_pcc_init(struct dentr
|
||||
return -1;
|
||||
}
|
||||
|
||||
- if (!debugfs_create_u32("enabled", S_IRUGO, ecm_classifier_pcc_dentry,
|
||||
- (u32 *)&ecm_classifier_pcc_enabled)) {
|
||||
- DEBUG_ERROR("Failed to create pcc enabled file in debugfs\n");
|
||||
- debugfs_remove_recursive(ecm_classifier_pcc_dentry);
|
||||
- return -1;
|
||||
- }
|
||||
+ debugfs_create_u32("enabled", S_IRUGO, ecm_classifier_pcc_dentry,
|
||||
+ (u32 *)&ecm_classifier_pcc_enabled);
|
||||
|
||||
return 0;
|
||||
}
|
||||
--- a/ecm_conntrack_notifier.c
|
||||
+++ b/ecm_conntrack_notifier.c
|
||||
@@ -414,12 +414,8 @@ int ecm_conntrack_notifier_init(struct d
|
||||
return -1;
|
||||
}
|
||||
|
||||
- if (!debugfs_create_u32("stop", S_IRUGO | S_IWUSR, ecm_conntrack_notifier_dentry,
|
||||
- (u32 *)&ecm_conntrack_notifier_stopped)) {
|
||||
- DEBUG_ERROR("Failed to create ecm conntrack notifier stopped file in debugfs\n");
|
||||
- debugfs_remove_recursive(ecm_conntrack_notifier_dentry);
|
||||
- return -1;
|
||||
- }
|
||||
+ debugfs_create_u32("stop", S_IRUGO | S_IWUSR, ecm_conntrack_notifier_dentry,
|
||||
+ (u32 *)&ecm_conntrack_notifier_stopped);
|
||||
|
||||
#ifdef CONFIG_NF_CONNTRACK_EVENTS
|
||||
/*
|
||||
--- a/ecm_db/ecm_db_connection.c
|
||||
+++ b/ecm_db/ecm_db_connection.c
|
||||
@@ -3642,11 +3642,8 @@ static struct file_operations ecm_db_con
|
||||
*/
|
||||
bool ecm_db_connection_init(struct dentry *dentry)
|
||||
{
|
||||
- if (!debugfs_create_u32("connection_count", S_IRUGO, dentry,
|
||||
- (u32 *)&ecm_db_connection_count)) {
|
||||
- DEBUG_ERROR("Failed to create ecm db connection count file in debugfs\n");
|
||||
- return false;
|
||||
- }
|
||||
+ debugfs_create_u32("connection_count", S_IRUGO, dentry,
|
||||
+ (u32 *)&ecm_db_connection_count);
|
||||
|
||||
if (!debugfs_create_file("connection_count_simple", S_IRUGO, dentry,
|
||||
NULL, &ecm_db_connection_count_simple_fops)) {
|
||||
--- a/ecm_db/ecm_db_host.c
|
||||
+++ b/ecm_db/ecm_db_host.c
|
||||
@@ -770,11 +770,8 @@ EXPORT_SYMBOL(ecm_db_host_alloc);
|
||||
bool ecm_db_host_init(struct dentry *dentry)
|
||||
{
|
||||
|
||||
- if (!debugfs_create_u32("host_count", S_IRUGO, dentry,
|
||||
- (u32 *)&ecm_db_host_count)) {
|
||||
- DEBUG_ERROR("Failed to create ecm db host count file in debugfs\n");
|
||||
- return false;;
|
||||
- }
|
||||
+ debugfs_create_u32("host_count", S_IRUGO, dentry,
|
||||
+ (u32 *)&ecm_db_host_count);
|
||||
|
||||
ecm_db_host_table = vzalloc(sizeof(struct ecm_db_host_instance *) * ECM_DB_HOST_HASH_SLOTS);
|
||||
if (!ecm_db_host_table) {
|
||||
--- a/ecm_db/ecm_db_iface.c
|
||||
+++ b/ecm_db/ecm_db_iface.c
|
||||
@@ -3670,11 +3670,8 @@ EXPORT_SYMBOL(ecm_db_iface_alloc);
|
||||
*/
|
||||
bool ecm_db_iface_init(struct dentry *dentry)
|
||||
{
|
||||
- if (!debugfs_create_u32("iface_count", S_IRUGO, dentry,
|
||||
- (u32 *)&ecm_db_iface_count)) {
|
||||
- DEBUG_ERROR("Failed to create ecm db iface count file in debugfs\n");
|
||||
- return false;
|
||||
- }
|
||||
+ debugfs_create_u32("iface_count", S_IRUGO, dentry,
|
||||
+ (u32 *)&ecm_db_iface_count);
|
||||
|
||||
return true;
|
||||
}
|
||||
--- a/ecm_db/ecm_db_mapping.c
|
||||
+++ b/ecm_db/ecm_db_mapping.c
|
||||
@@ -806,11 +806,8 @@ EXPORT_SYMBOL(ecm_db_mapping_alloc);
|
||||
*/
|
||||
bool ecm_db_mapping_init(struct dentry *dentry)
|
||||
{
|
||||
- if (!debugfs_create_u32("mapping_count", S_IRUGO, dentry,
|
||||
- (u32 *)&ecm_db_mapping_count)) {
|
||||
- DEBUG_ERROR("Failed to create ecm db mapping count file in debugfs\n");
|
||||
- return false;
|
||||
- }
|
||||
+ debugfs_create_u32("mapping_count", S_IRUGO, dentry,
|
||||
+ (u32 *)&ecm_db_mapping_count);
|
||||
|
||||
ecm_db_mapping_table = vzalloc(sizeof(struct ecm_db_mapping_instance *) * ECM_DB_MAPPING_HASH_SLOTS);
|
||||
if (!ecm_db_mapping_table) {
|
||||
--- a/ecm_db/ecm_db_node.c
|
||||
+++ b/ecm_db/ecm_db_node.c
|
||||
@@ -1187,11 +1187,8 @@ keep_sni_conn:
|
||||
*/
|
||||
bool ecm_db_node_init(struct dentry *dentry)
|
||||
{
|
||||
- if (!debugfs_create_u32("node_count", S_IRUGO, dentry,
|
||||
- (u32 *)&ecm_db_node_count)) {
|
||||
- DEBUG_ERROR("Failed to create ecm db node count file in debugfs\n");
|
||||
- return false;
|
||||
- }
|
||||
+ debugfs_create_u32("node_count", S_IRUGO, dentry,
|
||||
+ (u32 *)&ecm_db_node_count);
|
||||
|
||||
ecm_db_node_table = vzalloc(sizeof(struct ecm_db_node_instance *) * ECM_DB_NODE_HASH_SLOTS);
|
||||
if (!ecm_db_node_table) {
|
||||
--- a/ecm_interface.c
|
||||
+++ b/ecm_interface.c
|
||||
@@ -332,7 +332,7 @@ static struct net_device *ecm_interface_
|
||||
struct net_device *dev;
|
||||
|
||||
ECM_IP_ADDR_TO_NIN6_ADDR(addr6, addr);
|
||||
- dev = (struct net_device *)ipv6_dev_find(&init_net, &addr6, 1);
|
||||
+ dev = (struct net_device *)ipv6_dev_find_and_hold(&init_net, &addr6, 1);
|
||||
return dev;
|
||||
}
|
||||
#endif
|
||||
@@ -734,7 +734,7 @@ static bool ecm_interface_mac_addr_get_i
|
||||
* Get the MAC address that corresponds to IP address given.
|
||||
*/
|
||||
ECM_IP_ADDR_TO_NIN6_ADDR(daddr, addr);
|
||||
- local_dev = ipv6_dev_find(&init_net, &daddr, 1);
|
||||
+ local_dev = ipv6_dev_find_and_hold(&init_net, &daddr, 1);
|
||||
if (local_dev) {
|
||||
DEBUG_TRACE("%pi6 is a local address\n", &daddr);
|
||||
memcpy(mac_addr, dev->dev_addr, ETH_ALEN);
|
||||
--- a/ecm_state.c
|
||||
+++ b/ecm_state.c
|
||||
@@ -899,17 +899,11 @@ int ecm_state_init(struct dentry *dentry
|
||||
return -1;
|
||||
}
|
||||
|
||||
- if (!debugfs_create_u32("state_dev_major", S_IRUGO, ecm_state_dentry,
|
||||
- (u32 *)&ecm_state_dev_major_id)) {
|
||||
- DEBUG_ERROR("Failed to create ecm state dev major file in debugfs\n");
|
||||
- goto init_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("state_dev_major", S_IRUGO, ecm_state_dentry,
|
||||
+ (u32 *)&ecm_state_dev_major_id);
|
||||
|
||||
- if (!debugfs_create_u32("state_file_output_mask", S_IRUGO | S_IWUSR, ecm_state_dentry,
|
||||
- (u32 *)&ecm_state_file_output_mask)) {
|
||||
- DEBUG_ERROR("Failed to create ecm state output mask file in debugfs\n");
|
||||
- goto init_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("state_file_output_mask", S_IRUGO | S_IWUSR, ecm_state_dentry,
|
||||
+ (u32 *)&ecm_state_file_output_mask);
|
||||
|
||||
/*
|
||||
* Register a char device that we will use to provide a dump of our state
|
||||
--- a/frontends/ecm_front_end_common.c
|
||||
+++ b/frontends/ecm_front_end_common.c
|
||||
@@ -192,7 +192,7 @@ bool ecm_front_end_gre_proto_is_accel_al
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
- dev = ipv6_dev_find(&init_net, &(tuple->src.u3.in6), 1);
|
||||
+ dev = ipv6_dev_find_and_hold(&init_net, &(tuple->src.u3.in6), 1);
|
||||
if (dev) {
|
||||
/*
|
||||
* Source IP address is local
|
||||
@@ -202,7 +202,7 @@ bool ecm_front_end_gre_proto_is_accel_al
|
||||
return false;
|
||||
}
|
||||
|
||||
- dev = ipv6_dev_find(&init_net, &(tuple->dst.u3.in6), 1);
|
||||
+ dev = ipv6_dev_find_and_hold(&init_net, &(tuple->dst.u3.in6), 1);
|
||||
if (dev) {
|
||||
/*
|
||||
* Destination IP address is local
|
||||
--- a/frontends/ecm_front_end_ipv4.c
|
||||
+++ b/frontends/ecm_front_end_ipv4.c
|
||||
@@ -376,11 +376,8 @@ void ecm_front_end_ipv4_stop(int num)
|
||||
*/
|
||||
int ecm_front_end_ipv4_init(struct dentry *dentry)
|
||||
{
|
||||
- if (!debugfs_create_u32("front_end_ipv4_stop", S_IRUGO | S_IWUSR, dentry,
|
||||
- (u32 *)&ecm_front_end_ipv4_stopped)) {
|
||||
- DEBUG_ERROR("Failed to create ecm front end ipv4 stop file in debugfs\n");
|
||||
- return -1;
|
||||
- }
|
||||
+ debugfs_create_u32("front_end_ipv4_stop", S_IRUGO | S_IWUSR, dentry,
|
||||
+ (u32 *)&ecm_front_end_ipv4_stopped);
|
||||
|
||||
switch (ecm_front_end_type_get()) {
|
||||
case ECM_FRONT_END_TYPE_NSS:
|
||||
--- a/frontends/ecm_front_end_ipv6.c
|
||||
+++ b/frontends/ecm_front_end_ipv6.c
|
||||
@@ -255,11 +255,8 @@ void ecm_front_end_ipv6_stop(int num)
|
||||
*/
|
||||
int ecm_front_end_ipv6_init(struct dentry *dentry)
|
||||
{
|
||||
- if (!debugfs_create_u32("front_end_ipv6_stop", S_IRUGO | S_IWUSR, dentry,
|
||||
- (u32 *)&ecm_front_end_ipv6_stopped)) {
|
||||
- DEBUG_ERROR("Failed to create ecm front end ipv6 stop file in debugfs\n");
|
||||
- return -1;
|
||||
- }
|
||||
+ debugfs_create_u32("front_end_ipv6_stop", S_IRUGO | S_IWUSR, dentry,
|
||||
+ (u32 *)&ecm_front_end_ipv6_stopped);
|
||||
|
||||
switch (ecm_front_end_type_get()) {
|
||||
case ECM_FRONT_END_TYPE_NSS:
|
||||
--- a/frontends/nss/ecm_nss_bond_notifier.c
|
||||
+++ b/frontends/nss/ecm_nss_bond_notifier.c
|
||||
@@ -240,12 +240,8 @@ int ecm_nss_bond_notifier_init(struct de
|
||||
return -1;
|
||||
}
|
||||
|
||||
- if (!debugfs_create_u32("stop", S_IRUGO | S_IWUSR, ecm_nss_bond_notifier_dentry,
|
||||
- (u32 *)&ecm_nss_bond_notifier_stopped)) {
|
||||
- DEBUG_ERROR("Failed to create ecm bond notifier stopped file in debugfs\n");
|
||||
- debugfs_remove_recursive(ecm_nss_bond_notifier_dentry);
|
||||
- return -1;
|
||||
- }
|
||||
+ debugfs_create_u32("stop", S_IRUGO | S_IWUSR, ecm_nss_bond_notifier_dentry,
|
||||
+ (u32 *)&ecm_nss_bond_notifier_stopped);
|
||||
|
||||
/*
|
||||
* Register Link Aggregation callbacks with the bonding driver
|
||||
--- a/frontends/nss/ecm_nss_ipv4.c
|
||||
+++ b/frontends/nss/ecm_nss_ipv4.c
|
||||
@@ -2802,41 +2802,23 @@ int ecm_nss_ipv4_init(struct dentry *den
|
||||
return result;
|
||||
}
|
||||
|
||||
- if (!debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
|
||||
- (u32 *)&ecm_nss_ipv4_no_action_limit_default)) {
|
||||
- DEBUG_ERROR("Failed to create ecm nss ipv4 no_action_limit_default file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
|
||||
+ (u32 *)&ecm_nss_ipv4_no_action_limit_default);
|
||||
|
||||
- if (!debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
|
||||
- (u32 *)&ecm_nss_ipv4_driver_fail_limit_default)) {
|
||||
- DEBUG_ERROR("Failed to create ecm nss ipv4 driver_fail_limit_default file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
|
||||
+ (u32 *)&ecm_nss_ipv4_driver_fail_limit_default);
|
||||
|
||||
- if (!debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
|
||||
- (u32 *)&ecm_nss_ipv4_nack_limit_default)) {
|
||||
- DEBUG_ERROR("Failed to create ecm nss ipv4 nack_limit_default file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
|
||||
+ (u32 *)&ecm_nss_ipv4_nack_limit_default);
|
||||
|
||||
- if (!debugfs_create_u32("accelerated_count", S_IRUGO, ecm_nss_ipv4_dentry,
|
||||
- (u32 *)&ecm_nss_ipv4_accelerated_count)) {
|
||||
- DEBUG_ERROR("Failed to create ecm nss ipv4 accelerated_count file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("accelerated_count", S_IRUGO, ecm_nss_ipv4_dentry,
|
||||
+ (u32 *)&ecm_nss_ipv4_accelerated_count);
|
||||
|
||||
- if (!debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_nss_ipv4_dentry,
|
||||
- (u32 *)&ecm_nss_ipv4_pending_accel_count)) {
|
||||
- DEBUG_ERROR("Failed to create ecm nss ipv4 pending_accel_count file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_nss_ipv4_dentry,
|
||||
+ (u32 *)&ecm_nss_ipv4_pending_accel_count);
|
||||
|
||||
- if (!debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_nss_ipv4_dentry,
|
||||
- (u32 *)&ecm_nss_ipv4_pending_decel_count)) {
|
||||
- DEBUG_ERROR("Failed to create ecm nss ipv4 pending_decel_count file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_nss_ipv4_dentry,
|
||||
+ (u32 *)&ecm_nss_ipv4_pending_decel_count);
|
||||
|
||||
if (!debugfs_create_file("accel_limit_mode", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
|
||||
NULL, &ecm_nss_ipv4_accel_limit_mode_fops)) {
|
||||
@@ -2867,11 +2849,8 @@ int ecm_nss_ipv4_init(struct dentry *den
|
||||
goto task_cleanup;
|
||||
}
|
||||
|
||||
- if (!debugfs_create_u32("vlan_passthrough_set", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
|
||||
- (u32 *)&ecm_nss_ipv4_vlan_passthrough_enable)) {
|
||||
- DEBUG_ERROR("Failed to create ecm nss ipv4 vlan passthrough file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("vlan_passthrough_set", S_IRUGO | S_IWUSR, ecm_nss_ipv4_dentry,
|
||||
+ (u32 *)&ecm_nss_ipv4_vlan_passthrough_enable);
|
||||
|
||||
#ifdef ECM_NON_PORTED_SUPPORT_ENABLE
|
||||
if (!ecm_nss_non_ported_ipv4_debugfs_init(ecm_nss_ipv4_dentry)) {
|
||||
--- a/frontends/nss/ecm_nss_ipv6.c
|
||||
+++ b/frontends/nss/ecm_nss_ipv6.c
|
||||
@@ -2542,41 +2542,23 @@ int ecm_nss_ipv6_init(struct dentry *den
|
||||
return result;
|
||||
}
|
||||
|
||||
- if (!debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
|
||||
- (u32 *)&ecm_nss_ipv6_no_action_limit_default)) {
|
||||
- DEBUG_ERROR("Failed to create ecm nss ipv6 no_action_limit_default file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
|
||||
+ (u32 *)&ecm_nss_ipv6_no_action_limit_default);
|
||||
|
||||
- if (!debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
|
||||
- (u32 *)&ecm_nss_ipv6_driver_fail_limit_default)) {
|
||||
- DEBUG_ERROR("Failed to create ecm nss ipv6 driver_fail_limit_default file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
|
||||
+ (u32 *)&ecm_nss_ipv6_driver_fail_limit_default);
|
||||
|
||||
- if (!debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
|
||||
- (u32 *)&ecm_nss_ipv6_nack_limit_default)) {
|
||||
- DEBUG_ERROR("Failed to create ecm nss ipv6 nack_limit_default file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
|
||||
+ (u32 *)&ecm_nss_ipv6_nack_limit_default);
|
||||
|
||||
- if (!debugfs_create_u32("accelerated_count", S_IRUGO, ecm_nss_ipv6_dentry,
|
||||
- (u32 *)&ecm_nss_ipv6_accelerated_count)) {
|
||||
- DEBUG_ERROR("Failed to create ecm nss ipv6 accelerated_count file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("accelerated_count", S_IRUGO, ecm_nss_ipv6_dentry,
|
||||
+ (u32 *)&ecm_nss_ipv6_accelerated_count);
|
||||
|
||||
- if (!debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_nss_ipv6_dentry,
|
||||
- (u32 *)&ecm_nss_ipv6_pending_accel_count)) {
|
||||
- DEBUG_ERROR("Failed to create ecm nss ipv6 pending_accel_count file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_nss_ipv6_dentry,
|
||||
+ (u32 *)&ecm_nss_ipv6_pending_accel_count);
|
||||
|
||||
- if (!debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_nss_ipv6_dentry,
|
||||
- (u32 *)&ecm_nss_ipv6_pending_decel_count)) {
|
||||
- DEBUG_ERROR("Failed to create ecm nss ipv6 pending_decel_count file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_nss_ipv6_dentry,
|
||||
+ (u32 *)&ecm_nss_ipv6_pending_decel_count);
|
||||
|
||||
if (!debugfs_create_file("accel_limit_mode", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
|
||||
NULL, &ecm_nss_ipv6_accel_limit_mode_fops)) {
|
||||
@@ -2607,11 +2589,8 @@ int ecm_nss_ipv6_init(struct dentry *den
|
||||
goto task_cleanup;
|
||||
}
|
||||
|
||||
- if (!debugfs_create_u32("vlan_passthrough_set", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
|
||||
- (u32 *)&ecm_nss_ipv6_vlan_passthrough_enable)) {
|
||||
- DEBUG_ERROR("Failed to create ecm nss ipv6 vlan passthrough file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("vlan_passthrough_set", S_IRUGO | S_IWUSR, ecm_nss_ipv6_dentry,
|
||||
+ (u32 *)&ecm_nss_ipv6_vlan_passthrough_enable);
|
||||
|
||||
#ifdef ECM_NON_PORTED_SUPPORT_ENABLE
|
||||
if (!ecm_nss_non_ported_ipv6_debugfs_init(ecm_nss_ipv6_dentry)) {
|
||||
--- a/frontends/nss/ecm_nss_multicast_ipv4.c
|
||||
+++ b/frontends/nss/ecm_nss_multicast_ipv4.c
|
||||
@@ -4139,11 +4139,8 @@ void ecm_nss_multicast_ipv4_stop(int num
|
||||
*/
|
||||
int ecm_nss_multicast_ipv4_init(struct dentry *dentry)
|
||||
{
|
||||
- if (!debugfs_create_u32("ecm_nss_multicast_ipv4_stop", S_IRUGO | S_IWUSR, dentry,
|
||||
- (u32 *)&ecm_front_end_ipv4_mc_stopped)) {
|
||||
- DEBUG_ERROR("Failed to create ecm front end ipv4 mc stop file in debugfs\n");
|
||||
- return -1;
|
||||
- }
|
||||
+ debugfs_create_u32("ecm_nss_multicast_ipv4_stop", S_IRUGO | S_IWUSR, dentry,
|
||||
+ (u32 *)&ecm_front_end_ipv4_mc_stopped);
|
||||
|
||||
/*
|
||||
* Register multicast update callback to MCS snooper
|
||||
--- a/frontends/nss/ecm_nss_multicast_ipv6.c
|
||||
+++ b/frontends/nss/ecm_nss_multicast_ipv6.c
|
||||
@@ -3939,11 +3939,8 @@ void ecm_nss_multicast_ipv6_stop(int num
|
||||
*/
|
||||
int ecm_nss_multicast_ipv6_init(struct dentry *dentry)
|
||||
{
|
||||
- if (!debugfs_create_u32("ecm_nss_multicast_ipv6_stop", S_IRUGO | S_IWUSR, dentry,
|
||||
- (u32 *)&ecm_front_end_ipv6_mc_stopped)) {
|
||||
- DEBUG_ERROR("Failed to create ecm front end ipv6 mc stop file in debugfs\n");
|
||||
- return -1;
|
||||
- }
|
||||
+ debugfs_create_u32("ecm_nss_multicast_ipv6_stop", S_IRUGO | S_IWUSR, dentry,
|
||||
+ (u32 *)&ecm_front_end_ipv6_mc_stopped);
|
||||
|
||||
/*
|
||||
* Register multicast update callback to MCS snooper
|
||||
--- a/frontends/nss/ecm_nss_non_ported_ipv4.c
|
||||
+++ b/frontends/nss/ecm_nss_non_ported_ipv4.c
|
||||
@@ -2615,11 +2615,8 @@ done:
|
||||
*/
|
||||
bool ecm_nss_non_ported_ipv4_debugfs_init(struct dentry *dentry)
|
||||
{
|
||||
- if (!debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry,
|
||||
- (u32 *)&ecm_nss_non_ported_ipv4_accelerated_count)) {
|
||||
- DEBUG_ERROR("Failed to create ecm nss ipv4 non_ported_accelerated_count file in debugfs\n");
|
||||
- return false;
|
||||
- }
|
||||
+ debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry,
|
||||
+ (u32 *)&ecm_nss_non_ported_ipv4_accelerated_count);
|
||||
|
||||
return true;
|
||||
}
|
||||
--- a/frontends/nss/ecm_nss_non_ported_ipv6.c
|
||||
+++ b/frontends/nss/ecm_nss_non_ported_ipv6.c
|
||||
@@ -2329,11 +2329,8 @@ done:
|
||||
*/
|
||||
bool ecm_nss_non_ported_ipv6_debugfs_init(struct dentry *dentry)
|
||||
{
|
||||
- if (!debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry,
|
||||
- (u32 *)&ecm_nss_non_ported_ipv6_accelerated_count)) {
|
||||
- DEBUG_ERROR("Failed to create ecm nss ipv6 non_ported_accelerated_count file in debugfs\n");
|
||||
- return false;
|
||||
- }
|
||||
+ debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry,
|
||||
+ (u32 *)&ecm_nss_non_ported_ipv6_accelerated_count);
|
||||
|
||||
return true;
|
||||
}
|
||||
--- a/frontends/nss/ecm_nss_ported_ipv4.c
|
||||
+++ b/frontends/nss/ecm_nss_ported_ipv4.c
|
||||
@@ -2944,12 +2944,8 @@ bool ecm_nss_ported_ipv4_debugfs_init(st
|
||||
return false;
|
||||
}
|
||||
|
||||
- if (!debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
|
||||
- &ecm_nss_ported_ipv4_accelerated_count[ECM_NSS_PORTED_IPV4_PROTO_TCP])) {
|
||||
- DEBUG_ERROR("Failed to create ecm nss ipv4 tcp_accelerated_count file in debugfs\n");
|
||||
- debugfs_remove(udp_dentry);
|
||||
- return false;
|
||||
- }
|
||||
+ debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
|
||||
+ &ecm_nss_ported_ipv4_accelerated_count[ECM_NSS_PORTED_IPV4_PROTO_TCP]);
|
||||
|
||||
return true;
|
||||
}
|
||||
--- a/frontends/nss/ecm_nss_ported_ipv6.c
|
||||
+++ b/frontends/nss/ecm_nss_ported_ipv6.c
|
||||
@@ -2732,12 +2732,8 @@ bool ecm_nss_ported_ipv6_debugfs_init(st
|
||||
return false;
|
||||
}
|
||||
|
||||
- if (!debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
|
||||
- &ecm_nss_ported_ipv6_accelerated_count[ECM_NSS_PORTED_IPV6_PROTO_TCP])) {
|
||||
- DEBUG_ERROR("Failed to create ecm nss ipv6 tcp_accelerated_count file in debugfs\n");
|
||||
- debugfs_remove(udp_dentry);
|
||||
- return false;
|
||||
- }
|
||||
+ debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
|
||||
+ &ecm_nss_ported_ipv6_accelerated_count[ECM_NSS_PORTED_IPV6_PROTO_TCP]);
|
||||
|
||||
return true;
|
||||
}
|
||||
--- a/frontends/sfe/ecm_sfe_ipv4.c
|
||||
+++ b/frontends/sfe/ecm_sfe_ipv4.c
|
||||
@@ -1808,48 +1808,27 @@ int ecm_sfe_ipv4_init(struct dentry *den
|
||||
}
|
||||
|
||||
#ifdef CONFIG_XFRM
|
||||
- if (!debugfs_create_u32("reject_acceleration_for_ipsec", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
|
||||
- (u32 *)&ecm_sfe_ipv4_reject_acceleration_for_ipsec)) {
|
||||
- DEBUG_ERROR("Failed to create ecm sfe ipv4 reject_acceleration_for_ipsec file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("reject_acceleration_for_ipsec", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
|
||||
+ (u32 *)&ecm_sfe_ipv4_reject_acceleration_for_ipsec);
|
||||
#endif
|
||||
|
||||
- if (!debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
|
||||
- (u32 *)&ecm_sfe_ipv4_no_action_limit_default)) {
|
||||
- DEBUG_ERROR("Failed to create ecm sfe ipv4 no_action_limit_default file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
|
||||
+ (u32 *)&ecm_sfe_ipv4_no_action_limit_default);
|
||||
|
||||
- if (!debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
|
||||
- (u32 *)&ecm_sfe_ipv4_driver_fail_limit_default)) {
|
||||
- DEBUG_ERROR("Failed to create ecm sfe ipv4 driver_fail_limit_default file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
|
||||
+ (u32 *)&ecm_sfe_ipv4_driver_fail_limit_default);
|
||||
|
||||
- if (!debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
|
||||
- (u32 *)&ecm_sfe_ipv4_nack_limit_default)) {
|
||||
- DEBUG_ERROR("Failed to create ecm sfe ipv4 nack_limit_default file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
|
||||
+ (u32 *)&ecm_sfe_ipv4_nack_limit_default);
|
||||
|
||||
- if (!debugfs_create_u32("accelerated_count", S_IRUGO, ecm_sfe_ipv4_dentry,
|
||||
- (u32 *)&ecm_sfe_ipv4_accelerated_count)) {
|
||||
- DEBUG_ERROR("Failed to create ecm sfe ipv4 accelerated_count file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("accelerated_count", S_IRUGO, ecm_sfe_ipv4_dentry,
|
||||
+ (u32 *)&ecm_sfe_ipv4_accelerated_count);
|
||||
|
||||
- if (!debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_sfe_ipv4_dentry,
|
||||
- (u32 *)&ecm_sfe_ipv4_pending_accel_count)) {
|
||||
- DEBUG_ERROR("Failed to create ecm sfe ipv4 pending_accel_count file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_sfe_ipv4_dentry,
|
||||
+ (u32 *)&ecm_sfe_ipv4_pending_accel_count);
|
||||
|
||||
- if (!debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_sfe_ipv4_dentry,
|
||||
- (u32 *)&ecm_sfe_ipv4_pending_decel_count)) {
|
||||
- DEBUG_ERROR("Failed to create ecm sfe ipv4 pending_decel_count file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_sfe_ipv4_dentry,
|
||||
+ (u32 *)&ecm_sfe_ipv4_pending_decel_count);
|
||||
|
||||
if (!debugfs_create_file("accel_limit_mode", S_IRUGO | S_IWUSR, ecm_sfe_ipv4_dentry,
|
||||
NULL, &ecm_sfe_ipv4_accel_limit_mode_fops)) {
|
||||
--- a/frontends/sfe/ecm_sfe_ipv6.c
|
||||
+++ b/frontends/sfe/ecm_sfe_ipv6.c
|
||||
@@ -1532,48 +1532,27 @@ int ecm_sfe_ipv6_init(struct dentry *den
|
||||
}
|
||||
|
||||
#ifdef CONFIG_XFRM
|
||||
- if (!debugfs_create_u32("reject_acceleration_for_ipsec", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
|
||||
- (u32 *)&ecm_sfe_ipv6_reject_acceleration_for_ipsec)) {
|
||||
- DEBUG_ERROR("Failed to create ecm sfe ipv6 reject_acceleration_for_ipsec file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("reject_acceleration_for_ipsec", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
|
||||
+ (u32 *)&ecm_sfe_ipv6_reject_acceleration_for_ipsec);
|
||||
#endif
|
||||
|
||||
- if (!debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
|
||||
- (u32 *)&ecm_sfe_ipv6_no_action_limit_default)) {
|
||||
- DEBUG_ERROR("Failed to create ecm sfe ipv6 no_action_limit_default file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("no_action_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
|
||||
+ (u32 *)&ecm_sfe_ipv6_no_action_limit_default);
|
||||
|
||||
- if (!debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
|
||||
- (u32 *)&ecm_sfe_ipv6_driver_fail_limit_default)) {
|
||||
- DEBUG_ERROR("Failed to create ecm sfe ipv6 driver_fail_limit_default file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("driver_fail_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
|
||||
+ (u32 *)&ecm_sfe_ipv6_driver_fail_limit_default);
|
||||
|
||||
- if (!debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
|
||||
- (u32 *)&ecm_sfe_ipv6_nack_limit_default)) {
|
||||
- DEBUG_ERROR("Failed to create ecm sfe ipv6 nack_limit_default file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("nack_limit_default", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
|
||||
+ (u32 *)&ecm_sfe_ipv6_nack_limit_default);
|
||||
|
||||
- if (!debugfs_create_u32("accelerated_count", S_IRUGO, ecm_sfe_ipv6_dentry,
|
||||
- (u32 *)&ecm_sfe_ipv6_accelerated_count)) {
|
||||
- DEBUG_ERROR("Failed to create ecm sfe ipv6 accelerated_count file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("accelerated_count", S_IRUGO, ecm_sfe_ipv6_dentry,
|
||||
+ (u32 *)&ecm_sfe_ipv6_accelerated_count);
|
||||
|
||||
- if (!debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_sfe_ipv6_dentry,
|
||||
- (u32 *)&ecm_sfe_ipv6_pending_accel_count)) {
|
||||
- DEBUG_ERROR("Failed to create ecm sfe ipv6 pending_accel_count file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("pending_accel_count", S_IRUGO, ecm_sfe_ipv6_dentry,
|
||||
+ (u32 *)&ecm_sfe_ipv6_pending_accel_count);
|
||||
|
||||
- if (!debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_sfe_ipv6_dentry,
|
||||
- (u32 *)&ecm_sfe_ipv6_pending_decel_count)) {
|
||||
- DEBUG_ERROR("Failed to create ecm sfe ipv6 pending_decel_count file in debugfs\n");
|
||||
- goto task_cleanup;
|
||||
- }
|
||||
+ debugfs_create_u32("pending_decel_count", S_IRUGO, ecm_sfe_ipv6_dentry,
|
||||
+ (u32 *)&ecm_sfe_ipv6_pending_decel_count);
|
||||
|
||||
if (!debugfs_create_file("accel_limit_mode", S_IRUGO | S_IWUSR, ecm_sfe_ipv6_dentry,
|
||||
NULL, &ecm_sfe_ipv6_accel_limit_mode_fops)) {
|
||||
--- a/frontends/sfe/ecm_sfe_non_ported_ipv4.c
|
||||
+++ b/frontends/sfe/ecm_sfe_non_ported_ipv4.c
|
||||
@@ -2284,11 +2284,8 @@ done:
|
||||
*/
|
||||
bool ecm_sfe_non_ported_ipv4_debugfs_init(struct dentry *dentry)
|
||||
{
|
||||
- if (!debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry,
|
||||
- (u32 *)&ecm_sfe_non_ported_ipv4_accelerated_count)) {
|
||||
- DEBUG_ERROR("Failed to create ecm sfe ipv4 non_ported_accelerated_count file in debugfs\n");
|
||||
- return false;
|
||||
- }
|
||||
+ debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry,
|
||||
+ (u32 *)&ecm_sfe_non_ported_ipv4_accelerated_count);
|
||||
|
||||
return true;
|
||||
}
|
||||
--- a/frontends/sfe/ecm_sfe_non_ported_ipv6.c
|
||||
+++ b/frontends/sfe/ecm_sfe_non_ported_ipv6.c
|
||||
@@ -2083,11 +2083,8 @@ done:
|
||||
*/
|
||||
bool ecm_sfe_non_ported_ipv6_debugfs_init(struct dentry *dentry)
|
||||
{
|
||||
- if (!debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry,
|
||||
- (u32 *)&ecm_sfe_non_ported_ipv6_accelerated_count)) {
|
||||
- DEBUG_ERROR("Failed to create ecm sfe ipv6 non_ported_accelerated_count file in debugfs\n");
|
||||
- return false;
|
||||
- }
|
||||
+ debugfs_create_u32("non_ported_accelerated_count", S_IRUGO, dentry,
|
||||
+ (u32 *)&ecm_sfe_non_ported_ipv6_accelerated_count);
|
||||
|
||||
return true;
|
||||
}
|
||||
--- a/frontends/sfe/ecm_sfe_ported_ipv4.c
|
||||
+++ b/frontends/sfe/ecm_sfe_ported_ipv4.c
|
||||
@@ -2528,12 +2528,8 @@ bool ecm_sfe_ported_ipv4_debugfs_init(st
|
||||
return false;
|
||||
}
|
||||
|
||||
- if (!debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
|
||||
- &ecm_sfe_ported_ipv4_accelerated_count[ECM_SFE_PORTED_IPV4_PROTO_TCP])) {
|
||||
- DEBUG_ERROR("Failed to create ecm sfe ipv4 tcp_accelerated_count file in debugfs\n");
|
||||
- debugfs_remove(udp_dentry);
|
||||
- return false;
|
||||
- }
|
||||
+ debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
|
||||
+ &ecm_sfe_ported_ipv4_accelerated_count[ECM_SFE_PORTED_IPV4_PROTO_TCP]);
|
||||
|
||||
return true;
|
||||
}
|
||||
--- a/frontends/sfe/ecm_sfe_ported_ipv6.c
|
||||
+++ b/frontends/sfe/ecm_sfe_ported_ipv6.c
|
||||
@@ -2374,12 +2374,8 @@ bool ecm_sfe_ported_ipv6_debugfs_init(st
|
||||
return false;
|
||||
}
|
||||
|
||||
- if (!debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
|
||||
- &ecm_sfe_ported_ipv6_accelerated_count[ECM_SFE_PORTED_IPV6_PROTO_TCP])) {
|
||||
- DEBUG_ERROR("Failed to create ecm sfe ipv6 tcp_accelerated_count file in debugfs\n");
|
||||
- debugfs_remove(udp_dentry);
|
||||
- return false;
|
||||
- }
|
||||
+ debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
|
||||
+ &ecm_sfe_ported_ipv6_accelerated_count[ECM_SFE_PORTED_IPV6_PROTO_TCP]);
|
||||
|
||||
return true;
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
--- a/ecm_conntrack_notifier.c
|
||||
+++ b/ecm_conntrack_notifier.c
|
||||
@@ -421,7 +421,11 @@ int ecm_conntrack_notifier_init(struct d
|
||||
/*
|
||||
* Eventing subsystem is available so we register a notifier hook to get fast notifications of expired connections
|
||||
*/
|
||||
+#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS
|
||||
+ result = nf_conntrack_register_chain_notifier(&init_net, &ecm_conntrack_notifier);
|
||||
+#else
|
||||
result = nf_conntrack_register_notifier(&init_net, &ecm_conntrack_notifier);
|
||||
+#endif
|
||||
if (result < 0) {
|
||||
DEBUG_ERROR("Can't register nf notifier hook.\n");
|
||||
debugfs_remove_recursive(ecm_conntrack_notifier_dentry);
|
||||
@@ -439,7 +443,9 @@ EXPORT_SYMBOL(ecm_conntrack_notifier_ini
|
||||
void ecm_conntrack_notifier_exit(void)
|
||||
{
|
||||
DEBUG_INFO("ECM Conntrack Notifier exit\n");
|
||||
-#ifdef CONFIG_NF_CONNTRACK_EVENTS
|
||||
+#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS
|
||||
+ nf_conntrack_unregister_chain_notifier(&init_net, &ecm_conntrack_notifier);
|
||||
+#else
|
||||
nf_conntrack_unregister_notifier(&init_net, &ecm_conntrack_notifier);
|
||||
#endif
|
||||
/*
|
|
@ -1,58 +0,0 @@
|
|||
From e6d701c0d454d841366c556b2ef07a5203ffb35d Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Fri, 21 May 2021 21:41:31 +0200
|
||||
Subject: [PATCH] More compile fixes
|
||||
|
||||
More runtime compile fixes.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
frontends/nss/ecm_nss_ported_ipv4.c | 12 +++---------
|
||||
frontends/nss/ecm_nss_ported_ipv6.c | 12 +++---------
|
||||
2 files changed, 6 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/frontends/nss/ecm_nss_ported_ipv4.c b/frontends/nss/ecm_nss_ported_ipv4.c
|
||||
index 3522f0f..7f5fcd1 100644
|
||||
--- a/frontends/nss/ecm_nss_ported_ipv4.c
|
||||
+++ b/frontends/nss/ecm_nss_ported_ipv4.c
|
||||
@@ -2935,14 +2935,8 @@ done:
|
||||
*/
|
||||
bool ecm_nss_ported_ipv4_debugfs_init(struct dentry *dentry)
|
||||
{
|
||||
- struct dentry *udp_dentry;
|
||||
-
|
||||
- udp_dentry = debugfs_create_u32("udp_accelerated_count", S_IRUGO, dentry,
|
||||
+ debugfs_create_u32("udp_accelerated_count", S_IRUGO, dentry,
|
||||
&ecm_nss_ported_ipv4_accelerated_count[ECM_NSS_PORTED_IPV4_PROTO_UDP]);
|
||||
- if (!udp_dentry) {
|
||||
- DEBUG_ERROR("Failed to create ecm nss ipv4 udp_accelerated_count file in debugfs\n");
|
||||
- return false;
|
||||
- }
|
||||
|
||||
debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
|
||||
&ecm_nss_ported_ipv4_accelerated_count[ECM_NSS_PORTED_IPV4_PROTO_TCP]);
|
||||
diff --git a/frontends/nss/ecm_nss_ported_ipv6.c b/frontends/nss/ecm_nss_ported_ipv6.c
|
||||
index f43ac95..e0f779c 100644
|
||||
--- a/frontends/nss/ecm_nss_ported_ipv6.c
|
||||
+++ b/frontends/nss/ecm_nss_ported_ipv6.c
|
||||
/*
|
||||
* ecm_nss_ported_ipv6_connection_callback()
|
||||
@@ -2723,14 +2723,8 @@ done:
|
||||
*/
|
||||
bool ecm_nss_ported_ipv6_debugfs_init(struct dentry *dentry)
|
||||
{
|
||||
- struct dentry *udp_dentry;
|
||||
-
|
||||
- udp_dentry = debugfs_create_u32("udp_accelerated_count", S_IRUGO, dentry,
|
||||
+ debugfs_create_u32("udp_accelerated_count", S_IRUGO, dentry,
|
||||
&ecm_nss_ported_ipv6_accelerated_count[ECM_NSS_PORTED_IPV6_PROTO_UDP]);
|
||||
- if (!udp_dentry) {
|
||||
- DEBUG_ERROR("Failed to create ecm nss ipv6 udp_accelerated_count file in debugfs\n");
|
||||
- return false;
|
||||
- }
|
||||
|
||||
debugfs_create_u32("tcp_accelerated_count", S_IRUGO, dentry,
|
||||
&ecm_nss_ported_ipv6_accelerated_count[ECM_NSS_PORTED_IPV6_PROTO_TCP]);
|
||||
--
|
||||
2.31.1
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
From 6924b71ed809b37fffd74d6428a8ca83e5919746 Mon Sep 17 00:00:00 2001
|
||||
From: Dirk Buchwalder <buchwalder@posteo.de>
|
||||
Date: Sun, 27 Jun 2021 16:52:39 +0200
|
||||
Subject: [PATCH] qca-nss-ecm: resolve the cpu high load regarding ecm
|
||||
|
||||
If using ECM, cpu load goes up (around 1.0) and stucks there.
|
||||
This is due to using uninterruptible sleep function,
|
||||
the patch changes this to interruptible sleep function.
|
||||
|
||||
Signed-off-by: Dirk Buchwalder buchwalder@posteo.de
|
||||
---
|
||||
frontends/nss/ecm_nss_ipv4.c | 4 ++--
|
||||
frontends/nss/ecm_nss_ipv6.c | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/frontends/nss/ecm_nss_ipv4.c b/frontends/nss/ecm_nss_ipv4.c
|
||||
index e00553c..94b39cd 100644
|
||||
--- a/frontends/nss/ecm_nss_ipv4.c
|
||||
+++ b/frontends/nss/ecm_nss_ipv4.c
|
||||
@@ -2471,7 +2471,7 @@ static void ecm_nss_ipv4_stats_sync_req_work(struct work_struct *work)
|
||||
}
|
||||
spin_unlock_bh(&ecm_nss_ipv4_lock);
|
||||
|
||||
- usleep_range(ECM_NSS_IPV4_STATS_SYNC_UDELAY - 100, ECM_NSS_IPV4_STATS_SYNC_UDELAY);
|
||||
+ msleep_interruptible(ECM_NSS_IPV4_STATS_SYNC_UDELAY / 1000);
|
||||
|
||||
/*
|
||||
* If index is 0, we are starting a new round, but if we still have time remain
|
||||
@@ -2485,7 +2485,7 @@ static void ecm_nss_ipv4_stats_sync_req_work(struct work_struct *work)
|
||||
}
|
||||
|
||||
if (time_after(ecm_nss_ipv4_next_req_time, current_jiffies)) {
|
||||
- msleep(jiffies_to_msecs(ecm_nss_ipv4_next_req_time - current_jiffies));
|
||||
+ msleep_interruptible(jiffies_to_msecs(ecm_nss_ipv4_next_req_time - current_jiffies));
|
||||
}
|
||||
ecm_nss_ipv4_roll_check_jiffies = jiffies;
|
||||
ecm_nss_ipv4_next_req_time = ecm_nss_ipv4_roll_check_jiffies + ECM_NSS_IPV4_STATS_SYNC_PERIOD;
|
||||
diff --git a/frontends/nss/ecm_nss_ipv6.c b/frontends/nss/ecm_nss_ipv6.c
|
||||
index 82e739f..30af050 100644
|
||||
--- a/frontends/nss/ecm_nss_ipv6.c
|
||||
+++ b/frontends/nss/ecm_nss_ipv6.c
|
||||
@@ -2210,7 +2210,7 @@ static void ecm_nss_ipv6_stats_sync_req_work(struct work_struct *work)
|
||||
}
|
||||
spin_unlock_bh(&ecm_nss_ipv6_lock);
|
||||
|
||||
- usleep_range(ECM_NSS_IPV6_STATS_SYNC_UDELAY - 100, ECM_NSS_IPV6_STATS_SYNC_UDELAY);
|
||||
+ msleep_interruptible(ECM_NSS_IPV6_STATS_SYNC_UDELAY / 1000);
|
||||
|
||||
/*
|
||||
* If index is 0, we are starting a new round, but if we still have time remain
|
||||
@@ -2224,7 +2224,7 @@ static void ecm_nss_ipv6_stats_sync_req_work(struct work_struct *work)
|
||||
}
|
||||
|
||||
if (time_after(ecm_nss_ipv6_next_req_time, current_jiffies)) {
|
||||
- msleep(jiffies_to_msecs(ecm_nss_ipv6_next_req_time - current_jiffies));
|
||||
+ msleep_interruptible(jiffies_to_msecs(ecm_nss_ipv6_next_req_time - current_jiffies));
|
||||
}
|
||||
ecm_nss_ipv6_roll_check_jiffies = jiffies;
|
||||
ecm_nss_ipv6_next_req_time = ecm_nss_ipv6_roll_check_jiffies + ECM_NSS_IPV6_STATS_SYNC_PERIOD;
|
||||
--
|
||||
2.31.1
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=qca-ssdk-shell
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_URL:=https://source.codeaurora.org/quic/cc-qrdk/oss/ssdk-shell
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2021-01-27
|
||||
PKG_SOURCE_VERSION:=5661366d471a78314bc7010f985ad8cc15be832a
|
||||
PKG_MIRROR_HASH:=73111e09e896f0abbe3ee1c358aea7ec14fe5e668ce8753b8968e03c78f9599b
|
||||
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/qca-ssdk-shell
|
||||
SECTION:=QCA
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Shell application for QCA SSDK
|
||||
endef
|
||||
|
||||
|
||||
define Package/qca-ssdk-shell/Description
|
||||
This package contains a qca-ssdk shell application for QCA chipset
|
||||
endef
|
||||
|
||||
ifndef CONFIG_TOOLCHAIN_BIN_PATH
|
||||
CONFIG_TOOLCHAIN_BIN_PATH=$(TOOLCHAIN_DIR)/bin
|
||||
endif
|
||||
|
||||
QCASSDK_CONFIG_OPTS+= TOOL_PATH=$(CONFIG_TOOLCHAIN_BIN_PATH) \
|
||||
SYS_PATH=$(LINUX_DIR) \
|
||||
TOOLPREFIX=$(TARGET_CROSS) \
|
||||
KVER=$(LINUX_VERSION) \
|
||||
CFLAGS="$(TARGET_CFLAGS)" \
|
||||
LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||
ARCH=$(LINUX_KARCH)
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) $(strip $(QCASSDK_CONFIG_OPTS))
|
||||
endef
|
||||
|
||||
define Package/qca-ssdk-shell/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/build/bin/ssdk_sh $(1)/usr/sbin/
|
||||
endef
|
||||
|
||||
|
||||
$(eval $(call BuildPackage,qca-ssdk-shell))
|
|
@ -1,91 +0,0 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=qca-ssdk
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_URL:=https://source.codeaurora.org/quic/cc-qrdk/oss/lklm/qca-ssdk
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2021-04-28
|
||||
PKG_SOURCE_VERSION:=c9bc3bc34eaaac78083573524097356e2dcc1b66
|
||||
PKG_MIRROR_HASH:=29db78529be32427b8b96fcbfec22a016a243676781ec96d9d65b810944fa405
|
||||
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/qca-ssdk-nohnat
|
||||
SECTION:=kernel
|
||||
CATEGORY:=Kernel modules
|
||||
SUBMENU:=Network Devices
|
||||
TITLE:=Kernel driver for QCA SSDK
|
||||
DEPENDS:=@(TARGET_ipq807x)
|
||||
FILES:=$(PKG_BUILD_DIR)/build/bin/qca-ssdk.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,qca-ssdk)
|
||||
endef
|
||||
|
||||
define KernelPackage/qca-ssdk-nohnat/Description
|
||||
This package contains a qca-ssdk driver for QCA chipset
|
||||
endef
|
||||
|
||||
GCC_VERSION=$(shell echo "$(CONFIG_GCC_VERSION)" | sed 's/[^0-9.]*\([0-9.]*\).*/\1/')
|
||||
|
||||
ifdef CONFIG_TOOLCHAIN_BIN_PATH
|
||||
TOOLCHAIN_BIN_PATH=$(CONFIG_TOOLCHAIN_BIN_PATH)
|
||||
else
|
||||
TOOLCHAIN_BIN_PATH=$(TOOLCHAIN_DIR)/bin
|
||||
endif
|
||||
|
||||
MAKE_FLAGS+= \
|
||||
TARGET_NAME=$(CONFIG_TARGET_NAME) \
|
||||
TOOL_PATH=$(TOOLCHAIN_BIN_PATH) \
|
||||
SYS_PATH=$(LINUX_DIR) \
|
||||
TOOLPREFIX=$(TARGET_CROSS) \
|
||||
KVER=$(LINUX_VERSION) \
|
||||
ARCH=$(LINUX_KARCH) \
|
||||
TARGET_SUFFIX=$(CONFIG_TARGET_SUFFIX) \
|
||||
GCC_VERSION=$(GCC_VERSION) \
|
||||
EXTRA_CFLAGS=-fno-stack-protector -I$(STAGING_DIR)/usr/include \
|
||||
$(KERNEL_MAKE_FLAGS)
|
||||
|
||||
ifneq (, $(findstring $(CONFIG_TARGET_BOARD), "ipq60xx" "ipq807x"))
|
||||
MAKE_FLAGS+= PTP_FEATURE=disable SWCONFIG_FEATURE=disable
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TARGET_BOARD), "ipq807x")
|
||||
MAKE_FLAGS+= CHIP_TYPE=HPPE
|
||||
else ifeq ($(CONFIG_TARGET_BOARD), "ipq60xx")
|
||||
MAKE_FLAGS+= CHIP_TYPE=CPPE
|
||||
endif
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include/qca-ssdk
|
||||
$(INSTALL_DIR) $(1)/usr/include/qca-ssdk/api
|
||||
$(INSTALL_DIR) $(1)/usr/include/qca-ssdk/ref
|
||||
$(INSTALL_DIR) $(1)/usr/include/qca-ssdk/fal
|
||||
$(INSTALL_DIR) $(1)/usr/include/qca-ssdk/sal
|
||||
$(INSTALL_DIR) $(1)/usr/include/qca-ssdk/init
|
||||
$(CP) -rf $(PKG_BUILD_DIR)/include/api/sw_ioctl.h $(1)/usr/include/qca-ssdk/api
|
||||
if [ -f $(PKG_BUILD_DIR)/include/ref/ref_vsi.h ]; then \
|
||||
$(CP) -rf $(PKG_BUILD_DIR)/include/ref/ref_vsi.h $(1)/usr/include/qca-ssdk/ref/; \
|
||||
fi
|
||||
if [ -f $(PKG_BUILD_DIR)/include/ref/ref_fdb.h ]; then \
|
||||
$(CP) -rf $(PKG_BUILD_DIR)/include/ref/ref_fdb.h $(1)/usr/include/qca-ssdk/ref/; \
|
||||
fi
|
||||
if [ -f $(PKG_BUILD_DIR)/include/ref/ref_port_ctrl.h ]; then \
|
||||
$(CP) -rf $(PKG_BUILD_DIR)/include/ref/ref_port_ctrl.h $(1)/usr/include/qca-ssdk/ref/; \
|
||||
fi
|
||||
if [ -f $(PKG_BUILD_DIR)/include/init/ssdk_init.h ]; then \
|
||||
$(CP) -rf $(PKG_BUILD_DIR)/include/init/ssdk_init.h $(1)/usr/include/qca-ssdk/init/; \
|
||||
fi
|
||||
$(CP) -rf $(PKG_BUILD_DIR)/include/fal $(1)/usr/include/qca-ssdk
|
||||
$(CP) -rf $(PKG_BUILD_DIR)/include/common/*.h $(1)/usr/include/qca-ssdk
|
||||
$(CP) -rf $(PKG_BUILD_DIR)/include/sal/os/linux/*.h $(1)/usr/include/qca-ssdk
|
||||
$(CP) -rf $(PKG_BUILD_DIR)/include/sal/os/*.h $(1)/usr/include/qca-ssdk
|
||||
|
||||
endef
|
||||
|
||||
define KernelPackage/qca-ssdk-nohnat/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/qca-ssdk $(1)/etc/init.d/qca-ssdk
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,qca-ssdk-nohnat))
|
|
@ -1,206 +0,0 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Permission to use, copy, modify, and/or distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
|
||||
START=16
|
||||
|
||||
#!/bin/sh
|
||||
ruletype="ip4 ip6"
|
||||
side="wan lan"
|
||||
qwan="1 3 2 0 5 7 6 4"
|
||||
qlan="0 1 2 3 4 5 6 7"
|
||||
|
||||
function create_war_acl_rules(){
|
||||
for lw in $side
|
||||
do
|
||||
#echo $lw
|
||||
if [ "$lw" == "wan" ];then
|
||||
listid=254
|
||||
queue=$qwan
|
||||
portmap=0x20
|
||||
else
|
||||
listid=255
|
||||
queue=$qlan
|
||||
portmap=0x1e
|
||||
fi
|
||||
#echo $queue
|
||||
#echo "creating list $listid"
|
||||
ssdk_sh acl list create $listid 255
|
||||
ruleid=0
|
||||
for rt in $ruletype
|
||||
do
|
||||
for qid in $queue
|
||||
do
|
||||
cmd="ssdk_sh acl rule add $listid $ruleid 1 n 0 0"
|
||||
#echo $cmd
|
||||
if [ "$rt" == "ip4" ];then
|
||||
cmd="$cmd ip4 n n n n n n n n n n n n n n n n n n n n n n n n n n n n n"
|
||||
#echo $cmd
|
||||
else
|
||||
cmd="$cmd ip6 n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n"
|
||||
#echo $cmd
|
||||
fi
|
||||
if [ $ruleid -le 3 ];then
|
||||
#non-zero dscp
|
||||
cmd="$cmd y 0x0 0xff"
|
||||
elif [ $ruleid -le 7 ];then
|
||||
#zero dscp
|
||||
cmd="$cmd n"
|
||||
elif [ $ruleid -le 11 ];then
|
||||
#non-zero dscp
|
||||
cmd="$cmd y 0x0 0xff"
|
||||
else
|
||||
#zero dscp
|
||||
cmd="$cmd n"
|
||||
fi
|
||||
p=$((ruleid/2))
|
||||
cmd="$cmd y mask $((ruleid%2)) 0x1 y mask $((p%2)) 0x1 n n n n n n n n n n n n n n n y n n n n n n n y $qid n n 0 0 n n n n n n n n n n n n n n n n n n n n 0"
|
||||
#echo $cmd
|
||||
$cmd
|
||||
ruleid=`expr $ruleid + 1`
|
||||
done
|
||||
done
|
||||
ssdk_sh acl list bind $listid 0 1 $portmap
|
||||
done
|
||||
}
|
||||
|
||||
function create_war_cosmap(){
|
||||
ssdk_sh cosmap pri2q set 0 0
|
||||
ssdk_sh cosmap pri2q set 1 0
|
||||
ssdk_sh cosmap pri2q set 2 0
|
||||
ssdk_sh cosmap pri2q set 3 0
|
||||
ssdk_sh cosmap pri2q set 4 1
|
||||
ssdk_sh cosmap pri2q set 5 1
|
||||
ssdk_sh cosmap pri2q set 6 1
|
||||
ssdk_sh cosmap pri2q set 7 1
|
||||
ssdk_sh cosmap pri2ehq set 0 0
|
||||
ssdk_sh cosmap pri2ehq set 1 0
|
||||
ssdk_sh cosmap pri2ehq set 2 0
|
||||
ssdk_sh cosmap pri2ehq set 3 0
|
||||
ssdk_sh cosmap pri2ehq set 4 1
|
||||
ssdk_sh cosmap pri2ehq set 5 1
|
||||
ssdk_sh cosmap pri2ehq set 6 1
|
||||
ssdk_sh cosmap pri2ehq set 7 1
|
||||
}
|
||||
|
||||
function create_acl_byp_egstp_rules(){
|
||||
ssdk_sh debug module_func set servcode 0xf 0x0 0x0
|
||||
ssdk_sh servcode config set 1 n 0 0xfffefc7f 0xffbdff 0 0 0 0 0 0
|
||||
ssdk_sh debug module_func set servcode 0x0 0x0 0x0
|
||||
ssdk_sh acl list create 56 48
|
||||
ssdk_sh acl rule add 56 0 1 n 0 0 mac n n n n n y 01-80-c2-00-00-00 ff-ff-ff-ff-ff-ff n n n n n n n n n n n n n n n n n n n n n n n y n n n n n n n n n n 0 0 n n n n n n n n n n n n n y n n n n n n n n n n n n y n n n n n n n n n n n n 0
|
||||
ssdk_sh acl rule add 56 1 1 n 0 0 mac n n n n n n n yes 0x8809 0xffff n n n n n n n n n n n n n n n n n n n n n y n n n n n n n n n n 0 0 n n n n n n n n n n n n n y n n n n n n n n n n n n y n n n n n n n n n n n n 0
|
||||
ssdk_sh acl rule add 56 2 1 n 0 0 mac n n n n n n n yes 0x888e 0xffff n n n n n n n n n n n n n n n n n n n n n y n n n n n n n n n n 0 0 n n n n n n n n n n n n n y n n n n n n n n n n n n y n n n n n n n n n n n n 0
|
||||
ssdk_sh acl list bind 56 0 2 1
|
||||
}
|
||||
|
||||
function delete_war_acl_rules(){
|
||||
for lw in $side
|
||||
do
|
||||
#echo $lw
|
||||
if [ "$lw" == "wan" ];then
|
||||
listid=254
|
||||
queue=$qwan
|
||||
portmap=0x20
|
||||
else
|
||||
listid=255
|
||||
queue=$qlan
|
||||
portmap=0x1e
|
||||
fi
|
||||
ssdk_sh acl list unbind $listid 0 1 $portmap
|
||||
for rt in $ruletype
|
||||
do
|
||||
for qid in $queue
|
||||
do
|
||||
cmd="ssdk_sh acl rule del $listid 0 1"
|
||||
echo $cmd
|
||||
$cmd
|
||||
done
|
||||
done
|
||||
#echo "deleting list $listid"
|
||||
ssdk_sh acl list destroy $listid
|
||||
done
|
||||
}
|
||||
|
||||
function delete_war_cosmap(){
|
||||
ssdk_sh cosmap pri2q set 0 0
|
||||
ssdk_sh cosmap pri2q set 1 0
|
||||
ssdk_sh cosmap pri2q set 2 1
|
||||
ssdk_sh cosmap pri2q set 3 1
|
||||
ssdk_sh cosmap pri2q set 4 2
|
||||
ssdk_sh cosmap pri2q set 5 2
|
||||
ssdk_sh cosmap pri2q set 6 3
|
||||
ssdk_sh cosmap pri2q set 7 3
|
||||
ssdk_sh cosmap pri2ehq set 0 1
|
||||
ssdk_sh cosmap pri2ehq set 1 0
|
||||
ssdk_sh cosmap pri2ehq set 2 2
|
||||
ssdk_sh cosmap pri2ehq set 3 2
|
||||
ssdk_sh cosmap pri2ehq set 4 3
|
||||
ssdk_sh cosmap pri2ehq set 5 3
|
||||
ssdk_sh cosmap pri2ehq set 6 4
|
||||
ssdk_sh cosmap pri2ehq set 7 5
|
||||
}
|
||||
|
||||
function delete_acl_byp_egstp_rules(){
|
||||
ssdk_sh debug module_func set servcode 0xf 0x0 0x0
|
||||
ssdk_sh servcode config set 1 n 0 0xfffefcff 0xffbfff 0 0 0 0 0 0
|
||||
ssdk_sh debug module_func set servcode 0x0 0x0 0x0
|
||||
ssdk_sh acl list unbind 56 0 2 1
|
||||
ssdk_sh acl rule del 56 0 1
|
||||
ssdk_sh acl rule del 56 1 1
|
||||
ssdk_sh acl rule del 56 2 1
|
||||
ssdk_sh acl list destroy 56
|
||||
}
|
||||
|
||||
function edma_war_config_add(){
|
||||
create_war_cosmap
|
||||
ssdk_sh acl status set enable
|
||||
create_war_acl_rules
|
||||
}
|
||||
|
||||
function edma_war_config_del(){
|
||||
delete_war_acl_rules
|
||||
delete_war_cosmap
|
||||
}
|
||||
|
||||
start() {
|
||||
chip_ver=`ssdk_sh debug reg get 0 4 | grep Data | tr -d 'SSDK Init OK![Data]:'`
|
||||
#The following commands should be uncommented to enable EDMA WAR
|
||||
if [ "$chip_ver" = "0x1401" ]; then
|
||||
#edma_war_config_add
|
||||
echo ''
|
||||
fi
|
||||
#The following commands should be uncommented to add acl egress stp bypass rules
|
||||
if [ "$chip_ver" = "0x1500" ] || [ "$chip_ver" = "0x1501" ]; then
|
||||
#create_acl_byp_egstp_rules
|
||||
echo ''
|
||||
fi
|
||||
echo starting
|
||||
}
|
||||
|
||||
stop() {
|
||||
chip_ver=`ssdk_sh debug reg get 0 4 | grep Data | tr -d 'SSDK Init OK![Data]:'`
|
||||
#The following commands should be uncommented to disable EDMA WAR
|
||||
if [ "$chip_ver" = "0x1401" ]; then
|
||||
#edma_war_config_del
|
||||
echo ''
|
||||
fi
|
||||
#The following commands should be uncommented to delete acl egress stp bypass rules
|
||||
if [ "$chip_ver" = "0x1500" ] || [ "$chip_ver" = "0x1501" ]; then
|
||||
#delete_acl_byp_egstp_rules
|
||||
echo ''
|
||||
fi
|
||||
echo stoping
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
From 472c0c8132784608312c80c4b02c03ea7c132235 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Wed, 12 May 2021 13:41:12 +0200
|
||||
Subject: [PATCH] SSDK: config: add kernel 5.10
|
||||
|
||||
This is purely to identify it and be able to set
|
||||
flags correctly.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
config | 6 +++++-
|
||||
make/linux_opt.mk | 4 ++--
|
||||
2 files changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/config
|
||||
+++ b/config
|
||||
@@ -22,6 +22,10 @@ ifeq ($(KVER),$(filter 5.4%,$(KVER)))
|
||||
OS_VER=5_4
|
||||
endif
|
||||
|
||||
+ifeq ($(KVER),$(filter 5.10%,$(KVER)))
|
||||
+OS_VER=5_10
|
||||
+endif
|
||||
+
|
||||
ifeq ($(KVER), 3.4.0)
|
||||
OS_VER=3_4
|
||||
endif
|
||||
@@ -123,7 +127,7 @@ endif
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH), arm64)
|
||||
-ifeq ($(KVER),$(filter 4.1% 4.4% 4.9% 5.4%,$(KVER)))
|
||||
+ifeq ($(KVER),$(filter 4.1% 4.4% 4.9% 5.4% 5.10%,$(KVER)))
|
||||
CPU_CFLAG= -DMODULE -Os -pipe -march=armv8-a -mcpu=cortex-a53+crypto -fno-caller-saves -fno-strict-aliasing -Werror -fno-common -Wno-format-security -Wno-pointer-sign -Wno-unused-but-set-variable -Wno-error=unused-result -mcmodel=large
|
||||
endif
|
||||
endif
|
||||
--- a/make/linux_opt.mk
|
||||
+++ b/make/linux_opt.mk
|
||||
@@ -388,7 +388,7 @@ ifeq (KSLIB, $(MODULE_TYPE))
|
||||
KASAN_SHADOW_SCALE_SHIFT := 3
|
||||
endif
|
||||
|
||||
- ifeq (5_4, $(OS_VER))
|
||||
+ ifeq ($(OS_VER),$(filter 5_4 5_10, $(OS_VER)))
|
||||
ifeq ($(ARCH), arm64)
|
||||
KASAN_OPTION += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
|
||||
endif
|
||||
@@ -419,7 +419,7 @@ ifeq (KSLIB, $(MODULE_TYPE))
|
||||
|
||||
endif
|
||||
|
||||
- ifeq ($(OS_VER),$(filter 4_4 5_4, $(OS_VER)))
|
||||
+ ifeq ($(OS_VER),$(filter 4_4 5_4 5_10, $(OS_VER)))
|
||||
MODULE_CFLAG += -DKVER34
|
||||
MODULE_CFLAG += -DKVER32
|
||||
MODULE_CFLAG += -DLNX26_22
|
|
@ -1,102 +0,0 @@
|
|||
From 784f2cfdfaf3bdf44917924e157049230a0ef5f8 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Wed, 12 May 2021 13:45:45 +0200
|
||||
Subject: [PATCH] SSDK: replace ioremap_nocache with ioremap
|
||||
|
||||
ioremap_nocache was dropped upstream, simply use the
|
||||
generic variety.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
src/init/ssdk_clk.c | 10 +++++-----
|
||||
src/init/ssdk_init.c | 2 +-
|
||||
src/init/ssdk_plat.c | 6 +++---
|
||||
3 files changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
--- a/src/init/ssdk_clk.c
|
||||
+++ b/src/init/ssdk_clk.c
|
||||
@@ -623,7 +623,7 @@ ssdk_mp_tcsr_get(a_uint32_t tcsr_offset,
|
||||
{
|
||||
void __iomem *tcsr_base = NULL;
|
||||
|
||||
- tcsr_base = ioremap_nocache(TCSR_ETH_ADDR, TCSR_ETH_SIZE);
|
||||
+ tcsr_base = ioremap(TCSR_ETH_ADDR, TCSR_ETH_SIZE);
|
||||
if (!tcsr_base)
|
||||
{
|
||||
SSDK_ERROR("Failed to map tcsr eth address!\n");
|
||||
@@ -640,7 +640,7 @@ ssdk_mp_tcsr_set(a_uint32_t tcsr_offset,
|
||||
{
|
||||
void __iomem *tcsr_base = NULL;
|
||||
|
||||
- tcsr_base = ioremap_nocache(TCSR_ETH_ADDR, TCSR_ETH_SIZE);
|
||||
+ tcsr_base = ioremap(TCSR_ETH_ADDR, TCSR_ETH_SIZE);
|
||||
if (!tcsr_base)
|
||||
{
|
||||
SSDK_ERROR("Failed to map tcsr eth address!\n");
|
||||
@@ -688,7 +688,7 @@ ssdk_mp_cmnblk_stable_check(void)
|
||||
a_uint32_t reg_val;
|
||||
int i, loops = 20;
|
||||
|
||||
- pll_lock = ioremap_nocache(CMN_PLL_LOCKED_ADDR, CMN_PLL_LOCKED_SIZE);
|
||||
+ pll_lock = ioremap(CMN_PLL_LOCKED_ADDR, CMN_PLL_LOCKED_SIZE);
|
||||
if (!pll_lock) {
|
||||
SSDK_ERROR("Failed to map CMN PLL LOCK register!\n");
|
||||
return A_FALSE;
|
||||
@@ -745,7 +745,7 @@ static void ssdk_cmnblk_pll_src_set(enum
|
||||
void __iomem *cmn_pll_src_base = NULL;
|
||||
a_uint32_t reg_val;
|
||||
|
||||
- cmn_pll_src_base = ioremap_nocache(CMN_BLK_PLL_SRC_ADDR, CMN_BLK_SIZE);
|
||||
+ cmn_pll_src_base = ioremap(CMN_BLK_PLL_SRC_ADDR, CMN_BLK_SIZE);
|
||||
if (!cmn_pll_src_base) {
|
||||
SSDK_ERROR("Failed to map cmn pll source address!\n");
|
||||
return;
|
||||
@@ -766,7 +766,7 @@ static void ssdk_cmnblk_init(enum cmnblk
|
||||
void __iomem *gcc_pll_base = NULL;
|
||||
a_uint32_t reg_val;
|
||||
|
||||
- gcc_pll_base = ioremap_nocache(CMN_BLK_ADDR, CMN_BLK_SIZE);
|
||||
+ gcc_pll_base = ioremap(CMN_BLK_ADDR, CMN_BLK_SIZE);
|
||||
if (!gcc_pll_base) {
|
||||
SSDK_ERROR("Failed to map gcc pll address!\n");
|
||||
return;
|
||||
--- a/src/init/ssdk_init.c
|
||||
+++ b/src/init/ssdk_init.c
|
||||
@@ -2770,7 +2770,7 @@ static int ssdk_dess_mac_mode_init(a_uin
|
||||
(a_uint8_t *)®_value, 4);
|
||||
mdelay(10);
|
||||
/*softreset psgmii, fixme*/
|
||||
- gcc_addr = ioremap_nocache(0x1812000, 0x200);
|
||||
+ gcc_addr = ioremap(0x1812000, 0x200);
|
||||
if (!gcc_addr) {
|
||||
SSDK_ERROR("gcc map fail!\n");
|
||||
return 0;
|
||||
--- a/src/init/ssdk_plat.c
|
||||
+++ b/src/init/ssdk_plat.c
|
||||
@@ -1312,7 +1312,7 @@ ssdk_plat_init(ssdk_init_cfg *cfg, a_uin
|
||||
reg_mode = ssdk_uniphy_reg_access_mode_get(dev_id);
|
||||
if(reg_mode == HSL_REG_LOCAL_BUS) {
|
||||
ssdk_uniphy_reg_map_info_get(dev_id, &map);
|
||||
- qca_phy_priv_global[dev_id]->uniphy_hw_addr = ioremap_nocache(map.base_addr,
|
||||
+ qca_phy_priv_global[dev_id]->uniphy_hw_addr = ioremap(map.base_addr,
|
||||
map.size);
|
||||
if (!qca_phy_priv_global[dev_id]->uniphy_hw_addr) {
|
||||
SSDK_ERROR("%s ioremap fail.", __func__);
|
||||
@@ -1327,7 +1327,7 @@ ssdk_plat_init(ssdk_init_cfg *cfg, a_uin
|
||||
reg_mode = ssdk_switch_reg_access_mode_get(dev_id);
|
||||
if(reg_mode == HSL_REG_LOCAL_BUS) {
|
||||
ssdk_switch_reg_map_info_get(dev_id, &map);
|
||||
- qca_phy_priv_global[dev_id]->hw_addr = ioremap_nocache(map.base_addr,
|
||||
+ qca_phy_priv_global[dev_id]->hw_addr = ioremap(map.base_addr,
|
||||
map.size);
|
||||
if (!qca_phy_priv_global[dev_id]->hw_addr) {
|
||||
SSDK_ERROR("%s ioremap fail.", __func__);
|
||||
@@ -1358,7 +1358,7 @@ ssdk_plat_init(ssdk_init_cfg *cfg, a_uin
|
||||
return -1;
|
||||
}
|
||||
|
||||
- qca_phy_priv_global[dev_id]->psgmii_hw_addr = ioremap_nocache(map.base_addr,
|
||||
+ qca_phy_priv_global[dev_id]->psgmii_hw_addr = ioremap(map.base_addr,
|
||||
map.size);
|
||||
if (!qca_phy_priv_global[dev_id]->psgmii_hw_addr) {
|
||||
SSDK_ERROR("%s ioremap fail.", __func__);
|
|
@ -1,44 +0,0 @@
|
|||
From 440ab349813e5aa9dbeddab4d82ab64ff5347c5f Mon Sep 17 00:00:00 2001
|
||||
From: Dirk Buchwalder <buchwalder@posteo.de>
|
||||
Date: Sat, 30 Oct 2021 19:51:06 +0200
|
||||
Subject: [PATCH] add aquantia phy id 113CB0 / 0x31c31C12
|
||||
|
||||
This adds support for the AQR113C with the id
|
||||
"113CB0 / 0x31c31C12" to the ssdk.
|
||||
|
||||
This is used in the QNAP 301w
|
||||
|
||||
Signed-off-by: Dirk Buchwalder <buchwalder@posteo.de>
|
||||
|
||||
---
|
||||
include/hsl/phy/hsl_phy.h | 1 +
|
||||
src/hsl/phy/hsl_phy.c | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/include/hsl/phy/hsl_phy.h b/include/hsl/phy/hsl_phy.h
|
||||
index 4621e725..7551574a 100755
|
||||
--- a/include/hsl/phy/hsl_phy.h
|
||||
+++ b/include/hsl/phy/hsl_phy.h
|
||||
@@ -579,6 +579,7 @@ typedef struct {
|
||||
#define AQUANTIA_PHY_112 0x03a1b660
|
||||
#define AQUANTIA_PHY_113C_A0 0x31c31C10
|
||||
#define AQUANTIA_PHY_113C_A1 0x31c31C11
|
||||
+#define AQUANTIA_PHY_113CB0 0x31c31C12
|
||||
#define AQUANTIA_PHY_112C 0x03a1b792
|
||||
|
||||
#define PHY_805XV2 0x004DD082
|
||||
diff --git a/src/hsl/phy/hsl_phy.c b/src/hsl/phy/hsl_phy.c
|
||||
index 5866a522..02e6aeea 100755
|
||||
--- a/src/hsl/phy/hsl_phy.c
|
||||
+++ b/src/hsl/phy/hsl_phy.c
|
||||
@@ -235,6 +235,7 @@ phy_type_t hsl_phytype_get_by_phyid(a_uint32_t dev_id, a_uint32_t phy_id)
|
||||
case AQUANTIA_PHY_112:
|
||||
case AQUANTIA_PHY_113C_A0:
|
||||
case AQUANTIA_PHY_113C_A1:
|
||||
+ case AQUANTIA_PHY_113CB0:
|
||||
case AQUANTIA_PHY_112C:
|
||||
phytype = AQUANTIA_PHY_CHIP;
|
||||
break;
|
||||
--
|
||||
2.31.1
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
From b6190ca46287d01a895c7cc14de30410c09ff1b8 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Wed, 12 May 2021 17:15:46 +0200
|
||||
Subject: [PATCH] SSDK: platform: use of_mdio_find_bus() to get MDIO bus
|
||||
|
||||
Kernel has a generic of_mdio_find_bus() which can get the appropriate
|
||||
MDIO bus based on the DT node.
|
||||
So, drop the getting MDIO from platform data, which no longer works
|
||||
in 5.4 and later and use of_mdio_find_bus().
|
||||
|
||||
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
src/init/ssdk_plat.c | 8 +-------
|
||||
1 file changed, 1 insertion(+), 7 deletions(-)
|
||||
|
||||
--- a/src/init/ssdk_plat.c
|
||||
+++ b/src/init/ssdk_plat.c
|
||||
@@ -551,7 +551,6 @@ static int miibus_get(a_uint32_t dev_id)
|
||||
struct device_node *mdio_node = NULL;
|
||||
struct device_node *switch_node = NULL;
|
||||
struct platform_device *mdio_plat = NULL;
|
||||
- struct ipq40xx_mdio_data *mdio_data = NULL;
|
||||
struct qca_phy_priv *priv;
|
||||
hsl_reg_mode reg_mode = HSL_REG_LOCAL_BUS;
|
||||
priv = qca_phy_priv_global[dev_id];
|
||||
@@ -584,12 +583,7 @@ static int miibus_get(a_uint32_t dev_id)
|
||||
|
||||
if(reg_mode == HSL_REG_LOCAL_BUS)
|
||||
{
|
||||
- mdio_data = dev_get_drvdata(&mdio_plat->dev);
|
||||
- if (!mdio_data) {
|
||||
- SSDK_ERROR("cannot get mdio_data reference from device data\n");
|
||||
- return 1;
|
||||
- }
|
||||
- priv->miibus = mdio_data->mii_bus;
|
||||
+ priv->miibus = of_mdio_find_bus(mdio_node);
|
||||
}
|
||||
else
|
||||
priv->miibus = dev_get_drvdata(&mdio_plat->dev);
|
|
@ -1,47 +0,0 @@
|
|||
From f3a7b93137c1a6a1b8010b86296242178eed5d9e Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Fri, 13 Aug 2021 20:03:21 +0200
|
||||
Subject: [PATCH] SSDK: dts: fix of_get_mac_address()
|
||||
|
||||
Recently OpenWrt backported the updated of_get_mac_address()
|
||||
function which returns and error code instead.
|
||||
|
||||
So, patch the SSDK to use it and fix the compilation error.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
src/init/ssdk_dts.c | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/init/ssdk_dts.c b/src/init/ssdk_dts.c
|
||||
index 21804970..257bbf71 100644
|
||||
--- a/src/init/ssdk_dts.c
|
||||
+++ b/src/init/ssdk_dts.c
|
||||
@@ -779,8 +779,9 @@ static void ssdk_dt_parse_intf_mac(void)
|
||||
{
|
||||
struct device_node *dp_node = NULL;
|
||||
a_uint32_t dp = 0;
|
||||
- a_uint8_t *maddr = NULL;
|
||||
+ u8 maddr[ETH_ALEN];
|
||||
char dp_name[8] = {0};
|
||||
+ int ret;
|
||||
|
||||
for (dp = 1; dp <= SSDK_MAX_NR_ETH; dp++) {
|
||||
snprintf(dp_name, sizeof(dp_name), "dp%d", dp);
|
||||
@@ -788,11 +789,11 @@ static void ssdk_dt_parse_intf_mac(void)
|
||||
if (!dp_node) {
|
||||
continue;
|
||||
}
|
||||
- maddr = (a_uint8_t *)of_get_mac_address(dp_node);
|
||||
+ ret = of_get_mac_address(dp_node, maddr);
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0))
|
||||
if (maddr && is_valid_ether_addr(maddr)) {
|
||||
#else
|
||||
- if (!IS_ERR(maddr) && is_valid_ether_addr(maddr)) {
|
||||
+ if (!ret && is_valid_ether_addr(maddr)) {
|
||||
#endif
|
||||
ssdk_dt_global.num_intf_mac++;
|
||||
ether_addr_copy(ssdk_dt_global.intf_mac[dp-1].uc, maddr);
|
||||
--
|
||||
2.31.1
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2015 OpenWrt.org
|
||||
#
|
||||
|
@ -45,6 +46,14 @@ engenius,ens620ext)
|
|||
ucidef_set_led_netdev "lan1" "LAN1" "green:lan1" "eth0"
|
||||
ucidef_set_led_netdev "lan2" "LAN2" "green:lan2" "eth1"
|
||||
;;
|
||||
mikrotik,sxtsq-5-ac)
|
||||
ucidef_set_rssimon "wlan0" "200000" "1"
|
||||
ucidef_set_led_rssi "rssilow" "rssilow" "green:rssilow" "wlan0" "1" "100"
|
||||
ucidef_set_led_rssi "rssimediumlow" "rssimediumlow" "green:rssimediumlow" "wlan0" "21" "100"
|
||||
ucidef_set_led_rssi "rssimedium" "rssimedium" "green:rssimedium" "wlan0" "41" "100"
|
||||
ucidef_set_led_rssi "rssimediumhigh" "rssimediumhigh" "green:rssimediumhigh" "wlan0" "61" "100"
|
||||
ucidef_set_led_rssi "rssihigh" "rssihigh" "green:rssihigh" "wlan0" "81" "100"
|
||||
;;
|
||||
mobipromo,cm520-79f)
|
||||
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1"
|
||||
ucidef_set_led_switch "lan1" "LAN1" "blue:lan1" "switch0" "0x10"
|
||||
|
@ -66,14 +75,6 @@ zbt,z4019)
|
|||
ucidef_set_led_netdev "wwan1" "4G1" "green:4g2" "wwan1"
|
||||
ucidef_set_led_netdev "wwan2" "4G2" "green:4g3" "wwan2"
|
||||
;;
|
||||
8dev,jalapeno)
|
||||
ucidef_set_led_default "power" "POWER" "blue:power" "1"
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wlan2g" "phy0tpt"
|
||||
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1"
|
||||
ucidef_set_led_netdev "4g1" "4g1" "blue:4g1" "4g1"
|
||||
ucidef_set_led_netdev "4g2" "4g2" "blue:4g2" "4g2"
|
||||
ucidef_set_led_netdev "4g3" "4g3" "blue:4g3" "4g3"
|
||||
;;
|
||||
netgear,ex6100v2 |\
|
||||
netgear,ex6150v2)
|
||||
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:router" "phy0tpt"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2015 The Linux Foundation. All rights reserved.
|
||||
# Copyright (c) 2011-2015 OpenWrt.org
|
||||
|
@ -28,6 +29,7 @@ ipq40xx_setup_interfaces()
|
|||
engenius,eap1300|\
|
||||
engenius,emd1|\
|
||||
meraki,mr33|\
|
||||
mikrotik,sxtsq-5-ac|\
|
||||
netgear,ex6100v2|\
|
||||
netgear,ex6150v2|\
|
||||
zyxel,wre6606)
|
||||
|
@ -47,6 +49,7 @@ ipq40xx_setup_interfaces()
|
|||
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
||||
;;
|
||||
asus,rt-ac58u|\
|
||||
mikrotik,hap-ac2|\
|
||||
zyxel,nbg6617)
|
||||
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
|
@ -54,7 +57,7 @@ ipq40xx_setup_interfaces()
|
|||
;;
|
||||
avm,fritzbox-4040|\
|
||||
linksys,ea6350v3|\
|
||||
pangu,l1000|\
|
||||
pangu,l1000|\
|
||||
linksys,ea8300|\
|
||||
linksys,mr8300)
|
||||
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
||||
|
@ -110,7 +113,7 @@ ipq40xx_setup_interfaces()
|
|||
ucidef_add_switch "switch0" \
|
||||
"0u@eth0" "3:lan" "4:lan" "0u@eth1" "5:wan"
|
||||
;;
|
||||
zbt,z4019)
|
||||
zbt,z4019)
|
||||
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
||||
ucidef_add_switch "switch0" \
|
||||
"0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
|
||||
|
@ -164,7 +167,7 @@ ipq40xx_setup_macs()
|
|||
lan_mac=$(mtd_get_mac_ascii 0:APPSBLENV ethaddr)
|
||||
label_mac=$wan_mac
|
||||
;;
|
||||
zbt,z4019)
|
||||
zbt,z4019)
|
||||
wan_mac=$(mtd_get_mac_binary "0:ART" 0x0)
|
||||
lan_mac=$(mtd_get_mac_binary "0:ART" 0x6)
|
||||
;;
|
||||
|
@ -179,6 +182,15 @@ ipq40xx_setup_macs()
|
|||
wan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
||||
lan_mac=$(macaddr_add "$wan_mac" 1)
|
||||
;;
|
||||
mikrotik,hap-ac2)
|
||||
wan_mac=$(cat /sys/firmware/mikrotik/hard_config/mac_base)
|
||||
lan_mac=$(macaddr_add $wan_mac 1)
|
||||
label_mac="$wan_mac"
|
||||
;;
|
||||
mikrotik,sxtsq-5-ac)
|
||||
lan_mac=$(cat /sys/firmware/mikrotik/hard_config/mac_base)
|
||||
label_mac="$lan_mac"
|
||||
;;
|
||||
esac
|
||||
|
||||
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
|
||||
|
|
|
@ -9,10 +9,14 @@ board=$(board_name)
|
|||
case "$FIRMWARE" in
|
||||
"ath10k/cal-pci-0000:01:00.0.bin")
|
||||
case "$board" in
|
||||
pangu,l1000)
|
||||
caldata_extract "ART" 0x1000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 2)
|
||||
;;
|
||||
meraki,mr33)
|
||||
caldata_extract_ubi "ART" 0x9000 0x844
|
||||
caldata_valid "4408" || caldata_extract "ART" 0x9000 0x844
|
||||
ath10k_patch_mac $(macaddr_add $(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) 1)
|
||||
ath10k_patch_mac $(macaddr_add $(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) +1)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
@ -128,7 +132,7 @@ case "$FIRMWARE" in
|
|||
;;
|
||||
engenius,ens620ext)
|
||||
caldata_extract "ART" 0x1000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 2)
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +2)
|
||||
;;
|
||||
linksys,ea8300 |\
|
||||
linksys,mr8300)
|
||||
|
@ -142,7 +146,7 @@ case "$FIRMWARE" in
|
|||
meraki,mr33)
|
||||
caldata_extract_ubi "ART" 0x1000 0x2f20
|
||||
caldata_valid "202f" || caldata_extract "ART" 0x1000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add $(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) 2)
|
||||
ath10k_patch_mac $(macaddr_add $(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) +2)
|
||||
;;
|
||||
mikrotik,hap-ac2)
|
||||
wlan_data="/sys/firmware/mikrotik/hard_config/wlan_data"
|
||||
|
@ -154,10 +158,6 @@ case "$FIRMWARE" in
|
|||
caldata_extract "ART" 0x1000 0x2f20
|
||||
ath10k_patch_mac $(mtd_get_mac_binary dnidata 0x0)
|
||||
;;
|
||||
netgear,wac510)
|
||||
caldata_extract "0:ART" 0x1000 0x2f20
|
||||
ath10k_patch_mac $(mtd_get_mac_binary "0:MANUDATA" 0x6)
|
||||
;;
|
||||
zyxel,nbg6617 |\
|
||||
zyxel,wre6606)
|
||||
caldata_extract "ART" 0x1000 0x2f20
|
||||
|
@ -188,7 +188,7 @@ case "$FIRMWARE" in
|
|||
aruba,ap-303h |\
|
||||
aruba,ap-365)
|
||||
caldata_extract "ART" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary mfginfo 0x1D) 1)
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary mfginfo 0x1D) +1)
|
||||
;;
|
||||
asus,map-ac2200)
|
||||
caldata_extract_ubi "Factory" 0x5000 0x2f20
|
||||
|
@ -241,15 +241,15 @@ case "$FIRMWARE" in
|
|||
;;
|
||||
engenius,emd1)
|
||||
caldata_extract "0:ART" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:APPSBLENV wlanaddr) 1)
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:APPSBLENV wlanaddr) +1)
|
||||
;;
|
||||
engenius,emr3500)
|
||||
caldata_extract "0:ART" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:APPSBLENV ethaddr) 1)
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:APPSBLENV ethaddr) +1)
|
||||
;;
|
||||
engenius,ens620ext)
|
||||
caldata_extract "ART" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 3)
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +3)
|
||||
;;
|
||||
linksys,ea8300 |\
|
||||
linksys,mr8300)
|
||||
|
@ -263,7 +263,7 @@ case "$FIRMWARE" in
|
|||
meraki,mr33)
|
||||
caldata_extract_ubi "ART" 0x5000 0x2f20
|
||||
caldata_valid "202f" || caldata_extract "ART" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add $(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) 3)
|
||||
ath10k_patch_mac $(macaddr_add $(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66) +3)
|
||||
;;
|
||||
mikrotik,hap-ac2|\
|
||||
mikrotik,sxtsq-5-ac)
|
||||
|
@ -276,10 +276,6 @@ case "$FIRMWARE" in
|
|||
caldata_extract "ART" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(mtd_get_mac_binary dnidata 0xc)
|
||||
;;
|
||||
netgear,wac510)
|
||||
caldata_extract "0:ART" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary "0:MANUDATA" 0x6) 16)
|
||||
;;
|
||||
zyxel,nbg6617 |\
|
||||
zyxel,wre6606)
|
||||
caldata_extract "ART" 0x5000 0x2f20
|
||||
|
|
|
@ -119,4 +119,4 @@ platform_do_upgrade_linksys() {
|
|||
get_image "$1" | mtd write - "$part_label"
|
||||
fi
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,106 +0,0 @@
|
|||
# The U-Boot loader of the OpenMesh devices requires image sizes and
|
||||
# checksums to be provided in the U-Boot environment.
|
||||
# The OpenMesh devices come with 2 main partitions - while one is active
|
||||
# sysupgrade will flash the other. The boot order is changed to boot the
|
||||
# newly flashed partition. If the new partition can't be booted due to
|
||||
# upgrade failures the previously used partition is loaded.
|
||||
|
||||
platform_do_upgrade_openmesh() {
|
||||
local tar_file="$1"
|
||||
local restore_backup
|
||||
local primary_kernel_mtd
|
||||
|
||||
local setenv_script="/tmp/fw_env_upgrade"
|
||||
|
||||
local kernel_mtd="$(find_mtd_index $PART_NAME)"
|
||||
local kernel_offset="$(cat /sys/class/mtd/mtd${kernel_mtd}/offset)"
|
||||
local total_size="$(cat /sys/class/mtd/mtd${kernel_mtd}/size)"
|
||||
|
||||
# detect to which flash region the new image is written to.
|
||||
#
|
||||
# 1. check what is the mtd index for the first flash region on this
|
||||
# device
|
||||
# 2. check if the target partition ("inactive") has the mtd index of
|
||||
# the first flash region
|
||||
#
|
||||
# - when it is: the new bootseq will be 1,2 and the first region is
|
||||
# modified
|
||||
# - when it isnt: bootseq will be 2,1 and the second region is
|
||||
# modified
|
||||
#
|
||||
# The detection has to be done via the hardcoded mtd partition because
|
||||
# the current boot might be done with the fallback region. Let us
|
||||
# assume that the current bootseq is 1,2. The bootloader detected that
|
||||
# the image in flash region 1 is corrupt and thus switches to flash
|
||||
# region 2. The bootseq in the u-boot-env is now still the same and
|
||||
# the sysupgrade code can now only rely on the actual mtd indexes and
|
||||
# not the bootseq variable to detect the currently booted flash
|
||||
# region/image.
|
||||
#
|
||||
# In the above example, an implementation which uses bootseq ("1,2") to
|
||||
# detect the currently booted image would assume that region 1 is booted
|
||||
# and then overwrite the variables for the wrong flash region (aka the
|
||||
# one which isn't modified). This could result in a device which doesn't
|
||||
# boot anymore to Linux until it was reflashed with ap51-flash.
|
||||
local next_boot_part="1"
|
||||
case "$(board_name)" in
|
||||
openmesh,a42)
|
||||
primary_kernel_mtd=8
|
||||
;;
|
||||
openmesh,a62)
|
||||
primary_kernel_mtd=10
|
||||
;;
|
||||
*)
|
||||
echo "failed to detect primary kernel mtd partition for board"
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
[ "$kernel_mtd" = "$primary_kernel_mtd" ] || next_boot_part="2"
|
||||
|
||||
local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$')
|
||||
board_dir=${board_dir%/}
|
||||
|
||||
local kernel_length=$(tar xf $tar_file ${board_dir}/kernel -O | wc -c)
|
||||
local rootfs_length=$(tar xf $tar_file ${board_dir}/root -O | wc -c)
|
||||
# rootfs without EOF marker
|
||||
rootfs_length=$((rootfs_length-4))
|
||||
|
||||
local kernel_md5=$(tar xf $tar_file ${board_dir}/kernel -O | md5sum); kernel_md5="${kernel_md5%% *}"
|
||||
# md5 checksum of rootfs with EOF marker
|
||||
local rootfs_md5=$(tar xf $tar_file ${board_dir}/root -O | dd bs=1 count=$rootfs_length | md5sum); rootfs_md5="${rootfs_md5%% *}"
|
||||
|
||||
#
|
||||
# add tar support to get_image() to use default_do_upgrade() instead?
|
||||
#
|
||||
|
||||
# take care of restoring a saved config
|
||||
[ -n "$UPGRADE_BACKUP" ] && restore_backup="${MTD_CONFIG_ARGS} -j ${UPGRADE_BACKUP}"
|
||||
|
||||
mtd -q erase inactive
|
||||
tar xf $tar_file ${board_dir}/root -O | mtd -n -p $kernel_length $restore_backup write - $PART_NAME
|
||||
tar xf $tar_file ${board_dir}/kernel -O | mtd -n write - $PART_NAME
|
||||
|
||||
# prepare new u-boot env
|
||||
if [ "$next_boot_part" = "1" ]; then
|
||||
echo "bootseq 1,2" > $setenv_script
|
||||
else
|
||||
echo "bootseq 2,1" > $setenv_script
|
||||
fi
|
||||
|
||||
printf "kernel_size_%i 0x%08x\n" $next_boot_part $kernel_length >> $setenv_script
|
||||
printf "vmlinux_start_addr 0x%08x\n" ${kernel_offset} >> $setenv_script
|
||||
printf "vmlinux_size 0x%08x\n" ${kernel_length} >> $setenv_script
|
||||
printf "vmlinux_checksum %s\n" ${kernel_md5} >> $setenv_script
|
||||
|
||||
printf "rootfs_size_%i 0x%08x\n" $next_boot_part $((total_size-kernel_length)) >> $setenv_script
|
||||
printf "rootfs_start_addr 0x%08x\n" $((kernel_offset+kernel_length)) >> $setenv_script
|
||||
printf "rootfs_size 0x%08x\n" ${rootfs_length} >> $setenv_script
|
||||
printf "rootfs_checksum %s\n" ${rootfs_md5} >> $setenv_script
|
||||
|
||||
# store u-boot env changes
|
||||
mkdir -p /var/lock
|
||||
fw_setenv -s $setenv_script || {
|
||||
echo "failed to update U-Boot environment"
|
||||
return 1
|
||||
}
|
||||
}
|
|
@ -59,7 +59,7 @@ platform_do_upgrade() {
|
|||
case "$(board_name)" in
|
||||
8dev,jalapeno |\
|
||||
aruba,ap-303 |\
|
||||
pangu,l1000 |\
|
||||
pangu,l1000 |\
|
||||
aruba,ap-303h |\
|
||||
aruba,ap-365 |\
|
||||
avm,fritzbox-7530 |\
|
||||
|
@ -74,8 +74,6 @@ platform_do_upgrade() {
|
|||
luma,wrtq-329acn |\
|
||||
zbt,z4019 |\
|
||||
mobipromo,cm520-79f |\
|
||||
p2w,r619ac-64m |\
|
||||
p2w,r619ac-128m |\
|
||||
qxwlan,e2600ac-c2)
|
||||
nand_do_upgrade "$1"
|
||||
;;
|
||||
|
@ -115,6 +113,11 @@ platform_do_upgrade() {
|
|||
CI_KERNPART="part.safe"
|
||||
nand_do_upgrade "$1"
|
||||
;;
|
||||
mikrotik,hap-ac2|\
|
||||
mikrotik,sxtsq-5-ac)
|
||||
[ "$(rootfs_type)" = "tmpfs" ] && mtd erase firmware
|
||||
default_do_upgrade "$1"
|
||||
;;
|
||||
openmesh,a42 |\
|
||||
openmesh,a62 |\
|
||||
plasmacloud,pa1200 |\
|
||||
|
|
472
root/target/linux/ipq40xx/config-5.4
Executable file
472
root/target/linux/ipq40xx/config-5.4
Executable file
|
@ -0,0 +1,472 @@
|
|||
CONFIG_ALIGNMENT_TRAP=y
|
||||
CONFIG_ARM_MODULE_PLTS=y
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
# CONFIG_APQ_GCC_8084 is not set
|
||||
# CONFIG_APQ_MMCC_8084 is not set
|
||||
CONFIG_AR40XX_PHY=y
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_CLOCKSOURCE_DATA=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_IPQ40XX=y
|
||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
||||
# CONFIG_ARCH_MDM9615 is not set
|
||||
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
|
||||
# CONFIG_ARCH_MSM8960 is not set
|
||||
# CONFIG_ARCH_MSM8974 is not set
|
||||
# CONFIG_ARCH_MSM8X60 is not set
|
||||
CONFIG_ARCH_MULTIPLATFORM=y
|
||||
CONFIG_ARCH_MULTI_V6_V7=y
|
||||
CONFIG_ARCH_MULTI_V7=y
|
||||
CONFIG_ARCH_NR_GPIO=0
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
|
||||
CONFIG_ARCH_QCOM=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARM_AMBA=y
|
||||
CONFIG_ARM_APPENDED_DTB=y
|
||||
CONFIG_ARM_ARCH_TIMER=y
|
||||
CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
|
||||
# CONFIG_ARM_ATAG_DTB_COMPAT is not set
|
||||
CONFIG_ARM_CPUIDLE=y
|
||||
CONFIG_ARM_CPU_SUSPEND=y
|
||||
# CONFIG_ARM_CPU_TOPOLOGY is not set
|
||||
CONFIG_ARM_CRYPTO=y
|
||||
CONFIG_ARM_GIC=y
|
||||
CONFIG_ARM_HAS_SG_CHAIN=y
|
||||
CONFIG_ARM_L1_CACHE_SHIFT=6
|
||||
CONFIG_ARM_L1_CACHE_SHIFT_6=y
|
||||
CONFIG_ARM_PATCH_IDIV=y
|
||||
CONFIG_ARM_PATCH_PHYS_VIRT=y
|
||||
# CONFIG_ARM_QCOM_CPUFREQ_HW is not set
|
||||
# CONFIG_ARM_SMMU is not set
|
||||
CONFIG_ARM_THUMB=y
|
||||
CONFIG_ARM_UNWIND=y
|
||||
CONFIG_ARM_VIRT_EXT=y
|
||||
CONFIG_AT803X_PHY=y
|
||||
CONFIG_AUTO_ZRELADDR=y
|
||||
CONFIG_BCH=y
|
||||
CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BOUNCE=y
|
||||
# CONFIG_CACHE_L2X0 is not set
|
||||
CONFIG_CLKDEV_LOOKUP=y
|
||||
CONFIG_CLKSRC_QCOM=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMMON_CLK_QCOM=y
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CPUFREQ_DT=y
|
||||
CONFIG_CPUFREQ_DT_PLATDEV=y
|
||||
CONFIG_CPU_32v6K=y
|
||||
CONFIG_CPU_32v7=y
|
||||
CONFIG_CPU_ABRT_EV7=y
|
||||
CONFIG_CPU_CACHE_V7=y
|
||||
CONFIG_CPU_CACHE_VIPT=y
|
||||
CONFIG_CPU_COPY_V6=y
|
||||
CONFIG_CPU_CP15=y
|
||||
CONFIG_CPU_CP15_MMU=y
|
||||
CONFIG_CPU_FREQ=y
|
||||
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
|
||||
CONFIG_CPU_FREQ_GOV_ATTR_SET=y
|
||||
CONFIG_CPU_FREQ_GOV_COMMON=y
|
||||
# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
|
||||
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
|
||||
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
|
||||
# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
|
||||
# CONFIG_CPU_FREQ_GOV_USERSPACE is not set
|
||||
CONFIG_CPU_FREQ_STAT=y
|
||||
CONFIG_CPU_HAS_ASID=y
|
||||
CONFIG_CPU_IDLE=y
|
||||
CONFIG_CPU_IDLE_GOV_LADDER=y
|
||||
CONFIG_CPU_IDLE_GOV_MENU=y
|
||||
CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y
|
||||
CONFIG_CPU_PABRT_V7=y
|
||||
CONFIG_CPU_PM=y
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_CPU_SPECTRE=y
|
||||
CONFIG_CPU_THERMAL=y
|
||||
CONFIG_CPU_THUMB_CAPABLE=y
|
||||
CONFIG_CPU_TLB_V7=y
|
||||
CONFIG_CPU_V7=y
|
||||
CONFIG_CRC16=y
|
||||
# CONFIG_CRC32_SARWATE is not set
|
||||
CONFIG_CRC32_SLICEBY8=y
|
||||
CONFIG_CRYPTO_ACOMP2=y
|
||||
CONFIG_CRYPTO_AEAD=y
|
||||
CONFIG_CRYPTO_AEAD2=y
|
||||
CONFIG_CRYPTO_AES_ARM=y
|
||||
CONFIG_CRYPTO_AES_ARM_BS=y
|
||||
CONFIG_CRYPTO_CBC=y
|
||||
CONFIG_CRYPTO_CRYPTD=y
|
||||
CONFIG_CRYPTO_CTR=y
|
||||
CONFIG_CRYPTO_DEFLATE=y
|
||||
CONFIG_CRYPTO_DES=y
|
||||
CONFIG_CRYPTO_DEV_QCE=y
|
||||
# CONFIG_CRYPTO_DEV_QCE_ENABLE_ALL is not set
|
||||
# CONFIG_CRYPTO_DEV_QCE_ENABLE_SHA is not set
|
||||
CONFIG_CRYPTO_DEV_QCE_ENABLE_SKCIPHER=y
|
||||
CONFIG_CRYPTO_DEV_QCE_SKCIPHER=y
|
||||
CONFIG_CRYPTO_DEV_QCE_SW_MAX_LEN=512
|
||||
CONFIG_CRYPTO_DEV_QCOM_RNG=y
|
||||
CONFIG_CRYPTO_DRBG=y
|
||||
CONFIG_CRYPTO_DRBG_HMAC=y
|
||||
CONFIG_CRYPTO_DRBG_MENU=y
|
||||
CONFIG_CRYPTO_ECB=y
|
||||
CONFIG_CRYPTO_HASH=y
|
||||
CONFIG_CRYPTO_HASH2=y
|
||||
CONFIG_CRYPTO_HASH_INFO=y
|
||||
CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_CRYPTO_HW=y
|
||||
CONFIG_CRYPTO_JITTERENTROPY=y
|
||||
CONFIG_CRYPTO_LIB_DES=y
|
||||
CONFIG_CRYPTO_LIB_SHA256=y
|
||||
CONFIG_CRYPTO_LZO=y
|
||||
CONFIG_CRYPTO_MANAGER=y
|
||||
CONFIG_CRYPTO_MANAGER2=y
|
||||
CONFIG_CRYPTO_NULL=y
|
||||
CONFIG_CRYPTO_NULL2=y
|
||||
CONFIG_CRYPTO_RNG=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_RNG_DEFAULT=y
|
||||
CONFIG_CRYPTO_SEQIV=y
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_SHA256_ARM=y
|
||||
CONFIG_CRYPTO_SIMD=y
|
||||
CONFIG_CRYPTO_XTS=y
|
||||
CONFIG_CRYPTO_ZSTD=y
|
||||
CONFIG_DCACHE_WORD_ACCESS=y
|
||||
CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
|
||||
CONFIG_DEBUG_MISC=y
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_DMA_ENGINE=y
|
||||
CONFIG_DMA_OF=y
|
||||
CONFIG_DMA_REMAP=y
|
||||
CONFIG_DMA_SHARED_BUFFER=y
|
||||
CONFIG_DMA_VIRTUAL_CHANNELS=y
|
||||
CONFIG_DTC=y
|
||||
CONFIG_DT_IDLE_STATES=y
|
||||
CONFIG_DYNAMIC_DEBUG=y
|
||||
CONFIG_EDAC_ATOMIC_SCRUB=y
|
||||
CONFIG_EDAC_SUPPORT=y
|
||||
CONFIG_EEPROM_AT24=y
|
||||
CONFIG_ESSEDMA=y
|
||||
CONFIG_EXTCON=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FIX_EARLYCON_MEM=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_GENERIC_ALLOCATOR=y
|
||||
CONFIG_GENERIC_BUG=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
||||
CONFIG_GENERIC_IDLE_POLL_SETUP=y
|
||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||
CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
|
||||
CONFIG_GENERIC_MSI_IRQ=y
|
||||
CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_PINCTRL_GROUPS=y
|
||||
CONFIG_GENERIC_PINMUX_FUNCTIONS=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_STRNCPY_FROM_USER=y
|
||||
CONFIG_GENERIC_STRNLEN_USER=y
|
||||
CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
CONFIG_GPIO_74X164=y
|
||||
CONFIG_GPIO_WATCHDOG=y
|
||||
CONFIG_GPIO_WATCHDOG_ARCH_INITCALL=y
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HARDEN_BRANCH_PREDICTOR=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HAVE_SMP=y
|
||||
CONFIG_HIGHMEM=y
|
||||
# CONFIG_HIGHPTE is not set
|
||||
CONFIG_HWSPINLOCK=y
|
||||
CONFIG_HWSPINLOCK_QCOM=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_OPTEE=y
|
||||
CONFIG_HZ=100
|
||||
CONFIG_HZ_100=y
|
||||
CONFIG_HZ_FIXED=0
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_HELPER_AUTO=y
|
||||
CONFIG_I2C_QUP=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
# CONFIG_IOMMU_DEBUGFS is not set
|
||||
# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
|
||||
# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set
|
||||
CONFIG_IOMMU_SUPPORT=y
|
||||
CONFIG_IO_URING=y
|
||||
CONFIG_IPQ_GCC_4019=y
|
||||
# CONFIG_IPQ_GCC_806X is not set
|
||||
# CONFIG_IPQ_GCC_8074 is not set
|
||||
# CONFIG_IPQ_LCC_806X is not set
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_DOMAIN_HIERARCHY=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
# CONFIG_KPSS_XCC is not set
|
||||
# CONFIG_KRAITCC is not set
|
||||
CONFIG_LEDS_LP5523=y
|
||||
CONFIG_LEDS_LP5562=y
|
||||
CONFIG_LEDS_LP55XX_COMMON=y
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LOCK_SPIN_ON_OWNER=y
|
||||
CONFIG_LZO_COMPRESS=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
CONFIG_MDIO_BITBANG=y
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MDIO_GPIO=y
|
||||
CONFIG_MDIO_IPQ4019=y
|
||||
# CONFIG_MDM_GCC_9615 is not set
|
||||
# CONFIG_MDM_LCC_9615 is not set
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
# CONFIG_MFD_QCOM_RPM is not set
|
||||
# CONFIG_MFD_SPMI_PMIC is not set
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MIGHT_HAVE_CACHE_L2X0=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_BLOCK=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_IO_ACCESSORS=y
|
||||
CONFIG_MMC_SDHCI_MSM=y
|
||||
# CONFIG_MMC_SDHCI_PCI is not set
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
# CONFIG_MSM_GCC_8660 is not set
|
||||
# CONFIG_MSM_GCC_8916 is not set
|
||||
# CONFIG_MSM_GCC_8960 is not set
|
||||
# CONFIG_MSM_GCC_8974 is not set
|
||||
# CONFIG_MSM_GCC_8994 is not set
|
||||
# CONFIG_MSM_GCC_8996 is not set
|
||||
# CONFIG_MSM_GCC_8998 is not set
|
||||
# CONFIG_MSM_LCC_8960 is not set
|
||||
# CONFIG_MSM_MMCC_8960 is not set
|
||||
# CONFIG_MSM_MMCC_8974 is not set
|
||||
# CONFIG_MSM_MMCC_8996 is not set
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
CONFIG_MTD_NAND_CORE=y
|
||||
CONFIG_MTD_NAND_ECC_SW_BCH=y
|
||||
CONFIG_MTD_NAND_ECC_SW_HAMMING=y
|
||||
CONFIG_MTD_NAND_QCOM=y
|
||||
CONFIG_MTD_RAW_NAND=y
|
||||
CONFIG_MTD_SPI_NAND=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MTD_SPLIT_FIRMWARE=y
|
||||
CONFIG_MTD_SPLIT_FIT_FW=y
|
||||
CONFIG_MTD_SPLIT_WRGG_FW=y
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_MTD_UBI_BEB_LIMIT=20
|
||||
CONFIG_MTD_UBI_BLOCK=y
|
||||
CONFIG_MTD_UBI_WL_THRESHOLD=4096
|
||||
CONFIG_MUTEX_SPIN_ON_OWNER=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEON=y
|
||||
CONFIG_NET_FLOW_LIMIT=y
|
||||
CONFIG_NET_PTP_CLASSIFY=y
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_NO_HZ_COMMON=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NR_CPUS=4
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_SYSFS=y
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_OF_NET=y
|
||||
CONFIG_OLD_SIGACTION=y
|
||||
CONFIG_OLD_SIGSUSPEND3=y
|
||||
CONFIG_OPTEE=y
|
||||
CONFIG_OPTEE_SHM_NUM_PRIV_PAGES=1
|
||||
CONFIG_PADATA=y
|
||||
CONFIG_PAGE_OFFSET=0xC0000000
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCIEAER=y
|
||||
CONFIG_PCIEPORTBUS=y
|
||||
CONFIG_PCIE_DW=y
|
||||
CONFIG_PCIE_DW_HOST=y
|
||||
CONFIG_PCIE_QCOM=y
|
||||
CONFIG_PCI_DISABLE_COMMON_QUIRKS=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DOMAINS_GENERIC=y
|
||||
CONFIG_PCI_MSI=y
|
||||
CONFIG_PCI_MSI_IRQ_DOMAIN=y
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
# CONFIG_PHY_QCOM_APQ8064_SATA is not set
|
||||
CONFIG_PHY_QCOM_IPQ4019_USB=y
|
||||
# CONFIG_PHY_QCOM_IPQ806X_SATA is not set
|
||||
# CONFIG_PHY_QCOM_PCIE2 is not set
|
||||
# CONFIG_PHY_QCOM_QMP is not set
|
||||
# CONFIG_PHY_QCOM_QUSB2 is not set
|
||||
# CONFIG_PHY_QCOM_UFS is not set
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_APQ8064 is not set
|
||||
# CONFIG_PINCTRL_APQ8084 is not set
|
||||
CONFIG_PINCTRL_IPQ4019=y
|
||||
# CONFIG_PINCTRL_IPQ8064 is not set
|
||||
# CONFIG_PINCTRL_IPQ8074 is not set
|
||||
# CONFIG_PINCTRL_MDM9615 is not set
|
||||
CONFIG_PINCTRL_MSM=y
|
||||
# CONFIG_PINCTRL_MSM8660 is not set
|
||||
# CONFIG_PINCTRL_MSM8916 is not set
|
||||
# CONFIG_PINCTRL_MSM8960 is not set
|
||||
# CONFIG_PINCTRL_MSM8994 is not set
|
||||
# CONFIG_PINCTRL_MSM8996 is not set
|
||||
# CONFIG_PINCTRL_MSM8998 is not set
|
||||
# CONFIG_PINCTRL_QCOM_SPMI_PMIC is not set
|
||||
# CONFIG_PINCTRL_QCOM_SSBI_PMIC is not set
|
||||
# CONFIG_PINCTRL_QCS404 is not set
|
||||
# CONFIG_PINCTRL_SC7180 is not set
|
||||
# CONFIG_PINCTRL_SDM660 is not set
|
||||
# CONFIG_PINCTRL_SDM845 is not set
|
||||
# CONFIG_PINCTRL_SM8150 is not set
|
||||
CONFIG_PM_OPP=y
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_POWER_RESET_MSM=y
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
CONFIG_PPS=y
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_PTP_1588_CLOCK=y
|
||||
CONFIG_QCA807X_PHY=y
|
||||
CONFIG_QCOM_A53PLL=y
|
||||
CONFIG_QCOM_BAM_DMA=y
|
||||
# CONFIG_QCOM_COMMAND_DB is not set
|
||||
# CONFIG_QCOM_EBI2 is not set
|
||||
# CONFIG_QCOM_GENI_SE is not set
|
||||
# CONFIG_QCOM_GSBI is not set
|
||||
# CONFIG_QCOM_HFPLL is not set
|
||||
# CONFIG_QCOM_IOMMU is not set
|
||||
# CONFIG_QCOM_LLCC is not set
|
||||
# CONFIG_QCOM_PDC is not set
|
||||
CONFIG_QCOM_PM=y
|
||||
CONFIG_QCOM_QFPROM=y
|
||||
# CONFIG_QCOM_RMTFS_MEM is not set
|
||||
CONFIG_QCOM_SCM=y
|
||||
CONFIG_QCOM_SCM_32=y
|
||||
# CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT is not set
|
||||
CONFIG_QCOM_SMEM=y
|
||||
# CONFIG_QCOM_SMSM is not set
|
||||
# CONFIG_QCOM_SOCINFO is not set
|
||||
CONFIG_QCOM_TCSR=y
|
||||
# CONFIG_QCOM_TSENS is not set
|
||||
CONFIG_QCOM_WDT=y
|
||||
# CONFIG_QCS_GCC_404 is not set
|
||||
# CONFIG_QCS_TURING_404 is not set
|
||||
# CONFIG_QRTR is not set
|
||||
CONFIG_RAS=y
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_RCU_CPU_STALL_TIMEOUT=21
|
||||
CONFIG_RCU_NEED_SEGCBLIST=y
|
||||
CONFIG_RCU_STALL_COMMON=y
|
||||
CONFIG_REFCOUNT_FULL=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_I2C=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
# CONFIG_REGULATOR_QCOM_SPMI is not set
|
||||
CONFIG_REGULATOR_VCTRL=y
|
||||
CONFIG_REGULATOR_VQMMC_IPQ4019=y
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
# CONFIG_RESET_QCOM_AOSS is not set
|
||||
# CONFIG_RESET_QCOM_PDC is not set
|
||||
CONFIG_RFS_ACCEL=y
|
||||
CONFIG_RPS=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_I2C_AND_SPI=y
|
||||
CONFIG_RTC_MC146818_LIB=y
|
||||
CONFIG_RWSEM_SPIN_ON_OWNER=y
|
||||
# CONFIG_SDM_CAMCC_845 is not set
|
||||
# CONFIG_SDM_DISPCC_845 is not set
|
||||
# CONFIG_SDM_GCC_660 is not set
|
||||
# CONFIG_SDM_GCC_845 is not set
|
||||
# CONFIG_SDM_GPUCC_845 is not set
|
||||
# CONFIG_SDM_LPASSCC_845 is not set
|
||||
# CONFIG_SDM_VIDEOCC_845 is not set
|
||||
CONFIG_SERIAL_8250_FSL=y
|
||||
CONFIG_SERIAL_MCTRL_GPIO=y
|
||||
CONFIG_SERIAL_MSM=y
|
||||
CONFIG_SERIAL_MSM_CONSOLE=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SMP_ON_UP=y
|
||||
# CONFIG_SM_GCC_8150 is not set
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_BITBANG=y
|
||||
CONFIG_SPI_GPIO=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_MEM=y
|
||||
CONFIG_SPI_QUP=y
|
||||
CONFIG_SPMI=y
|
||||
CONFIG_SPMI_MSM_PMIC_ARB=y
|
||||
# CONFIG_SPMI_PMIC_CLKDIV is not set
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_SWCONFIG=y
|
||||
CONFIG_SWCONFIG_LEDS=y
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SWP_EMULATE=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
CONFIG_TEE=y
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
|
||||
CONFIG_THERMAL_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_OF=y
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TIMER_OF=y
|
||||
CONFIG_TIMER_PROBE=y
|
||||
CONFIG_TREE_RCU=y
|
||||
CONFIG_TREE_SRCU=y
|
||||
CONFIG_UBIFS_FS=y
|
||||
CONFIG_UBIFS_FS_ADVANCED_COMPR=y
|
||||
CONFIG_UBIFS_FS_LZO=y
|
||||
CONFIG_UBIFS_FS_ZLIB=y
|
||||
CONFIG_UBIFS_FS_ZSTD=y
|
||||
CONFIG_UEVENT_HELPER_PATH=""
|
||||
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
||||
CONFIG_UNWINDER_ARM=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USE_OF=y
|
||||
CONFIG_VFP=y
|
||||
CONFIG_VFPv3=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_XPS=y
|
||||
CONFIG_XXHASH=y
|
||||
CONFIG_XZ_DEC_ARM=y
|
||||
CONFIG_XZ_DEC_BCJ=y
|
||||
CONFIG_ZBOOT_ROM_BSS=0
|
||||
CONFIG_ZBOOT_ROM_TEXT=0
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
CONFIG_ZSTD_COMPRESS=y
|
||||
CONFIG_ZSTD_DECOMPRESS=y
|
|
@ -1,308 +0,0 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
// Copyright (c) 2018, Robert Marko <robimarko@gmail.com>
|
||||
|
||||
#include "qcom-ipq4019.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/soc/qcom,tcsr.h>
|
||||
|
||||
/ {
|
||||
soc {
|
||||
rng@22000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
aliases {
|
||||
led-boot = &power;
|
||||
led-failsafe = &power;
|
||||
led-running = &power;
|
||||
led-upgrade = &power;
|
||||
};
|
||||
|
||||
|
||||
mdio@90000 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&mdio_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
ess-psgmii@98000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
counter@4a1000 {
|
||||
compatible = "qcom,qca-gcnt";
|
||||
reg = <0x4a1000 0x4>;
|
||||
};
|
||||
|
||||
tcsr@1949000 {
|
||||
compatible = "qcom,tcsr";
|
||||
reg = <0x1949000 0x100>;
|
||||
qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
|
||||
};
|
||||
|
||||
tcsr@194b000 {
|
||||
status = "okay";
|
||||
|
||||
compatible = "qcom,tcsr";
|
||||
reg = <0x194b000 0x100>;
|
||||
qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
|
||||
};
|
||||
|
||||
ess_tcsr@1953000 {
|
||||
compatible = "qcom,tcsr";
|
||||
reg = <0x1953000 0x1000>;
|
||||
qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
|
||||
};
|
||||
|
||||
tcsr@1957000 {
|
||||
compatible = "qcom,tcsr";
|
||||
reg = <0x1957000 0x100>;
|
||||
qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
|
||||
};
|
||||
|
||||
usb2: usb2@60f8800 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb3: usb3@8af8800 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
crypto@8e3a000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
watchdog@b017000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ess-switch@c000000 {
|
||||
status = "okay";
|
||||
|
||||
switch_lan_bmp = <0x10>; /* lan port bitmap */
|
||||
};
|
||||
|
||||
edma@c080000 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
power: status {
|
||||
label = "blue:status";
|
||||
gpios = <&tlmm 63 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
wlan2g {
|
||||
label = "blue:wlan2g";
|
||||
gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
wan {
|
||||
label = "bule:wan";
|
||||
gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
4g1 {
|
||||
label = "bule:4g1";
|
||||
gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
4g2 {
|
||||
label = "bule:4g2";
|
||||
gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
4g3 {
|
||||
label = "bule:4g3";
|
||||
gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
mdio_pins: mdio_pinmux {
|
||||
pinmux_1 {
|
||||
pins = "gpio53";
|
||||
function = "mdio";
|
||||
};
|
||||
|
||||
pinmux_2 {
|
||||
pins = "gpio52";
|
||||
function = "mdc";
|
||||
};
|
||||
|
||||
pinconf {
|
||||
pins = "gpio52", "gpio53";
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
serial_pins: serial_pinmux {
|
||||
mux {
|
||||
pins = "gpio60", "gpio61";
|
||||
function = "blsp_uart0";
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
spi_0_pins: spi_0_pinmux {
|
||||
pin {
|
||||
function = "blsp_spi0";
|
||||
pins = "gpio55", "gpio56", "gpio57";
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
pin_cs {
|
||||
function = "gpio";
|
||||
pins = "gpio54", "gpio59";
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
output-high;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&blsp_dma {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&blsp1_spi1 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&spi_0_pins>;
|
||||
pinctrl-names = "default";
|
||||
cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>, <&tlmm 59 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
flash@0 {
|
||||
status = "okay";
|
||||
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <24000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "SBL1";
|
||||
reg = <0x00000000 0x00040000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "MIBIB";
|
||||
reg = <0x00040000 0x00020000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@60000 {
|
||||
label = "QSEE";
|
||||
reg = <0x00060000 0x00060000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@c0000 {
|
||||
label = "CDT";
|
||||
reg = <0x000c0000 0x00010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@d0000 {
|
||||
label = "DDRPARAMS";
|
||||
reg = <0x000d0000 0x00010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@e0000 {
|
||||
label = "APPSBLENV"; /* uboot env*/
|
||||
reg = <0x000e0000 0x00010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@f0000 {
|
||||
label = "APPSBL"; /* uboot */
|
||||
reg = <0x000f0000 0x00080000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@170000 {
|
||||
label = "ART";
|
||||
reg = <0x00170000 0x00010000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
spi-nand@1 {
|
||||
status = "okay";
|
||||
|
||||
compatible = "spi-nand";
|
||||
reg = <1>;
|
||||
spi-max-frequency = <24000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "ubi";
|
||||
reg = <0x00000000 0x08000000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&blsp1_uart1 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&serial_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&cryptobam {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
qcom,poll_required = <1>;
|
||||
qcom,poll_required_dynamic = <1>;
|
||||
qcom,phy_mdio_addr = <3>;
|
||||
vlan_tag = <1 0x10>;
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
qcom,poll_required = <1>;
|
||||
qcom,poll_required_dynamic = <1>;
|
||||
qcom,phy_mdio_addr = <4>;
|
||||
vlan_tag = <2 0x20>;
|
||||
};
|
||||
|
||||
&wifi0 {
|
||||
status = "okay";
|
||||
|
||||
qcom,ath10k-calibration-variant = "8devices-Jalapeno";
|
||||
};
|
||||
|
||||
&wifi1 {
|
||||
status = "okay";
|
||||
|
||||
qcom,ath10k-calibration-variant = "8devices-Jalapeno";
|
||||
};
|
||||
|
||||
&usb3_ss_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb3_hs_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb2_hs_phy {
|
||||
status = "okay";
|
||||
};
|
|
@ -136,8 +136,7 @@ define Device/alfa-network_ap120c-ac
|
|||
DEVICE_VENDOR := ALFA Network
|
||||
DEVICE_MODEL := AP120C-AC
|
||||
SOC := qcom-ipq4018
|
||||
DEVICE_PACKAGES := kmod-usb-acm \
|
||||
kmod-tpm-i2c-atmel
|
||||
DEVICE_PACKAGES := kmod-usb-acm kmod-tpm-i2c-atmel
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
IMAGE_SIZE := 65536k
|
||||
|
@ -371,6 +370,7 @@ define Device/edgecore_ecw5211
|
|||
SOC := qcom-ipq4018
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
DEVICE_DTS_CONFIG := config@ap.dk01.1-c2
|
||||
DEVICE_PACKAGES := kmod-tpm-i2c-atmel kmod-usb-acm
|
||||
endef
|
||||
TARGET_DEVICES += edgecore_ecw5211
|
||||
|
@ -424,6 +424,7 @@ define Device/engenius_emd1
|
|||
IMAGES += factory.bin
|
||||
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
|
||||
IMAGE/factory.bin := qsdk-ipq-factory-nor | check-size
|
||||
DEVICE_PACKAGES := ipq-wifi-engenius_emd1
|
||||
endef
|
||||
TARGET_DEVICES += engenius_emd1
|
||||
|
||||
|
@ -438,6 +439,7 @@ define Device/engenius_emr3500
|
|||
IMAGES += factory.bin
|
||||
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
|
||||
IMAGE/factory.bin := qsdk-ipq-factory-nor | check-size
|
||||
DEVICE_PACKAGES := ipq-wifi-engenius_emr3500
|
||||
endef
|
||||
TARGET_DEVICES += engenius_emr3500
|
||||
|
||||
|
@ -497,18 +499,6 @@ define Device/glinet_gl-ap1300
|
|||
endef
|
||||
TARGET_DEVICES += glinet_gl-ap1300
|
||||
|
||||
define Device/glinet_gl-b1300
|
||||
$(call Device/FitImage)
|
||||
DEVICE_VENDOR := GL.iNet
|
||||
DEVICE_MODEL := GL-B1300
|
||||
BOARD_NAME := gl-b1300
|
||||
SOC := qcom-ipq4029
|
||||
KERNEL_SIZE := 4096k
|
||||
IMAGE_SIZE := 26624k
|
||||
IMAGE/sysupgrade.bin := append-kernel |append-rootfs | pad-rootfs | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += glinet_gl-b1300
|
||||
|
||||
define Device/zbt_z4019
|
||||
$(call Device/FitImage)
|
||||
$(call Device/UbiFit)
|
||||
|
@ -521,6 +511,18 @@ define Device/zbt_z4019
|
|||
endef
|
||||
TARGET_DEVICES += zbt_z4019
|
||||
|
||||
define Device/glinet_gl-b1300
|
||||
$(call Device/FitImage)
|
||||
DEVICE_VENDOR := GL.iNet
|
||||
DEVICE_MODEL := GL-B1300
|
||||
BOARD_NAME := gl-b1300
|
||||
SOC := qcom-ipq4029
|
||||
KERNEL_SIZE := 4096k
|
||||
IMAGE_SIZE := 26624k
|
||||
IMAGE/sysupgrade.bin := append-kernel |append-rootfs | pad-rootfs | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += glinet_gl-b1300
|
||||
|
||||
define Device/glinet_gl-s1300
|
||||
$(call Device/FitImage)
|
||||
DEVICE_VENDOR := GL.iNet
|
||||
|
@ -704,7 +706,7 @@ define Device/plasmacloud_pa1200
|
|||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=PA1200
|
||||
IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
|
||||
DEVICE_PACKAGES := ipq-wifi-plasmacloud-pa1200
|
||||
DEVICE_PACKAGES := ipq-wifi-plasmacloud_pa1200
|
||||
endef
|
||||
TARGET_DEVICES += plasmacloud_pa1200
|
||||
|
||||
|
@ -720,7 +722,7 @@ define Device/plasmacloud_pa2200
|
|||
IMAGES += factory.bin
|
||||
IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=PA2200
|
||||
IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca9888-ct ipq-wifi-plasmacloud-pa2200
|
||||
DEVICE_PACKAGES := ath10k-firmware-qca9888-ct ipq-wifi-plasmacloud_pa2200
|
||||
endef
|
||||
TARGET_DEVICES += plasmacloud_pa2200
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
|||
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -837,11 +837,60 @@ dtb-$(CONFIG_ARCH_QCOM) += \
|
||||
@@ -837,11 +837,62 @@ dtb-$(CONFIG_ARCH_QCOM) += \
|
||||
qcom-apq8074-dragonboard.dtb \
|
||||
qcom-apq8084-ifc6540.dtb \
|
||||
qcom-apq8084-mtp.dtb \
|
||||
|
@ -31,6 +31,8 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
|||
+ qcom-ipq4018-gl-ap1300.dtb \
|
||||
+ qcom-ipq4018-jalapeno.dtb \
|
||||
+ qcom-ipq4018-meshpoint-one.dtb \
|
||||
+ qcom-ipq4018-hap-ac2.dtb \
|
||||
+ qcom-ipq4018-sxtsq-5-ac.dtb \
|
||||
+ qcom-ipq4018-nbg6617.dtb \
|
||||
+ qcom-ipq4019-oap100.dtb \
|
||||
+ qcom-ipq4018-pa1200.dtb \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue