3 # Set the IFS parameters for an interface configured for
4 # point-to-point use at a specific distance. Based on a
5 # program by Gunter Burchardt.
14 echo "Usage: $0 [-i athX] [-d meters]"
19 test $? -ne 0 && usage
24 -i) DEV="$2"; shift; shift;;
25 -d) d="$2"; shift; shift;;
30 test $d -eq 0 && usage
32 slottime=`expr 9 + \( $d / 300 \)`
33 if expr \( $d % 300 \) != 0 >/dev/null 2>&1; then
34 slottime=`expr $slottime + 1`
36 timeout=`expr $slottime \* 2 + 3`
38 printf "Setup IFS parameters on interface ${DEV} for %i meter p-2-p link\n" $d
39 ATHN=`echo $DEV | sed 's/ath//'`
40 sysctl dev.ath.$ATHN.slottime=$slottime
41 sysctl dev.ath.$ATHN.acktimeout=$timeout
42 sysctl dev.ath.$ATHN.ctstimeout=$timeout