nss-ecm: only run hotplug for physical interfaces

Also moved script to disable tx checksum for ath11k
mesh interfaces into `mac80211`.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
This commit is contained in:
Sean Khan 2024-10-20 05:00:21 -04:00
parent 589b316c88
commit d9261775cf
3 changed files with 13 additions and 12 deletions

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=qca-nss-ecm
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/qca-nss-ecm.git
PKG_SOURCE_PROTO:=git

View File

@ -1,17 +1,17 @@
#!/bin/sh
# shellcheck disable=1090
[ "$ACTION" != "add" ] && exit
. /lib/netifd/offload/disable_offloads.sh
INC="/lib/netifd/offload/disable_offloads.sh"
. "$INC" 2> /dev/null || {
logger -t "$PROG" -p user.error "missing include script $INC. exiting..."
exit 1
}
if [ -n "$INTERFACE" ]; then
disable_offload "$INTERFACE"
# Disable tx-checksumming for mesh interfaces, as it breaks multicast traffic
if [ "$DEVTYPE" = "wlan" ]; then
if ubus call network.wireless status | jsonfilter -e '@[*].interfaces[@.config.mode="mesh"].ifname' | grep -q "$INTERFACE"; then
disable_feature tx-checksumming "$INTERFACE"
fi
fi
# Only disable offloads for physical interfaces
if [ -r "/sys/class/net/$INTERFACE/device" ]; then
disable_offload "$INTERFACE"
fi
exit 0

View File

@ -183,10 +183,11 @@ disable_offload() {
config_get_bool disable_gro general disable_gro 0
config_get_bool disable_gro_list general disable_gro_list 1
[ -z $1 ] && interface=$(echo /sys/class/net/*) || interface=$*
[ -z $1 ] && interface=$(echo /sys/class/net/*/device) || interface=$*
for iface in $interface; do
i=${iface##*/}
i=${iface%/*}
i=${i##*/}
# Skip Loopback and Bonding Masters
if [ $i == lo ] || [ -f $iface ]; then