ethmngr: removed deprecated ethport hotplug handler

This commit is contained in:
Vivek Kumar Dutta 2025-03-28 09:39:34 +05:30
parent 56d352fc83
commit dcfa48d1f7
No known key found for this signature in database
GPG key ID: 4E09F5AD8265FD4C
2 changed files with 1 additions and 24 deletions

View file

@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ethmngr
PKG_VERSION:=3.0.6
PKG_VERSION:=3.0.7
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)

View file

@ -1,23 +0,0 @@
#!/bin/sh
[ -n "$PORT" -a -n "$LINK" ] || exit 0
case "$PORT" in
# do not generate ethport ubus event
# for wifi, dsl and brige devices
wl*|wds*|atm*|ptm*|br-*)
exit 0
;;
esac
speed=0
duplex=full
if [ "$LINK" = "up" ]; then
devspeed="$(ubus -t 2 call network.device status "{\"name\":\"$PORT\"}" | jsonfilter -e @.speed)"
speed=${devspeed:0:-1}
duplex=${devspeed:0-1}
[ "$duplex" == "H" ] && duplex="half" || duplex="full"
fi
ubus send ethport "{\"ifname\":\"$PORT\",\"link\":\"$LINK\",\"speed\":\"$speed\",\"duplex\":\"$duplex\"}"