summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Lauer <mickey@vanille-media.de>2004-07-25 13:51:27 +0000
committerMichael Lauer <mickey@vanille-media.de>2004-07-25 13:51:27 +0000
commit914ba53cca4e7f707ffa0bc96b36c847f4f0d7b0 (patch)
treeda704207ab1a004232e63ef2ab61b7d862db214f
parentadc122f785bb691a47c418a38800cfce3b95361d (diff)
wireless-tools: add support for cards requiring reset and downloadable firmware
BKrev: 4103badfyTuBKQPmScgDDPqZ9GyNFw
-rw-r--r--wireless-tools/wireless-tools/wireless-tools.if-pre-up114
1 files changed, 114 insertions, 0 deletions
diff --git a/wireless-tools/wireless-tools/wireless-tools.if-pre-up b/wireless-tools/wireless-tools/wireless-tools.if-pre-up
index e69de29bb2..33150d97c7 100644
--- a/wireless-tools/wireless-tools/wireless-tools.if-pre-up
+++ b/wireless-tools/wireless-tools/wireless-tools.if-pre-up
@@ -0,0 +1,114 @@
+#!/bin/sh
+
+IWCONFIG=/sbin/iwconfig
+IWPRIV=/sbin/iwpriv
+
+if [ ! -x $IWCONFIG ]; then
+ exit 0
+fi
+
+if [ -n "$IF_NEEDS_RESET" ]; then
+ $IWPRIV "$IFACE" reset 1
+ sleep 1
+fi
+
+if [ -n "$IF_NEEDS_FIRMWARE" ]; then
+ $NEEDS_FIRMWARE "$IFACE"
+fi
+
+if [ -n "$IF_WIRELESS_SENS" ]; then
+ $IWCONFIG "$IFACE" sens $IF_WIRELESS_SENS
+fi
+
+if [ -n "$IF_WIRELESS_RATE" ]; then
+ $IWCONFIG "$IFACE" rate $IF_WIRELESS_RATE
+fi
+
+if [ -n "$IF_WIRELESS_RTS" ]; then
+ $IWCONFIG "$IFACE" rts $IF_WIRELESS_RTS
+fi
+
+if [ -n "$IF_WIRELESS_FRAG" ]; then
+ $IWCONFIG "$IFACE" frag $IF_WIRELESS_FRAG
+fi
+
+if [ -n "$IF_WIRELESS_POWER" ]; then
+ $IWCONFIG "$IFACE" power $IF_WIRELESS_POWER
+fi
+
+if [ -n "$IF_WIRELESS_POWERPERIOD" ]; then
+ $IWCONFIG "$IFACE" power period $IF_WIRELESS_POWERPERIOD
+fi
+
+if [ -n "$IF_WIRELESS_POWERTIMEOUT" ]; then
+ $IWCONFIG "$IFACE" power timeout $IF_WIRELESS_POWERTIMEOUT
+fi
+
+if [ -n "$IF_WIRELESS_TXPOWER" ]; then
+ $IWCONFIG "$IFACE" txpower $IF_WIRELESS_TXPOWER
+fi
+
+if [ -n "$IF_WIRELESS_RETRY" ]; then
+ $IWCONFIG "$IFACE" retry $IF_WIRELESS_RETRY
+fi
+
+if [ -n "$IF_WIRELESS_ESSID" ]; then
+ $IWCONFIG "$IFACE" essid "$IF_WIRELESS_ESSID"
+fi
+
+if [ -n "$IF_WIRELESS_NICK" ]; then
+ $IWCONFIG "$IFACE" nick "$IF_WIRELESS_NICK"
+fi
+
+if [ -n "$IF_WIRELESS_NWID" ]; then
+ $IWCONFIG "$IFACE" nwid "$IF_WIRELESS_NWID"
+fi
+
+if [ -n "$IF_WIRELESS_ENC" ]; then
+ eval $IWCONFIG "$IFACE" enc $IF_WIRELESS_ENC
+fi
+
+if [ -n "$IF_WIRELESS_KEY" ]; then
+ eval $IWCONFIG "$IFACE" key $IF_WIRELESS_KEY
+fi
+
+if [ -n "$IF_WIRELESS_KEY1" ]; then
+ $IWCONFIG "$IFACE" key [1] "$IF_WIRELESS_KEY1"
+fi
+
+if [ -n "$IF_WIRELESS_KEY2" ]; then
+ $IWCONFIG "$IFACE" key [2] "$IF_WIRELESS_KEY2"
+fi
+
+if [ -n "$IF_WIRELESS_KEY3" ]; then
+ $IWCONFIG "$IFACE" key [3] "$IF_WIRELESS_KEY3"
+fi
+
+if [ -n "$IF_WIRELESS_KEY4" ]; then
+ $IWCONFIG "$IFACE" key [4] "$IF_WIRELESS_KEY4"
+fi
+
+if [ -n "$IF_WIRELESS_DEFAULTKEY" ]; then
+ $IWCONFIG "$IFACE" key ["$IF_WIRELESS_DEFAULTKEY"]
+fi
+
+if [ -n "$IF_WIRELESS_KEYMODE" ]; then
+ $IWCONFIG "$IFACE" key "$IF_WIRELESS_KEYMODE"
+fi
+
+if [ -n "$IF_WIRELESS_MODE" ]; then
+ $IWCONFIG "$IFACE" mode $IF_WIRELESS_MODE
+fi
+
+if [ -n "$IF_WIRELESS_FREQ" ]; then
+ $IWCONFIG "$IFACE" freq $IF_WIRELESS_FREQ
+fi
+
+if [ -n "$IF_WIRELESS_CHANNEL" ]; then
+ $IWCONFIG "$IFACE" channel $IF_WIRELESS_CHANNEL
+fi
+
+if [ -n "$IF_WIRELESS_COMMIT" ]; then
+ $IWCONFIG "$IFACE" commit
+fi
+