diff options
author | Marcus Glocker <mglocker@cvs.openbsd.org> | 2008-01-01 20:20:31 +0000 |
---|---|---|
committer | Marcus Glocker <mglocker@cvs.openbsd.org> | 2008-01-01 20:20:31 +0000 |
commit | e98682dee0385b6e2ad850d5b9e483b188c6693a (patch) | |
tree | 6a757606b49f8ff4f4dcfc6230322865cbae9bd1 /sys/dev/usb/if_upgt.c | |
parent | c90b9b71fd9c78b219ab3666ee9542f61a37a38e (diff) |
Add devices 11b rateset. Add/Adjust comments.
Diffstat (limited to 'sys/dev/usb/if_upgt.c')
-rw-r--r-- | sys/dev/usb/if_upgt.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/sys/dev/usb/if_upgt.c b/sys/dev/usb/if_upgt.c index 87cab92d933..fc0932eac7f 100644 --- a/sys/dev/usb/if_upgt.c +++ b/sys/dev/usb/if_upgt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_upgt.c,v 1.11 2008/01/01 11:43:48 mglocker Exp $ */ +/* $OpenBSD: if_upgt.c,v 1.12 2008/01/01 20:20:30 mglocker Exp $ */ /* * Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org> @@ -160,8 +160,13 @@ static const struct usb_devno upgt_devs[] = { { USB_VENDOR_ZCOM, USB_PRODUCT_ZCOM_XG703A } }; -/* XXX for now just keep a rateset here */ -uint8_t rates[] = { 0x0b, 0x0a, 0x09, 0x08, 0x07, 0x06, 0x04, 0x01 }; +/* + * XXX For now just keep the device ratesets here. + * It seems the device does hardware rate control based on those available + * ratesets. + */ +uint8_t rates_11g[] = { 0x0b, 0x0a, 0x09, 0x08, 0x07, 0x06, 0x04, 0x01 }; +uint8_t rates_11b[] = { 0x13, 0x13, 0x12, 0x11, 0x11, 0x10, 0x10, 0x10 }; int upgt_match(struct device *parent, void *match, void *aux) @@ -225,8 +230,7 @@ upgt_attach(struct device *parent, struct device *self, void *aux) sc->sc_rx_no = ed->bEndpointAddress; /* - * XXX - * Just get the version 2 bulk pipes for now. + * XXX Just get the version 2 bulk pipes for now. * 0x01 TX pipe * 0x81 RX pipe * 0x02 TX MGMT pipe (not used with fw version >2.5.x) @@ -1475,9 +1479,14 @@ upgt_tx_task(void *arg) txdesc->header2.type = htole16(UPGT_H2_TYPE_TX_ACK_YES); txdesc->header2.flags = htole16(UPGT_H2_FLAGS_TX_ACK_YES); - bcopy(rates, txdesc->rates, sizeof(txdesc->rates)); + /* + * XXX As soon we have found out why the device crashes on + * higher rates, we need to switch dynamically between 11b + * and 11g here. For now we set 11b fix. + */ + bcopy(rates_11b, txdesc->rates, sizeof(txdesc->rates)); txdesc->type = htole32(UPGT_TX_DESC_TYPE_DATA); - txdesc->pad3[0] = UPGT_TX_DESC_PAD3_SIZE; + txdesc->pad3 = UPGT_TX_DESC_PAD3_SIZE; #if NBPFILTER > 0 if (sc->sc_drvbpf != NULL) { |