diff options
author | Felix Fietkau <nbd@openwrt.org> | 2006-10-15 15:27:34 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2006-10-15 15:27:34 +0000 |
commit | 2d072c599779ce1b76df480b9da7cd3c3e65425c (patch) | |
tree | 3be3fcf509c5ada3fbc27932a94ad107d2a1abfc /package/broadcom-wl/files/lib | |
parent | 6c27c88271de6c4e3eda940c766c2768d4fb88d3 (diff) | |
download | upstream-2d072c599779ce1b76df480b9da7cd3c3e65425c.tar.gz upstream-2d072c599779ce1b76df480b9da7cd3c3e65425c.tar.bz2 upstream-2d072c599779ce1b76df480b9da7cd3c3e65425c.zip |
implement simple device autodetection for wifi drivers
SVN-Revision: 5113
Diffstat (limited to 'package/broadcom-wl/files/lib')
-rw-r--r-- | package/broadcom-wl/files/lib/wifi/broadcom.sh | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/package/broadcom-wl/files/lib/wifi/broadcom.sh b/package/broadcom-wl/files/lib/wifi/broadcom.sh index 435c440e2e..1ce85c4c5f 100644 --- a/package/broadcom-wl/files/lib/wifi/broadcom.sh +++ b/package/broadcom-wl/files/lib/wifi/broadcom.sh @@ -1,3 +1,5 @@ +append DRIVERS "broadcom" + bridge_interface() { ( . /etc/functions.sh @@ -71,8 +73,12 @@ scan_broadcom() { esac } +disable_broadcom() { + wlc down + ifconfig wl0 down +} -setup_broadcom() { +enable_broadcom() { local _c config_get channel "$device" channel config_get country "$device" country @@ -175,3 +181,21 @@ EOF } +detect_broadcom() { + [ -f /proc/net/wl0 ] || return + config_get type wl0 type + [ "$type" = broadcom ] && return + cat <<EOF +config wifi-device wl0 + option type broadcom + option channel 5 + +config wifi-iface + option device wl0 + option mode ap + option ssid OpenWrt + option hidden 0 + option encryption none + +EOF +} |