openwrtv3/package/network/utils/wwan/files/wwan.usb
John Crispin 90120bb771 wwan: add a generic 3g/4g proto
this proto handler will detect which of 3g, qmi, mbim, ncm or directip you need
for a stick and setup uci automagically

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 42837
2014-10-08 08:01:20 +00:00

18 lines
399 B
Text

[ "$ACTION" = add -a "$DEVTYPE" = usb_device ] || exit 0
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