From b573d8ec23fe7dcba00cdea3be95608b72f37902 Mon Sep 17 00:00:00 2001 From: nbd Date: Sun, 15 Oct 2006 15:27:34 +0000 Subject: implement simple device autodetection for wifi drivers git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5113 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/broadcom-wl/files/lib/wifi/broadcom.sh | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'package/broadcom-wl/files/lib/wifi') diff --git a/package/broadcom-wl/files/lib/wifi/broadcom.sh b/package/broadcom-wl/files/lib/wifi/broadcom.sh index 435c440e2..1ce85c4c5 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 <