mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 07:22:33 +00:00
cb262b0939
Includes specific support for PH8(1e2d-0053) / ELS61(1e2d-005b) modules. Note for ELS61, the serial driver changes from serial option(ttyUSB) to usb-cdc (ttyACM). Two additional fixes in this commit resolve issues with ttyACM devices: - * wwan.sh - sys-fs has a subdirectory indirection (*/tty/ttyACMx) which was not handled properly * wwan.usb - dependent scripts were not included, so this never actually called proto_set_available for example (and relied on inadvertent call for ttyUSB case) Signed-off-by: David Thornley <david.thornley@touchstargroup.com>
24 lines
461 B
Bash
24 lines
461 B
Bash
#!/bin/sh
|
|
|
|
[ "$ACTION" = add -a "$DEVTYPE" = usb_device ] || exit 0
|
|
|
|
. /lib/functions.sh
|
|
. /lib/netifd/netifd-proto.sh
|
|
|
|
vid=$(cat /sys$DEVPATH/idVendor)
|
|
pid=$(cat /sys$DEVPATH/idProduct)
|
|
[ -f "/lib/network/wwan/$vid:$pid" ] || exit 0
|
|
|
|
find_wwan_iface() {
|
|
local cfg="$1"
|
|
local proto
|
|
config_get proto "$cfg" proto
|
|
[ "$proto" = wwan ] || return 0
|
|
proto_set_available "$cfg" 1
|
|
ifup $cfg
|
|
exit 0
|
|
}
|
|
|
|
config_load network
|
|
config_foreach find_wwan_iface interface
|