mr scripts: dos2unix on some files
[wilink8-wlan/wl18xx-target-scripts.git] / mr / FreqToCh.sh
1 CHANNEL_FREQ=$1
2 echo $CHANNEL_FREQ
3 CHANNEL=0
5 if [ "$CHANNEL_FREQ" -ge 5745 ] ; then 
6         let "CHANNEL = (($CHANNEL_FREQ - 5745) / 5) + 149"
7 elif [ "$CHANNEL_FREQ" -ge 5180 ] ; then 
8         let "CHANNEL = (($CHANNEL_FREQ - 5180) / 5) + 36"
9 elif [ "$CHANNEL_FREQ" -ge 2412 ] ; then 
10         let "CHANNEL = (($CHANNEL_FREQ - 2412) / 5) + 1"
11 else
12         echo "FREQ in not in range" 
13 fi
15 echo $CHANNEL