madwifi: change the network scripts to use the new wds sta separation feature
[openwrt-10.03/.git] / package / madwifi / files / etc / hotplug.d / net / 10-madwifi
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