summaryrefslogtreecommitdiff
path: root/recipes-kernel/rsi-91x/files/onebox_util.sh
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/rsi-91x/files/onebox_util.sh')
-rwxr-xr-xrecipes-kernel/rsi-91x/files/onebox_util.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/recipes-kernel/rsi-91x/files/onebox_util.sh b/recipes-kernel/rsi-91x/files/onebox_util.sh
new file mode 100755
index 0000000..5a20d2b
--- /dev/null
+++ b/recipes-kernel/rsi-91x/files/onebox_util.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+# The purpose of this script is to allow
+# the rs9113 onebox_util functionality to
+# be implemented seamlessly for the rsi
+# driver.
+
+rpine=$1
+cmd=$2
+interface=$3
+
+if [[ $cmd == delete_vap ]] ; then
+ ip link set $interface down || exit 0
+ exit 0
+fi
+
+if [[ -L /sys/class/net/$interface ]] ; then
+ exit 0
+fi
+cd /sys/class/net/
+for d in wlan[0-9]* ; do
+ if ip link set $d down ; then
+ ip link set $d name $interface
+ exit 0
+ fi
+done