File sysconfig-ifup-wireless_ap_madwifi.bnc402438.diff of Package sysconfig

--- scripts/ifup-wireless
+++ scripts/ifup-wireless	2009/03/05 11:54:26
@@ -337,15 +337,25 @@ EOL
         # set AP address when requested in $WIRELESS_AP.
         # At last mac80211 based drivers need this as signal to start
         # scanning for an appropriate cell, so we set it to 'any' when
-        # $WIRELESS_AP is empty in Managed and Ad-Hoc modes.
+        # $WIRELESS_AP is empty in Managed and Ad-Hoc modes, except we
+        # have the madwifi (ath_pci) driver, which does not like it...
         # It is required to set up the interface before doing that.
-        ip link set up dev $INTERFACE 2>/dev/null
         case "$WIRELESS_MODE" in
-                [M,m]anaged|[A,a]d-[H,h]oc|"")
-                    test -z "$WIRELESS_AP" && WIRELESS_AP='any'
+                ([M,m]anaged|[A,a]d-[H,h]oc|"")
+                    case "${DRIVER}" in
+                        (ath_pci)
+                            test -z "$WIRELESS_AP" && WIRELESS_AP='off'
+                        ;;
+                        (*)
+                            test -z "$WIRELESS_AP" && WIRELESS_AP='any'
+                        ;;
+                    esac
                 ;;
         esac
-        test -n "$WIRELESS_AP" && run_iw_tool config ap "$WIRELESS_AP"
+        if test -n "$WIRELESS_AP" ; then
+            ip link set up dev $INTERFACE 2>/dev/null
+            run_iw_tool config ap "$WIRELESS_AP"
+        fi
 }
 
 setup_wlanngdev()
openSUSE Build Service is sponsored by