Index: tools/iris-8.0/wleiden.pl
===================================================================
--- tools/iris-8.0/wleiden.pl	(revision 7468)
+++ tools/iris-8.0/wleiden.pl	(revision 7483)
@@ -251,11 +251,4 @@
           $output .= "create_args_$IFNAME=\"";
 
-          if( $MODE{$if} =~/master/i ) {
-            $output .= "wlanmode ap";
-            $output .= " channel $CHANNEL{$interface}";
-          } else {
-            $output .= " wlanmode sta"
-          }
-
           if ( $SUBTYPE{$if} =~ /802.11a/i ) {
             $output .= " mode 11a";
@@ -265,4 +258,11 @@
             # Default output
             $output .= " mode 11b";
+          }
+
+   	   if( $MODE{$if} =~/master/i ) {
+            $output .= "wlanmode ap";
+            $output .= " channel $CHANNEL{$interface}";
+          } else {
+            $output .= " wlanmode sta"
           }
 
