madwifi: change the network scripts to use the new wds sta separation feature
authorFelix Fietkau <nbd@openwrt.org>
Wed, 30 Jul 2008 05:22:16 +0000 (05:22 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 30 Jul 2008 05:22:16 +0000 (05:22 +0000)
SVN-Revision: 12005

package/madwifi/Makefile
package/madwifi/files/etc/hotplug.d/net/10-madwifi [new file with mode: 0644]
package/madwifi/files/lib/wifi/madwifi.sh

index 48fa28e128bd34c101f0e07e71ee2d2657d4d361..97516e43047119a4d96ae8dddcd704b5807dbc35 100644 (file)
@@ -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 (file)
index 0000000..f5afce3
--- /dev/null
@@ -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
index 5a47f70193b2c88f9a7360e80fc361e585858d46..fe1e582f5bc706bc7b8e77040de0d85e1dcf0f73 100755 (executable)
@@ -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;;