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

Collapse All | Expand All

(-)b/sys/dev/rtwn/rtl8192e/r92e_chan.c (+11 lines)
Lines 212-220 void Link Here
212
r92e_set_chan(struct rtwn_softc *sc, struct ieee80211_channel *c)
212
r92e_set_chan(struct rtwn_softc *sc, struct ieee80211_channel *c)
213
{
213
{
214
	struct r92e_softc *rs = sc->sc_priv;
214
	struct r92e_softc *rs = sc->sc_priv;
215
	struct rtwn_usb_softc *uc;
215
	u_int chan;
216
	u_int chan;
216
	int i;
217
	int i;
217
218
219
	if ((uc = RTWN_USB_SOFTC(sc)) != NULL) {
220
		RTWN_LOCK(sc)
221
		uc->uc_set_chan = 1;
222
		RTWN_UNLOCK(sc)
223
	}
218
	chan = rtwn_chan2centieee(c);
224
	chan = rtwn_chan2centieee(c);
219
225
220
	for (i = 0; i < sc->nrxchains; i++) {
226
	for (i = 0; i < sc->nrxchains; i++) {
Lines 229-232 r92e_set_chan(struct rtwn_softc *sc, struct ieee80211_channel *c) Link Here
229
235
230
	/* Set Tx power for this new channel. */
236
	/* Set Tx power for this new channel. */
231
	r92e_set_txpower(sc, c);
237
	r92e_set_txpower(sc, c);
238
	if (uc != NULL) {
239
		RTWN_LOCK(sc)
240
		uc->uc_set_chan = 0;
241
		RTWN_UNLOCK(sc)
242
	}
232
}
243
}
(-)b/sys/dev/rtwn/usb/rtwn_usb_attach.c (+4 lines)
Lines 372-377 rtwn_usb_sysctlattach(struct rtwn_softc *sc) Link Here
372
		uc->uc_rx_buf_size = RTWN_USB_RXBUFSZ_MIN;
372
		uc->uc_rx_buf_size = RTWN_USB_RXBUFSZ_MIN;
373
	if (uc->uc_rx_buf_size > RTWN_USB_RXBUFSZ_MAX)
373
	if (uc->uc_rx_buf_size > RTWN_USB_RXBUFSZ_MAX)
374
		uc->uc_rx_buf_size = RTWN_USB_RXBUFSZ_MAX;
374
		uc->uc_rx_buf_size = RTWN_USB_RXBUFSZ_MAX;
375
	uc->uc_delay_us = RTWN_USB_DELAY_US_DEF;
376
	SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
377
	    "USB delay microseconds", CTLFLAG_RDTUN, &uc->uc_delay_us,
378
	    uc->uc_delay_us, str);
375
}
379
}
376
380
377
static int
381
static int
(-)b/sys/dev/rtwn/usb/rtwn_usb_reg.c (+4 lines)
Lines 91-102 rtwn_usb_write_region_1(struct rtwn_softc *sc, uint16_t addr, uint8_t *buf, Link Here
91
    int len)
91
    int len)
92
{
92
{
93
	usb_device_request_t req;
93
	usb_device_request_t req;
94
	struct rtwn_usb_softc *uc;
94
95
95
	req.bmRequestType = UT_WRITE_VENDOR_DEVICE;
96
	req.bmRequestType = UT_WRITE_VENDOR_DEVICE;
96
	req.bRequest = R92C_REQ_REGS;
97
	req.bRequest = R92C_REQ_REGS;
97
	USETW(req.wValue, addr);
98
	USETW(req.wValue, addr);
98
	USETW(req.wIndex, 0);
99
	USETW(req.wIndex, 0);
99
	USETW(req.wLength, len);
100
	USETW(req.wLength, len);
101
	uc = RTWN_USB_SOFTC(sc);
102
	if (uc->uc_set_chan == 1)
103
		(sc->sc_delay)(sc,uc->uc_delay_us);
100
	return (rtwn_do_request(sc, &req, buf));
104
	return (rtwn_do_request(sc, &req, buf));
101
}
105
}
102
106
(-)b/sys/dev/rtwn/usb/rtwn_usb_var.h (+3 lines)
Lines 28-33 Link Here
28
#define RTWN_USB_RXBUFSZ_DEF		(24)
28
#define RTWN_USB_RXBUFSZ_DEF		(24)
29
#define RTWN_USB_RXBUFSZ_MAX		(64)
29
#define RTWN_USB_RXBUFSZ_MAX		(64)
30
#define RTWN_USB_TXBUFSZ		(16 * 1024)
30
#define RTWN_USB_TXBUFSZ		(16 * 1024)
31
#define RTWN_USB_DELAY_US_DEF		1000
31
32
32
#define RTWN_IFACE_INDEX		0
33
#define RTWN_IFACE_INDEX		0
33
34
Lines 79-84 struct rtwn_usb_softc { Link Here
79
80
80
	int			ntx;
81
	int			ntx;
81
	int			tx_agg_desc_num;
82
	int			tx_agg_desc_num;
83
	int			uc_delay_us;
84
	int			uc_set_chan;
82
};
85
};
83
#define RTWN_USB_SOFTC(sc)	((struct rtwn_usb_softc *)(sc))
86
#define RTWN_USB_SOFTC(sc)	((struct rtwn_usb_softc *)(sc))
84
87

Return to bug 247528