View | Details | Raw Unified | Return to bug 247528 | Differences between
and this patch

Collapse All | Expand All

(-)b/sys/dev/rtwn/rtl8188e/r88e_reg.h (+1 lines)
Lines 122-126 Link Here
122
122
123
/* Bits for R88E_XCK_OUT_CTRL. */
123
/* Bits for R88E_XCK_OUT_CTRL. */
124
#define R88E_XCK_OUT_CTRL_EN	1
124
#define R88E_XCK_OUT_CTRL_EN	1
125
#define R88E_USB_DELAY_US_DEF	1000
125
126
126
#endif	/* R88E_REG_H */
127
#endif	/* R88E_REG_H */
(-)b/sys/dev/rtwn/rtl8188e/usb/r88eu_init.c (-1 / +26 lines)
Lines 50-55 __FBSDID("$FreeBSD$"); Link Here
50
#include <dev/rtwn/rtl8192c/r92c.h>
50
#include <dev/rtwn/rtl8192c/r92c.h>
51
#include <dev/rtwn/rtl8192c/r92c_var.h>
51
#include <dev/rtwn/rtl8192c/r92c_var.h>
52
52
53
#include <dev/rtwn/usb/rtwn_usb_var.h>
54
53
#include <dev/rtwn/rtl8188e/usb/r88eu.h>
55
#include <dev/rtwn/rtl8188e/usb/r88eu.h>
54
#include <dev/rtwn/rtl8188e/usb/r88eu_reg.h>
56
#include <dev/rtwn/rtl8188e/usb/r88eu_reg.h>
55
57
Lines 78-85 r88eu_power_on(struct rtwn_softc *sc) Link Here
78
	if (res != 0)		\
80
	if (res != 0)		\
79
		return (EIO);	\
81
		return (EIO);	\
80
} while(0)
82
} while(0)
83
	struct rtwn_usb_softc *uc;
81
	int ntries;
84
	int ntries;
82
85
86
	if ((uc = RTWN_USB_SOFTC(sc)) != NULL) {
87
		RTWN_LOCK(sc);
88
		uc->uc_write_delay = 1;
89
		RTWN_UNLOCK(sc);
90
	}
91
83
	/* Wait for power ready bit. */
92
	/* Wait for power ready bit. */
84
	for (ntries = 0; ntries < 5000; ntries++) {
93
	for (ntries = 0; ntries < 5000; ntries++) {
85
		if (rtwn_read_4(sc, R92C_APS_FSMCO) & R92C_APS_FSMCO_SUS_HOST)
94
		if (rtwn_read_4(sc, R92C_APS_FSMCO) & R92C_APS_FSMCO_SUS_HOST)
Lines 87-92 r88eu_power_on(struct rtwn_softc *sc) Link Here
87
		rtwn_delay(sc, 10);
96
		rtwn_delay(sc, 10);
88
	}
97
	}
89
	if (ntries == 5000) {
98
	if (ntries == 5000) {
99
		if (uc != NULL) {
100
			RTWN_LOCK(sc);
101
			uc->uc_write_delay = 0;
102
			RTWN_UNLOCK(sc);
103
		}
90
		device_printf(sc->sc_dev,
104
		device_printf(sc->sc_dev,
91
		    "timeout waiting for chip power up\n");
105
		    "timeout waiting for chip power up\n");
92
		return (ETIMEDOUT);
106
		return (ETIMEDOUT);
Lines 114-120 r88eu_power_on(struct rtwn_softc *sc) Link Here
114
			break;
128
			break;
115
		rtwn_delay(sc, 10);
129
		rtwn_delay(sc, 10);
116
	}
130
	}
117
	if (ntries == 5000)
131
	if (ntries == 5000) {
132
		if (uc != NULL) {
133
			RTWN_LOCK(sc);
134
			uc->uc_write_delay = 0;
135
			RTWN_UNLOCK(sc);
136
		}
137
	}
118
		return (ETIMEDOUT);
138
		return (ETIMEDOUT);
119
139
120
	/* Enable LDO normal mode. */
140
	/* Enable LDO normal mode. */
Lines 130-135 r88eu_power_on(struct rtwn_softc *sc) Link Here
130
	    ((sc->sc_hwcrypto != RTWN_CRYPTO_SW) ? R92C_CR_ENSEC : 0) |
150
	    ((sc->sc_hwcrypto != RTWN_CRYPTO_SW) ? R92C_CR_ENSEC : 0) |
131
	    R92C_CR_CALTMR_EN));
151
	    R92C_CR_CALTMR_EN));
132
152
153
	if (uc != NULL) {
154
		RTWN_LOCK(sc);
155
		uc->uc_write_delay = 0;
156
		RTWN_UNLOCK(sc);
157
	}
133
	return (0);
158
	return (0);
134
#undef RTWN_CHK
159
#undef RTWN_CHK
135
}
160
}
(-)b/sys/dev/rtwn/rtl8192c/r92c_chan.c (+14 lines)
Lines 54-59 __FBSDID("$FreeBSD$"); Link Here
54
#include <dev/rtwn/rtl8192c/r92c_priv.h>
54
#include <dev/rtwn/rtl8192c/r92c_priv.h>
55
#include <dev/rtwn/rtl8192c/r92c_reg.h>
55
#include <dev/rtwn/rtl8192c/r92c_reg.h>
56
#include <dev/rtwn/rtl8192c/r92c_var.h>
56
#include <dev/rtwn/rtl8192c/r92c_var.h>
57
#include <dev/rtwn/usb/rtwn_usb_var.h>
57
58
58
static int
59
static int
59
r92c_get_power_group(struct rtwn_softc *sc, struct ieee80211_channel *c)
60
r92c_get_power_group(struct rtwn_softc *sc, struct ieee80211_channel *c)
Lines 293-301 void Link Here
293
r92c_set_chan(struct rtwn_softc *sc, struct ieee80211_channel *c)
294
r92c_set_chan(struct rtwn_softc *sc, struct ieee80211_channel *c)
294
{
295
{
295
	struct r92c_softc *rs = sc->sc_priv;
296
	struct r92c_softc *rs = sc->sc_priv;
297
	struct rtwn_usb_softc *uc;
296
	u_int chan;
298
	u_int chan;
297
	int i;
299
	int i;
298
300
301
	if ((uc = RTWN_USB_SOFTC(sc)) != NULL) {
302
		RTWN_LOCK(sc);
303
		uc->uc_write_delay = 1;
304
		RTWN_UNLOCK(sc);
305
	}
306
299
	chan = rtwn_chan2centieee(c);
307
	chan = rtwn_chan2centieee(c);
300
308
301
	/* Set Tx power for this new channel. */
309
	/* Set Tx power for this new channel. */
Lines 309-314 r92c_set_chan(struct rtwn_softc *sc, struct ieee80211_channel *c) Link Here
309
		r92c_set_bw40(sc, chan, IEEE80211_IS_CHAN_HT40U(c));
317
		r92c_set_bw40(sc, chan, IEEE80211_IS_CHAN_HT40U(c));
310
	else
318
	else
311
		rtwn_r92c_set_bw20(sc, chan);
319
		rtwn_r92c_set_bw20(sc, chan);
320
321
	if (uc != NULL) {
322
		RTWN_LOCK(sc);
323
		uc->uc_write_delay = 0;
324
		RTWN_UNLOCK(sc);
325
	}
312
}
326
}
313
327
314
void
328
void

Return to bug 247528