2 # Copyright (C) 2006 OpenWrt.org
7 for device
in ${2:-$DEVICES}; do (
8 config_get iftype
"$device" type
9 if eval "type enable_$iftype" 2>/dev
/null
>/dev
/null
; then
10 eval "scan_$iftype '$device'"
11 eval "enable_$iftype '$device'" ||
echo "$device($iftype): Setup failed"
13 echo "$device($iftype): Interface type not supported"
19 for device
in ${2:-$DEVICES}; do (
20 config_get iftype
"$device" type
21 if eval "type disable_$iftype" 2>/dev
/null
>/dev
/null
; then
22 eval "scan_$iftype '$device'"
23 eval "disable_$iftype '$device'" ||
echo "$device($iftype): Setup failed"
25 echo "$device($iftype): Interface type not supported"
31 for driver
in ${2:-$DRIVERS}; do (
32 if eval "type detect_$driver" 2>/dev
/null
>/dev
/null
; then
33 eval "detect_$driver" ||
echo "$driver: Detect failed" >&2
35 echo "$driver: Hardware detection not supported" >&2
46 setup_interface
"$1" "$2"
51 config_get
"$1" "$2" "$3"
54 1|on|enabled
) eval "$1=1";;
55 0|off|disabled
) eval "$1=0";;
56 *) eval "$1=${4:-0}";;
61 config_get TYPE
"$CONFIG_SECTION" TYPE
64 append DEVICES
"$CONFIG_SECTION"
67 config_get device
"$CONFIG_SECTION" device
68 config_get vifs
"$device" vifs
69 append vifs
"$CONFIG_SECTION"
70 config_set
"$device" vifs
"$vifs"
81 down
) wifi_down
"$2";;
82 detect
) wifi_detect
"$2";;
This page took 0.051617 seconds and 5 git commands to generate.