1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

implement simple device autodetection for wifi drivers

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5113 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd
2006-10-15 15:27:34 +00:00
parent a454958a86
commit b573d8ec23
4 changed files with 78 additions and 26 deletions

View File

@@ -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
}