diff options
author | Travis Kemen <thepeople@openwrt.org> | 2008-02-15 00:33:31 +0000 |
---|---|---|
committer | Travis Kemen <thepeople@openwrt.org> | 2008-02-15 00:33:31 +0000 |
commit | 8cd2c6a4cd682a64d05d9055c88ef7e8c9c5841d (patch) | |
tree | e26772e78cb4421789518eccab425ffcc28de332 /package/hostap-driver | |
parent | cce8347d18f6d3decc3192fcce39fa5a6db0e5e8 (diff) | |
download | upstream-8cd2c6a4cd682a64d05d9055c88ef7e8c9c5841d.tar.gz upstream-8cd2c6a4cd682a64d05d9055c88ef7e8c9c5841d.tar.bz2 upstream-8cd2c6a4cd682a64d05d9055c88ef7e8c9c5841d.zip |
push a couple of fixes upstream from Acinonyx
SVN-Revision: 10463
Diffstat (limited to 'package/hostap-driver')
-rwxr-xr-x | package/hostap-driver/files/lib/wifi/hostap.sh | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/package/hostap-driver/files/lib/wifi/hostap.sh b/package/hostap-driver/files/lib/wifi/hostap.sh index 964a504180..053c08b83a 100755 --- a/package/hostap-driver/files/lib/wifi/hostap.sh +++ b/package/hostap-driver/files/lib/wifi/hostap.sh @@ -36,14 +36,14 @@ enable_prism2() { config_get ssid "$device" ssid config_get maclist "$device" maclist config_get macpolicy "$device" macpolicy - [ -x /usr/sbin/prism2_srec ] && { + [ -f "$prifw" ] || [ -f "$stafw" ] && [ -x /usr/sbin/prism2_srec ] && { irqdevs=$(cat /proc/interrupts | grep wifi${device##wlan} | cut -b 37- | tr -d ",") - for dev in "$irqdevs"; do + for dev in $irqdevs; do [ "$(config_get "$dev" type)" = "atheros" ] && wifi down "$dev" done [ -f "$prifw" ] && prism2_srec -g $device $prifw [ -f "$stafw" ] && prism2_srec -r $device $stafw - for dev in "$irqdevs"; do + for dev in $irqdevs; do [ "$(config_get "$dev" type)" = "atheros" ] && wifi up "$dev" done } @@ -51,6 +51,7 @@ enable_prism2() { [ -n "$rate" ] && iwconfig $device rate $rate [ -n "$channel" ] && iwconfig $device channel $channel [ -n "$ssid" ] && iwconfig $device essid $ssid + ifconfig "$device" up [ -n "$txpower" ] && iwconfig $device txpower $txpower [ -n "$maclist" ] && { # flush MAC list @@ -83,7 +84,7 @@ enable_prism2() { config_set "$device" bridge "$bridge" start_net "$device" "$net_cfg" } - set_wifi_up "$vif" "$ifname" + set_wifi_up "$device" "$device" } @@ -105,8 +106,10 @@ config wifi-device $dev # option macpolicy deny # option maclist '12:34:56:78:90:12 # 09:87:65:43:21:09' + + # REMOVE THIS LINE TO ENABLE WIFI: + option disabled 1 EOF done } - |