From ef0bb0a891f87a0ba5f4a4bb474bbc584d6d8479 Mon Sep 17 00:00:00 2001 From: nbd Date: Wed, 30 Jul 2008 05:22:16 +0000 Subject: madwifi: change the network scripts to use the new wds sta separation feature git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12005 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/madwifi/Makefile | 3 +-- package/madwifi/files/etc/hotplug.d/net/10-madwifi | 12 ++++++++++++ package/madwifi/files/lib/wifi/madwifi.sh | 3 +++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 package/madwifi/files/etc/hotplug.d/net/10-madwifi (limited to 'package') diff --git a/package/madwifi/Makefile b/package/madwifi/Makefile index 48fa28e12..97516e430 100644 --- a/package/madwifi/Makefile +++ b/package/madwifi/Makefile @@ -214,9 +214,8 @@ define Build/InstallDev endef define KernelPackage/madwifi/install - $(INSTALL_DIR) $(1)/lib/wifi - $(INSTALL_DATA) ./files/lib/wifi/madwifi.sh $(1)/lib/wifi $(INSTALL_DIR) $(1)/usr/sbin + $(CP) ./files/* $(1)/ $(CP) $(PKG_BUILD_DIR)/tools/{madwifi_multi,$(MADWIFI_APPLETS)} $(1)/usr/sbin/ endef diff --git a/package/madwifi/files/etc/hotplug.d/net/10-madwifi b/package/madwifi/files/etc/hotplug.d/net/10-madwifi new file mode 100644 index 000000000..f5afce3f2 --- /dev/null +++ b/package/madwifi/files/etc/hotplug.d/net/10-madwifi @@ -0,0 +1,12 @@ +if [ "$ACTION" = "add" -o "$ACTION" = "register" ]; then + case "$INTERFACE" in + ath*.sta*) + local BASEIF="${INTERFACE%%\.*}" + + include /lib/network + scan_interfaces + local CONFIG="$(find_config "$BASEIF")" + [ -n "$CONFIG" ] && setup_interface "$INTERFACE" "$CONFIG" + ;; + esac +fi diff --git a/package/madwifi/files/lib/wifi/madwifi.sh b/package/madwifi/files/lib/wifi/madwifi.sh index 5a47f7019..fe1e582f5 100755 --- a/package/madwifi/files/lib/wifi/madwifi.sh +++ b/package/madwifi/files/lib/wifi/madwifi.sh @@ -120,6 +120,9 @@ enable_atheros() { iwpriv "$ifname" ff "$ff" fi + config_get wdssep "$vif" wdssep + [ -n "$wdssep" ] && iwpriv "$ifname" wdssep "$wdssep" + config_get wds "$vif" wds case "$wds" in 1|on|enabled) wds=1;; -- cgit v1.2.3