summaryrefslogtreecommitdiffstats
path: root/package/broadcom-wl/files/lib/wifi
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-11-18 23:38:07 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-11-18 23:38:07 +0000
commite0d773ef4054906773106ade68cfc6fefebce1a9 (patch)
treefb8a0f5f42ea4490f752f58ba2b30d859506ca0d /package/broadcom-wl/files/lib/wifi
parent29b117bb79a9a167c28f7e22ccb7b75ea51e9f4b (diff)
add distance/slottime setting to broadcom.sh (fixes #950)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5578 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/broadcom-wl/files/lib/wifi')
-rw-r--r--package/broadcom-wl/files/lib/wifi/broadcom.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/package/broadcom-wl/files/lib/wifi/broadcom.sh b/package/broadcom-wl/files/lib/wifi/broadcom.sh
index 223827508..92548e53d 100644
--- a/package/broadcom-wl/files/lib/wifi/broadcom.sh
+++ b/package/broadcom-wl/files/lib/wifi/broadcom.sh
@@ -92,12 +92,24 @@ enable_broadcom() {
config_get maxassoc "$device" maxassoc
config_get wds "$device" wds
config_get vifs "$device" vifs
+ config_get distance "$device" distance
+ config_get slottime "$device" slottime
local vif_pre_up vif_post_up vif_do_up
_c=0
nas="$(which nas)"
nas_cmd=
if_up=
+
+ [ -z "$slottime" ] && {
+ [ -n "$distance" ] && {
+ # slottime = 9 + (distance / 150) + (distance % 150 ? 1 : 0)
+ slottime="$((9 + ($distance / 150) + 1 - (150 - ($distance % 150)) / 150 ))"
+ }
+ } || {
+ slottime="${slottime:--1}"
+ }
+
for vif in $vifs; do
config_get mode "$vif" mode
append vif_pre_up "vif $_c" "$N"
@@ -207,6 +219,7 @@ wds ${wds:-none}
channel ${channel:-0}
country ${country:-IL0}
maxassoc ${maxassoc:-128}
+slottime ${slottime:--1}
$vif_pre_up
up