summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authordyoung <dyoung@NetBSD.org>2004-01-10 07:51:16 +0000
committerdyoung <dyoung@NetBSD.org>2004-01-10 07:51:16 +0000
commit0370da2a5dd55dad6fbd8b9361a730e77452cc6d (patch)
treee89638e56e08d43ed1dd81db4435936acfb0ff38 /sys/dev
parent348c2d96032059993c5b2716e84f406f39f85370 (diff)
In atw_rf3000_tune, enable I/O with the modem and RF front-end
"just in time" instead of at the top of the function.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/atw.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ic/atw.c b/sys/dev/ic/atw.c
index 9a97becebe9..c6aa2e40af4 100644
--- a/sys/dev/ic/atw.c
+++ b/sys/dev/ic/atw.c
@@ -1,4 +1,4 @@
-/* $NetBSD: atw.c,v 1.16 2004/01/10 07:47:02 dyoung Exp $ */
+/* $NetBSD: atw.c,v 1.17 2004/01/10 07:51:16 dyoung Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2002, 2003, 2004 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atw.c,v 1.16 2004/01/10 07:47:02 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atw.c,v 1.17 2004/01/10 07:51:16 dyoung Exp $");
#include "bpfilter.h"
@@ -1568,8 +1568,6 @@ atw_rf3000_tune(sc, chan)
u_int32_t reg;
u_int16_t txpower, lpf_cutoff, lna_gs_thresh;
- atw_rfio_enable(sc, 1);
-
txpower = sc->sc_srom[ATW_SR_TXPOWER(chan)];
lpf_cutoff = sc->sc_srom[ATW_SR_LPF_CUTOFF(chan)];
lna_gs_thresh = sc->sc_srom[ATW_SR_LNA_GS_THRESH(chan)];
@@ -1593,6 +1591,8 @@ atw_rf3000_tune(sc, chan)
"lna_gs_thresh %02x\n",
sc->sc_dev.dv_xname, chan, txpower, lpf_cutoff, lna_gs_thresh));
+ atw_rfio_enable(sc, 1);
+
if ((rc = atw_rf3000_write(sc, RF3000_GAINCTL,
LSHIFT(txpower, RF3000_GAINCTL_TXVGC_MASK))) != 0)
goto out;