summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/if_urtw.c29
-rw-r--r--sys/dev/usb/if_urtwreg.h6
2 files changed, 18 insertions, 17 deletions
diff --git a/sys/dev/usb/if_urtw.c b/sys/dev/usb/if_urtw.c
index 3c90ad13da9..a5dfd31892d 100644
--- a/sys/dev/usb/if_urtw.c
+++ b/sys/dev/usb/if_urtw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_urtw.c,v 1.17 2009/06/04 21:21:15 martynas Exp $ */
+/* $OpenBSD: if_urtw.c,v 1.18 2009/06/04 21:52:10 martynas Exp $ */
/*-
* Copyright (c) 2008 Weongyo Jeong <weongyo@FreeBSD.org>
@@ -877,8 +877,9 @@ urtw_media_change(struct ifnet *ifp)
if (error != ENETRESET)
return (error);
- if ((ifp->if_flags & (IFF_UP | IFF_RUNNING)) == (IFF_UP | IFF_RUNNING))
- urtw_init(ifp);
+ if ((ifp->if_flags & (IFF_UP | IFF_RUNNING)) ==
+ (IFF_UP | IFF_RUNNING))
+ ifp->if_init(ifp);
return (0);
}
@@ -1588,10 +1589,10 @@ urtw_reset(struct urtw_softc *sc)
uint8_t data;
usbd_status error;
- error = urtw_8180_set_anaparam(sc, URTW_8225_ANAPARAM_ON);
+ error = urtw_8180_set_anaparam(sc, URTW_8187_8225_ANAPARAM_ON);
if (error)
goto fail;
- error = urtw_8185_set_anaparam2(sc, URTW_8225_ANAPARAM2_ON);
+ error = urtw_8185_set_anaparam2(sc, URTW_8187_8225_ANAPARAM2_ON);
if (error)
goto fail;
@@ -1627,10 +1628,10 @@ urtw_reset(struct urtw_softc *sc)
goto fail;
usbd_delay_ms(sc->sc_udev, 100);
- error = urtw_8180_set_anaparam(sc, URTW_8225_ANAPARAM_ON);
+ error = urtw_8180_set_anaparam(sc, URTW_8187_8225_ANAPARAM_ON);
if (error)
goto fail;
- error = urtw_8185_set_anaparam2(sc, URTW_8225_ANAPARAM2_ON);
+ error = urtw_8185_set_anaparam2(sc, URTW_8187_8225_ANAPARAM2_ON);
if (error)
goto fail;
fail:
@@ -2222,7 +2223,7 @@ urtw_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
urtw_set_multi(sc);
} else {
if (!(ifp->if_flags & IFF_RUNNING))
- urtw_init(ifp);
+ ifp->if_init(ifp);
}
} else {
if (ifp->if_flags & IFF_RUNNING)
@@ -2265,7 +2266,7 @@ urtw_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
if (error == ENETRESET) {
if ((ifp->if_flags & (IFF_RUNNING | IFF_UP)) ==
(IFF_RUNNING | IFF_UP))
- urtw_init(ifp);
+ ifp->if_init(ifp);
error = 0;
}
@@ -2672,7 +2673,7 @@ urtw_8225_set_txpwrlvl(struct urtw_softc *sc, int chan)
idx = ofdm_pwrlvl % 6;
set = ofdm_pwrlvl / 6;
- error = urtw_8185_set_anaparam2(sc, URTW_8225_ANAPARAM2_ON);
+ error = urtw_8185_set_anaparam2(sc, URTW_8187_8225_ANAPARAM2_ON);
if (error)
goto fail;
urtw_8187_write_phy_ofdm(sc, 2, 0x42);
@@ -2706,7 +2707,7 @@ urtw_8225_rf_init(struct urtw_softc *sc)
uint16_t data;
usbd_status error;
- error = urtw_8180_set_anaparam(sc, URTW_8225_ANAPARAM_ON);
+ error = urtw_8180_set_anaparam(sc, URTW_8187_8225_ANAPARAM_ON);
if (error)
goto fail;
@@ -3053,7 +3054,7 @@ urtw_8225v2_set_txpwrlvl(struct urtw_softc *sc, int chan)
ofdm_pwrlvl += sc->sc_txpwr_ofdm_base;
ofdm_pwrlvl = (ofdm_pwrlvl > 35) ? 35 : ofdm_pwrlvl;
- error = urtw_8185_set_anaparam2(sc, URTW_8225_ANAPARAM2_ON);
+ error = urtw_8185_set_anaparam2(sc, URTW_8187_8225_ANAPARAM2_ON);
if (error)
goto fail;
@@ -3078,7 +3079,7 @@ urtw_8225v2_rf_init(struct urtw_softc *sc)
uint32_t data32;
usbd_status error;
- error = urtw_8180_set_anaparam(sc, URTW_8225_ANAPARAM_ON);
+ error = urtw_8180_set_anaparam(sc, URTW_8187_8225_ANAPARAM_ON);
if (error)
goto fail;
@@ -3235,7 +3236,7 @@ urtw_set_chan(struct urtw_softc *sc, struct ieee80211_channel *c)
if (chan == 0 || chan == IEEE80211_CHAN_ANY)
return;
/*
- * During changing the channel we need to temporary be disable
+ * During changing the channel we need to temporary disable
* TX.
*/
urtw_read32_m(sc, URTW_TX_CONF, &data);
diff --git a/sys/dev/usb/if_urtwreg.h b/sys/dev/usb/if_urtwreg.h
index 939027fee17..b613c10f406 100644
--- a/sys/dev/usb/if_urtwreg.h
+++ b/sys/dev/usb/if_urtwreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_urtwreg.h,v 1.8 2009/06/04 21:21:15 martynas Exp $ */
+/* $OpenBSD: if_urtwreg.h,v 1.9 2009/06/04 21:52:10 martynas Exp $ */
/*-
* Copyright (c) 2008 Weongyo Jeong <weongyo@FreeBSD.org>
@@ -121,7 +121,7 @@
#define URTW_EPROM_CS (0x8)
#define URTW_CONFIG2 0x0053
#define URTW_ANAPARAM 0x0054 /* 4 byte */
-#define URTW_8225_ANAPARAM_ON (0xa0000a59)
+#define URTW_8187_8225_ANAPARAM_ON (0xa0000a59)
#define URTW_MSR 0x0058 /* 1 byte */
#define URTW_MSR_LINK_MASK ((1 << 2) | (1 << 3))
#define URTW_MSR_LINK_SHIFT (2)
@@ -134,7 +134,7 @@
#define URTW_CONFIG3_ANAPARAM_W_SHIFT (6)
#define URTW_PSR 0x005e /* 1 byte */
#define URTW_ANAPARAM2 0x0060 /* 4 byte */
-#define URTW_8225_ANAPARAM2_ON (0x860c7312)
+#define URTW_8187_8225_ANAPARAM2_ON (0x860c7312)
#define URTW_BEACON_INTERVAL 0x0070 /* 2 byte */
#define URTW_ATIM_WND 0x0072 /* 2 byte */
#define URTW_BEACON_INTERVAL_TIME 0x0074 /* 2 byte */