summaryrefslogtreecommitdiffhomepage
path: root/contrib/package
diff options
context:
space:
mode:
authorManuel Munz <freifunk@somakoma.de>2013-01-12 18:19:43 +0000
committerManuel Munz <freifunk@somakoma.de>2013-01-12 18:19:43 +0000
commitbaba6d3dee6c80ba48b404cfc7610bd274242189 (patch)
tree036aa72e3164de7cbe8db927e80f41dbba694cf8 /contrib/package
parenta52a6a4f22861bbb1b7676b91b1f873e09bdbdfd (diff)
contrib/meshwizard: Allow to setup a VAP in ap-mode on ath5k and ath9k too
Diffstat (limited to 'contrib/package')
-rw-r--r--contrib/package/meshwizard/Makefile2
-rwxr-xr-xcontrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wifi.sh15
2 files changed, 15 insertions, 2 deletions
diff --git a/contrib/package/meshwizard/Makefile b/contrib/package/meshwizard/Makefile
index a9a1a0b6e..a88113af6 100644
--- a/contrib/package/meshwizard/Makefile
+++ b/contrib/package/meshwizard/Makefile
@@ -4,7 +4,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=meshwizard
-PKG_RELEASE:=0.0.8-1
+PKG_RELEASE:=0.0.8-2
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
diff --git a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wifi.sh b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wifi.sh
index 84c5438eb..001754c12 100755
--- a/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wifi.sh
+++ b/contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_wifi.sh
@@ -79,7 +79,20 @@ uci_commitverbose "Setup wifi interface for $netrenamed" wireless
## VAP
ip4addr="$(uci get meshwizard.netconfig.$net\_ip4addr)"
-if [ "$type" == "atheros" -a "$vap" == 1 ]; then
+
+supports_vap="0"
+if [ "$type" = "atheros" ]; then
+ supports_vap="1"
+elif [ "$type" = "mac80211" ]; then
+ # get driver in use
+ netindex="$(echo $net |sed 's/[a-zA-z]*//')"
+ driver="$(basename $(ls -l /sys/class/net/wlan${netindex}/device/driver/module | sed -ne 's/.* -> //p'))"
+ if [ "$driver" = "ath9k" -o "$driver" = "ath5k" ]; then
+ supports_vap="1"
+ fi
+fi
+
+if [ "$supports_vap" == "1" -a "$vap" == 1 ]; then
uci batch <<- EOF
set wireless.$net\_iface_dhcp="wifi-iface"
set wireless.$net\_iface_dhcp.device="$net"