summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2006-01-29 15:44:17 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2006-01-29 15:44:17 +0000
commit3b4a53c2a4f246b7fae25dfee0f70a770315ed9a (patch)
tree0bab99edb9797a409e2bb89f99f6bed3e5bb3166
parent3edd8339e23a9037187787a41c867594434800a4 (diff)
re-enable scatter and fix scanning of 802.11a channels.
-rw-r--r--sys/dev/pci/if_iwi.c8
-rw-r--r--sys/dev/pci/if_iwireg.h7
2 files changed, 9 insertions, 6 deletions
diff --git a/sys/dev/pci/if_iwi.c b/sys/dev/pci/if_iwi.c
index 8e64d5392cb..fb4c718cd80 100644
--- a/sys/dev/pci/if_iwi.c
+++ b/sys/dev/pci/if_iwi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwi.c,v 1.57 2006/01/18 20:25:22 damien Exp $ */
+/* $OpenBSD: if_iwi.c,v 1.58 2006/01/29 15:44:16 damien Exp $ */
/*-
* Copyright (c) 2004-2006
@@ -459,8 +459,9 @@ iwi_dma_alloc(struct iwi_softc *sc)
* Allocate Tx buffers DMA maps
*/
for (i = 0; i < IWI_TX_RING_SIZE; i++) {
- error = bus_dmamap_create(sc->sc_dmat, MCLBYTES, 1, MCLBYTES,
- 0, BUS_DMA_NOWAIT, &sc->tx_buf[i].map);
+ error = bus_dmamap_create(sc->sc_dmat, MCLBYTES,
+ IWI_MAX_NSEG - 2, MCLBYTES, 0, BUS_DMA_NOWAIT,
+ &sc->tx_buf[i].map);
if (error != 0) {
printf("%s: could not create tx buf DMA map",
sc->sc_dev.dv_xname);
@@ -1883,6 +1884,7 @@ iwi_scan(struct iwi_softc *sc)
}
*(p - count) = IWI_CHAN_5GHZ | count;
+ p = (count > 0) ? p + 1 : scan.channels;
count = 0;
for (i = 0; i <= IEEE80211_CHAN_MAX; i++) {
if (IEEE80211_IS_CHAN_2GHZ(&ic->ic_channels[i]) &&
diff --git a/sys/dev/pci/if_iwireg.h b/sys/dev/pci/if_iwireg.h
index 8771523a35b..fe9697a53b6 100644
--- a/sys/dev/pci/if_iwireg.h
+++ b/sys/dev/pci/if_iwireg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwireg.h,v 1.18 2006/01/18 20:25:22 damien Exp $ */
+/* $OpenBSD: if_iwireg.h,v 1.19 2006/01/29 15:44:16 damien Exp $ */
/*-
* Copyright (c) 2004-2006
@@ -234,6 +234,7 @@ struct iwi_tx_desc {
u_int32_t nseg;
#define IWI_MAX_NSEG 6
+
u_int32_t seg_addr[IWI_MAX_NSEG];
u_int16_t seg_len[IWI_MAX_NSEG];
} __packed;
@@ -331,13 +332,13 @@ struct iwi_scan {
#define IWI_CHAN_5GHZ (0 << 6)
#define IWI_CHAN_2GHZ (1 << 6)
- u_int8_t type[26];
+ u_int8_t type[27];
#define IWI_SCAN_TYPE_PASSIVE 0x11
#define IWI_SCAN_TYPE_DIRECTED 0x22
#define IWI_SCAN_TYPE_BROADCAST 0x33
#define IWI_SCAN_TYPE_BDIRECTED 0x44
- u_int8_t reserved1[2];
+ u_int8_t reserved1;
u_int16_t reserved2;
u_int16_t passive; /* dwell time */
u_int16_t directed; /* dwell time */