aboutsummaryrefslogtreecommitdiffstats
path: root/package/madwifi/files
diff options
context:
space:
mode:
authorTravis Kemen <thepeople@openwrt.org>2007-11-28 19:25:54 +0000
committerTravis Kemen <thepeople@openwrt.org>2007-11-28 19:25:54 +0000
commitb6e523bc335a281a4f6910d3f83c0d75a3c3fb6d (patch)
treeb657f552998b1018d5625543827c3d239d0e5f97 /package/madwifi/files
parent8977c6c20aa145e49cfecad304b8eb4692b3d087 (diff)
downloadupstream-b6e523bc335a281a4f6910d3f83c0d75a3c3fb6d.tar.gz
upstream-b6e523bc335a281a4f6910d3f83c0d75a3c3fb6d.tar.bz2
upstream-b6e523bc335a281a4f6910d3f83c0d75a3c3fb6d.zip
some cleanup and remove overwriting of device defaults for bgscan and diversity
SVN-Revision: 9619
Diffstat (limited to 'package/madwifi/files')
-rwxr-xr-xpackage/madwifi/files/lib/wifi/madwifi.sh32
1 files changed, 10 insertions, 22 deletions
diff --git a/package/madwifi/files/lib/wifi/madwifi.sh b/package/madwifi/files/lib/wifi/madwifi.sh
index 83f35ab64e..5742c68e5a 100755
--- a/package/madwifi/files/lib/wifi/madwifi.sh
+++ b/package/madwifi/files/lib/wifi/madwifi.sh
@@ -159,41 +159,29 @@ enable_atheros() {
esac
config_get ssid "$vif" ssid
- config_get_bool bgscan "$vif" bgscan 0
- iwpriv "$ifname" bgscan "$bgscan"
+ config_get_bool bgscan "$vif" bgscan
+ [ -n "$bgscan" ] && iwpriv "$ifname" bgscan "$bgscan"
- config_get_bool antdiv "$device" diversity 1
- sysctl -w dev."$device".diversity="$antdiv" >&-
+ config_get_bool antdiv "$device" diversity
+ [ -n "$antdiv" ] && sysctl -w dev."$device".diversity="$antdiv" >&-
config_get antrx "$device" rxantenna
- if [ -n "$antrx" ]; then
- sysctl -w dev."$device".rxantenna="$antrx" >&-
- fi
+ [ -n "$antrx" ] && sysctl -w dev."$device".rxantenna="$antrx" >&-
config_get anttx "$device" txantenna
- if [ -n "$anttx" ]; then
- sysctl -w dev."$device".txantenna="$anttx" >&-
- fi
+ [ -n "$anttx" ] && sysctl -w dev."$device".txantenna="$anttx" >&-
config_get distance "$device" distance
- if [ -n "$distance" ]; then
- athctrl -i "$device" -d "$distance" >&-
- fi
+ [ -n "$distance" ] && athctrl -i "$device" -d "$distance" >&-
config_get txpwr "$vif" txpower
- if [ -n "$txpwr" ]; then
- iwconfig "$ifname" txpower "${txpwr%%.*}"
- fi
+ [ -n "$txpwr" ] && iwconfig "$ifname" txpower "${txpwr%%.*}"
config_get frag "$vif" frag
- if [ -n "$frag" ]; then
- iwconfig "$ifname" frag "${frag%%.*}"
- fi
+ [ -n "$frag" ] && iwconfig "$ifname" frag "${frag%%.*}"
config_get rts "$vif" rts
- if [ -n "$rts" ]; then
- iwconfig "$ifname" rts "${rts%%.*}"
- fi
+ [ -n "$rts" ] && iwconfig "$ifname" rts "${rts%%.*}"
ifconfig "$ifname" up
iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null