jablonka.czprosek.czf

czfcentos

Subversion Repositories:
[/] [trunk/] [router/] [usr/] [local/] [bin/] [athant] - Rev 3

Compare with Previous - Blame - Download


#!/bin/bash
# Petr Simandl www.simandl.cz
# prepinani anten pro atheros

if [ "$1 x" = " x" ]
    then
      echo "usage : athant [ath0|ath1|ath2|wifi0|wifi1|wifi2] [0|1|2]"
      echo "        0.. diversity    1.. antenna 1    2.. antenna 2"
      exit 1
fi

case $2 in
  0)
#    /bin/echo "zapinam diversity pro $1"
    echo 1 > /proc/sys/dev/$1/rxantenna
    echo 0 > /proc/sys/dev/$1/txantenna
    echo 1 > /proc/sys/dev/$1/diversity
  ;;
  1)
#    echo "antena 1 pro $1"
    echo 1 > /proc/sys/dev/$1/rxantenna
    echo 1 > /proc/sys/dev/$1/txantenna
    echo 0 > /proc/sys/dev/$1/diversity
  ;;
  2)
#    echo "antena 2 pro $1"
    echo 2 > /proc/sys/dev/$1/rxantenna
    echo 2 > /proc/sys/dev/$1/txantenna
    echo 0 > /proc/sys/dev/$1/diversity
  ;;
  *)
    echo -n "div "
    cat /proc/sys/dev/$1/diversity
    echo -n "txa "
    cat /proc/sys/dev/$1/txantenna
    echo -n "rxa "
    cat /proc/sys/dev/$1/rxantenna
esac

Powered by WebSVN 2.2.1