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

some cleanup and remove overwriting of device defaults for bgscan and diversity

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9619 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
thepeople
2007-11-28 19:25:54 +00:00
parent 8dc03d7740
commit 5ffe37bed2

View File

@@ -159,41 +159,29 @@ enable_atheros() {
esac esac
config_get ssid "$vif" ssid config_get ssid "$vif" ssid
config_get_bool bgscan "$vif" bgscan 0 config_get_bool bgscan "$vif" bgscan
iwpriv "$ifname" bgscan "$bgscan" [ -n "$bgscan" ] && iwpriv "$ifname" bgscan "$bgscan"
config_get_bool antdiv "$device" diversity 1 config_get_bool antdiv "$device" diversity
sysctl -w dev."$device".diversity="$antdiv" >&- [ -n "$antdiv" ] && sysctl -w dev."$device".diversity="$antdiv" >&-
config_get antrx "$device" rxantenna config_get antrx "$device" rxantenna
if [ -n "$antrx" ]; then [ -n "$antrx" ] && sysctl -w dev."$device".rxantenna="$antrx" >&-
sysctl -w dev."$device".rxantenna="$antrx" >&-
fi
config_get anttx "$device" txantenna config_get anttx "$device" txantenna
if [ -n "$anttx" ]; then [ -n "$anttx" ] && sysctl -w dev."$device".txantenna="$anttx" >&-
sysctl -w dev."$device".txantenna="$anttx" >&-
fi
config_get distance "$device" distance config_get distance "$device" distance
if [ -n "$distance" ]; then [ -n "$distance" ] && athctrl -i "$device" -d "$distance" >&-
athctrl -i "$device" -d "$distance" >&-
fi
config_get txpwr "$vif" txpower config_get txpwr "$vif" txpower
if [ -n "$txpwr" ]; then [ -n "$txpwr" ] && iwconfig "$ifname" txpower "${txpwr%%.*}"
iwconfig "$ifname" txpower "${txpwr%%.*}"
fi
config_get frag "$vif" frag config_get frag "$vif" frag
if [ -n "$frag" ]; then [ -n "$frag" ] && iwconfig "$ifname" frag "${frag%%.*}"
iwconfig "$ifname" frag "${frag%%.*}"
fi
config_get rts "$vif" rts config_get rts "$vif" rts
if [ -n "$rts" ]; then [ -n "$rts" ] && iwconfig "$ifname" rts "${rts%%.*}"
iwconfig "$ifname" rts "${rts%%.*}"
fi
ifconfig "$ifname" up ifconfig "$ifname" up
iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null