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

SVN-Revision: 9619
master
Travis Kemen 17 years ago
parent 8977c6c20a
commit b6e523bc33
  1. 32
      package/madwifi/files/lib/wifi/madwifi.sh

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

Loading…
Cancel
Save