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 disabled
"$device" disabled
41 [ "$disabled" == "1" ] && {
42 echo "'$device' is disabled"
45 config_get iftype
"$device" type
46 if eval "type ${1}_$iftype" 2>/dev
/null
>/dev
/null
; then
47 eval "scan_$iftype '$device'"
48 eval "${1}_$iftype '$device'" ||
echo "$device($iftype): ${1} failed"
50 echo "$device($iftype): Interface type not supported"
56 for driver
in ${2:-$DRIVERS}; do (
57 if eval "type detect_$driver" 2>/dev
/null
>/dev
/null
; then
58 eval "detect_$driver" ||
echo "$driver: Detect failed" >&2
60 echo "$driver: Hardware detection not supported" >&2
71 setup_interface
"$1" "$2"
75 config_get TYPE
"$CONFIG_SECTION" TYPE
78 append DEVICES
"$CONFIG_SECTION"
81 config_get device
"$CONFIG_SECTION" device
82 config_get vifs
"$device" vifs
83 append vifs
"$CONFIG_SECTION"
84 config_set
"$device" vifs
"$vifs"
95 down
) wifi_updown
"disable" "$2";;
96 detect
) wifi_detect
"$2";;
97 *) wifi_updown
"enable" "$2";;
This page took 0.049462 seconds and 5 git commands to generate.