From 4478c69b8617e18483326fd896556da1040d43ac Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 26 Jul 2013 10:02:59 +0000 Subject: authsae: adapt uci scripts to use authsae This patch modifies the uci scripts to be able to start meshd-nl80211 for encrypted mesh networks, therefor a new script (authsae.sh) is inserted. Signed-off-by: Emanuel Taube [etienne.champetier@free.fr: just update mac80211.sh path] Signed-off-by: Etienne CHAMPETIER SVN-Revision: 37554 --- package/network/services/authsae/Makefile | 2 + .../services/authsae/files/lib/wifi/authsae.sh | 53 ++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 package/network/services/authsae/files/lib/wifi/authsae.sh (limited to 'package/network/services/authsae') diff --git a/package/network/services/authsae/Makefile b/package/network/services/authsae/Makefile index c804803..0e181d9 100644 --- a/package/network/services/authsae/Makefile +++ b/package/network/services/authsae/Makefile @@ -37,6 +37,8 @@ TARGET_CFLAGS += -D_GNU_SOURCE define Package/authsae/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin + $(INSTALL_DIR) $(1)/lib/wifi + $(INSTALL_DATA) ./files/lib/wifi/authsae.sh $(1)/lib/wifi/ endef $(eval $(call BuildPackage,authsae)) diff --git a/package/network/services/authsae/files/lib/wifi/authsae.sh b/package/network/services/authsae/files/lib/wifi/authsae.sh new file mode 100644 index 0000000..daa43eb --- /dev/null +++ b/package/network/services/authsae/files/lib/wifi/authsae.sh @@ -0,0 +1,53 @@ +authsae_start_interface() { + local device="$1" # to use the correct channel + local vif="$2" + local band + + cfgfile="/var/run/authsae-$vif.cfg" + config_get channel "$device" channel + config_get hwmode "$device" hwmode + config_get htmode "$device" htmode + config_get ifname "$vif" ifname + config_get key "$vif" key + config_get mesh_id "$vif" mesh_id + config_get mcast_rate "$vif" mcast_rate "12" + + case "$htmode" in + HT20|HT40+|HT40-) htmode="$htmode";; + NOHT|none|*) htmode="none";; + esac + + case "$hwmode" in + *g*) band=11g;; + *a*) band=11a;; + esac + + cat > "$cfgfile" <