2 # Copyright (C) 2006 OpenWrt.org
11 config_get cfg
"$vif" network
17 config_get ifname
"$vif" ifname
19 cfg
="$(find_config "$ifname")"
21 [ -z "$cfg" ] && return 0
28 [ -z "$cfg" ] && return 0
33 config_get iftype
"$cfg" type
34 [ "$iftype" = bridge
] && config_get
"$cfg" ifname
39 for device
in ${2:-$DEVICES}; do (
40 config_get iftype
"$device" type
41 if eval "type enable_$iftype" 2>/dev
/null
>/dev
/null
; then
42 eval "scan_$iftype '$device'"
43 eval "enable_$iftype '$device'" ||
echo "$device($iftype): Setup failed"
45 echo "$device($iftype): Interface type not supported"
51 for device
in ${2:-$DEVICES}; do (
52 config_get iftype
"$device" type
53 if eval "type disable_$iftype" 2>/dev
/null
>/dev
/null
; then
54 eval "scan_$iftype '$device'"
55 eval "disable_$iftype '$device'" ||
echo "$device($iftype): Disable failed"
57 echo "$device($iftype): Interface type not supported"
63 for driver
in ${2:-$DRIVERS}; do (
64 if eval "type detect_$driver" 2>/dev
/null
>/dev
/null
; then
65 eval "detect_$driver" ||
echo "$driver: Detect failed" >&2
67 echo "$driver: Hardware detection not supported" >&2
78 setup_interface
"$1" "$2"
82 config_get TYPE
"$CONFIG_SECTION" TYPE
85 append DEVICES
"$CONFIG_SECTION"
88 config_get device
"$CONFIG_SECTION" device
89 config_get vifs
"$device" vifs
90 append vifs
"$CONFIG_SECTION"
91 config_set
"$device" vifs
"$vifs"
102 down
) wifi_down
"$2";;
103 detect
) wifi_detect
"$2";;
This page took 0.0440120000000001 seconds and 5 git commands to generate.