summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorkiyohara <kiyohara@NetBSD.org>2007-06-09 12:13:12 +0000
committerkiyohara <kiyohara@NetBSD.org>2007-06-09 12:13:12 +0000
commit83e06e734e67c13f66e6fef331ff7e6b3636fd08 (patch)
tree07378ce11fef720087a64d8f841b2228ea0673fe /sys/dev
parent8f6cd34a623cbd9c01d1df366cc1730ca0f78097 (diff)
Use usb_callout.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/if_rum.c22
-rw-r--r--sys/dev/usb/if_rumvar.h4
-rw-r--r--sys/dev/usb/if_ural.c22
-rw-r--r--sys/dev/usb/if_uralvar.h6
4 files changed, 27 insertions, 27 deletions
diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c
index db5f9278aa7..76f52a78f40 100644
--- a/sys/dev/usb/if_rum.c
+++ b/sys/dev/usb/if_rum.c
@@ -1,5 +1,5 @@
/* $OpenBSD: if_rum.c,v 1.40 2006/09/18 16:20:20 damien Exp $ */
-/* $NetBSD: if_rum.c,v 1.11 2007/05/07 07:14:58 xtraeme Exp $ */
+/* $NetBSD: if_rum.c,v 1.12 2007/06/09 12:13:12 kiyohara Exp $ */
/*-
* Copyright (c) 2005, 2006 Damien Bergamini <damien.bergamini@free.fr>
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_rum.c,v 1.11 2007/05/07 07:14:58 xtraeme Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_rum.c,v 1.12 2007/06/09 12:13:12 kiyohara Exp $");
#include "bpfilter.h"
@@ -351,11 +351,11 @@ USB_ATTACH(rum)
}
usb_init_task(&sc->sc_task, rum_task, sc);
- callout_init(&sc->scan_ch);
+ usb_callout_init(sc->sc_scan_ch);
sc->amrr.amrr_min_success_threshold = 1;
sc->amrr.amrr_max_success_threshold = 10;
- callout_init(&sc->amrr_ch);
+ usb_callout_init(sc->sc_amrr_ch);
/* retrieve RT2573 rev. no */
for (ntries = 0; ntries < 1000; ntries++) {
@@ -481,8 +481,8 @@ USB_DETACH(rum)
rum_stop(ifp, 1);
usb_rem_task(sc->sc_udev, &sc->sc_task);
- callout_stop(&sc->scan_ch);
- callout_stop(&sc->amrr_ch);
+ usb_uncallout(sc->sc_scan_ch, rum_next_scan, sc);
+ usb_uncallout(sc->sc_amrr_ch, rum_amrr_timeout, sc);
if (sc->amrr_xfer != NULL) {
usbd_free_xfer(sc->amrr_xfer);
@@ -700,7 +700,7 @@ rum_task(void *arg)
case IEEE80211_S_SCAN:
rum_set_chan(sc, ic->ic_curchan);
- callout_reset(&sc->scan_ch, hz / 5, rum_next_scan, sc);
+ usb_callout(sc->sc_scan_ch, hz / 5, rum_next_scan, sc);
break;
case IEEE80211_S_AUTH:
@@ -748,8 +748,8 @@ rum_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg)
struct rum_softc *sc = ic->ic_ifp->if_softc;
usb_rem_task(sc->sc_udev, &sc->sc_task);
- callout_stop(&sc->scan_ch);
- callout_stop(&sc->amrr_ch);
+ usb_uncallout(sc->sc_scan_ch, rum_next_scan, sc);
+ usb_uncallout(sc->sc_amrr_ch, rum_amrr_timeout, sc);
/* do it in a process context */
sc->sc_state = nstate;
@@ -2185,7 +2185,7 @@ rum_amrr_start(struct rum_softc *sc, struct ieee80211_node *ni)
i--);
ni->ni_txrate = i;
- callout_reset(&sc->amrr_ch, hz, rum_amrr_timeout, sc);
+ usb_callout(sc->sc_amrr_ch, hz, rum_amrr_timeout, sc);
}
Static void
@@ -2241,7 +2241,7 @@ rum_amrr_update(usbd_xfer_handle xfer, usbd_private_handle priv,
ieee80211_amrr_choose(&sc->amrr, sc->sc_ic.ic_bss, &sc->amn);
- callout_reset(&sc->amrr_ch, hz, rum_amrr_timeout, sc);
+ usb_callout(sc->sc_amrr_ch, hz, rum_amrr_timeout, sc);
}
int
diff --git a/sys/dev/usb/if_rumvar.h b/sys/dev/usb/if_rumvar.h
index 608ef5d01e0..ad8cede22a3 100644
--- a/sys/dev/usb/if_rumvar.h
+++ b/sys/dev/usb/if_rumvar.h
@@ -108,8 +108,8 @@ struct rum_softc {
struct ieee80211_beacon_offsets sc_bo;
- struct callout scan_ch;
- struct callout amrr_ch;
+ usb_callout_t sc_scan_ch;
+ usb_callout_t sc_amrr_ch;
int sc_tx_timer;
diff --git a/sys/dev/usb/if_ural.c b/sys/dev/usb/if_ural.c
index ee953b59dd3..d46416ba26a 100644
--- a/sys/dev/usb/if_ural.c
+++ b/sys/dev/usb/if_ural.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ural.c,v 1.21 2007/05/07 07:29:03 xtraeme Exp $ */
+/* $NetBSD: if_ural.c,v 1.22 2007/06/09 12:13:12 kiyohara Exp $ */
/* $FreeBSD: /repoman/r/ncvs/src/sys/dev/usb/if_ural.c,v 1.40 2006/06/02 23:14:40 sam Exp $ */
/*-
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ural.c,v 1.21 2007/05/07 07:29:03 xtraeme Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ural.c,v 1.22 2007/06/09 12:13:12 kiyohara Exp $");
#include "bpfilter.h"
@@ -423,10 +423,10 @@ USB_ATTACH(ural)
}
usb_init_task(&sc->sc_task, ural_task, sc);
- callout_init(&sc->scan_ch);
+ usb_callout_init(sc->sc_scan_ch);
sc->amrr.amrr_min_success_threshold = 1;
sc->amrr.amrr_min_success_threshold = 15;
- callout_init(&sc->amrr_ch);
+ usb_callout_init(sc->sc_amrr_ch);
/* retrieve RT2570 rev. no */
sc->asic_rev = ural_read(sc, RAL_MAC_CSR0);
@@ -538,8 +538,8 @@ USB_DETACH(ural)
ural_stop(ifp, 1);
usb_rem_task(sc->sc_udev, &sc->sc_task);
- callout_stop(&sc->scan_ch);
- callout_stop(&sc->amrr_ch);
+ usb_uncallout(sc->sc_scan_ch, ural_next_scan, sc);
+ usb_uncallout(sc->sc_amrr_ch, ural_amrr_timeout, sc);
if (sc->amrr_xfer != NULL) {
usbd_free_xfer(sc->amrr_xfer);
@@ -756,7 +756,7 @@ ural_task(void *arg)
case IEEE80211_S_SCAN:
ural_set_chan(sc, ic->ic_curchan);
- callout_reset(&sc->scan_ch, hz / 5, ural_next_scan, sc);
+ usb_callout(sc->sc_scan_ch, hz / 5, ural_next_scan, sc);
break;
case IEEE80211_S_AUTH:
@@ -823,8 +823,8 @@ ural_newstate(struct ieee80211com *ic, enum ieee80211_state nstate,
struct ural_softc *sc = ic->ic_ifp->if_softc;
usb_rem_task(sc->sc_udev, &sc->sc_task);
- callout_stop(&sc->scan_ch);
- callout_stop(&sc->amrr_ch);
+ usb_uncallout(sc->sc_scan_ch, ural_next_scan, sc);
+ usb_uncallout(sc->sc_amrr_ch, ural_amrr_timeout, sc);
/* do it in a process context */
sc->sc_state = nstate;
@@ -2318,7 +2318,7 @@ ural_amrr_start(struct ural_softc *sc, struct ieee80211_node *ni)
i--);
ni->ni_txrate = i;
- callout_reset(&sc->amrr_ch, hz, ural_amrr_timeout, sc);
+ usb_callout(sc->sc_amrr_ch, hz, ural_amrr_timeout, sc);
}
Static void
@@ -2375,5 +2375,5 @@ ural_amrr_update(usbd_xfer_handle xfer, usbd_private_handle priv,
ieee80211_amrr_choose(&sc->amrr, sc->sc_ic.ic_bss, &sc->amn);
- callout_reset(&sc->amrr_ch, hz, ural_amrr_timeout, sc);
+ usb_callout(sc->sc_amrr_ch, hz, ural_amrr_timeout, sc);
}
diff --git a/sys/dev/usb/if_uralvar.h b/sys/dev/usb/if_uralvar.h
index d6fe2bd9925..afa10fe083f 100644
--- a/sys/dev/usb/if_uralvar.h
+++ b/sys/dev/usb/if_uralvar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: if_uralvar.h,v 1.7 2007/03/04 06:02:48 christos Exp $ */
+/* $NetBSD: if_uralvar.h,v 1.8 2007/06/09 12:13:12 kiyohara Exp $ */
/* $OpenBSD: if_ralvar.h,v 1.2 2005/05/13 18:42:50 damien Exp $ */
/*-
@@ -104,8 +104,8 @@ struct ural_softc {
struct ieee80211_beacon_offsets sc_bo;
- struct callout scan_ch;
- struct callout amrr_ch;
+ usb_callout_t sc_scan_ch;
+ usb_callout_t sc_amrr_ch;
int sc_tx_timer;