kernel/bwn: Replace callout_drain calls. Replace a tsleep by DELAY.
authorImre Vadasz <imre@vdsz.com>
Wed, 9 Apr 2014 22:48:16 +0000 (00:48 +0200)
committerSascha Wildner <saw@online.de>
Thu, 10 Apr 2014 07:01:04 +0000 (09:01 +0200)
* Adjusting local #include statements to conform to style(9).

* callout_drain calls are replaced by callout_stop_sync.

* Reverting a DELAY -> tsleep replacement.

sys/dev/netif/bwn/bwn/if_bwn.c
sys/dev/netif/bwn/siba/siba_bwn.c
sys/dev/netif/bwn/siba/siba_core.c

index 771a60c..bbd03cb 100644 (file)
@@ -72,8 +72,8 @@ __FBSDID("$FreeBSD: head/sys/dev/bwn/if_bwn.c 260444 2014-01-08 08:06:56Z kevlo
 #include <netproto/802_11/ieee80211_phy.h>
 #include <netproto/802_11/ieee80211_ratectl.h>
 
-#include <dev/netif/bwn/bwn/if_bwnreg.h>
-#include <dev/netif/bwn/bwn/if_bwnvar.h>
+#include "if_bwnreg.h"
+#include "if_bwnvar.h"
 
 static SYSCTL_NODE(_hw, OID_AUTO, bwn, CTLFLAG_RD, 0,
     "Broadcom driver parameters");
@@ -1105,10 +1105,10 @@ bwn_detach(device_t dev)
        if (device_is_attached(sc->sc_dev)) {
                bwn_stop(sc, 1);
                bwn_dma_free(mac);
-               callout_drain(&sc->sc_led_blink_ch);
-               callout_drain(&sc->sc_rfswitch_ch);
-               callout_drain(&sc->sc_task_ch);
-               callout_drain(&sc->sc_watchdog_ch);
+               callout_stop_sync(&sc->sc_led_blink_ch);
+               callout_stop_sync(&sc->sc_rfswitch_ch);
+               callout_stop_sync(&sc->sc_task_ch);
+               callout_stop_sync(&sc->sc_watchdog_ch);
                bwn_phy_detach(mac);
                if (ifp != NULL) {
                        wlan_serialize_exit();
@@ -7733,7 +7733,7 @@ bwn_fw_loaducode(struct bwn_mac *mac)
                        error = ENXIO;
                        goto error;
                }
-               tsleep(sc, 0, "bwndelay", (50 * hz) / 1000);
+               DELAY(50000);
        }
        BWN_READ_4(mac, BWN_INTR_REASON);
 
index e477f49..b9f18a3 100644 (file)
@@ -51,9 +51,9 @@ __FBSDID("$FreeBSD: head/sys/dev/siba/siba_bwn.c 257241 2013-10-28 07:29:16Z gle
 #include <bus/pci/pcivar.h>
 #include <bus/pci/pcireg.h>
 
-#include <dev/netif/bwn/siba/siba_ids.h>
-#include <dev/netif/bwn/siba/sibareg.h>
-#include <dev/netif/bwn/siba/sibavar.h>
+#include "siba_ids.h"
+#include "sibareg.h"
+#include "sibavar.h"
 
 /*
  * PCI glue.
index ba0190c..16d184f 100644 (file)
@@ -52,9 +52,9 @@ __FBSDID("$FreeBSD: head/sys/dev/siba/siba_core.c 257241 2013-10-28 07:29:16Z gl
 #include <bus/pci/pcivar.h>
 #include <bus/pci/pcireg.h>
 
-#include <dev/netif/bwn/siba/siba_ids.h>
-#include <dev/netif/bwn/siba/sibareg.h>
-#include <dev/netif/bwn/siba/sibavar.h>
+#include "siba_ids.h"
+#include "sibareg.h"
+#include "sibavar.h"
 
 #ifdef SIBA_DEBUG
 enum {