summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2006-12-14 09:23:24 +0000
committerreyk <reyk@openbsd.org>2006-12-14 09:23:24 +0000
commita1675396bf71995c995ba52a954b019273cb51eb (patch)
treec58c9bec5367574ffed2b23b7b409a56c8214e6c
parentIf an MS-DOS filesystem claims to have more clusters than can be (diff)
downloadwireguard-openbsd-a1675396bf71995c995ba52a954b019273cb51eb.tar.xz
wireguard-openbsd-a1675396bf71995c995ba52a954b019273cb51eb.zip
fix a minor bug in the tx data queue setup by using the right queue
type. this would cause us some more trouble with WME which isn't supported yet... thanks to Nick Kossifidis
-rw-r--r--sys/dev/ic/ar5212.c7
-rw-r--r--sys/dev/ic/ath.c5
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/ic/ar5212.c b/sys/dev/ic/ar5212.c
index 41f5263deb0..2aa525dcb0c 100644
--- a/sys/dev/ic/ar5212.c
+++ b/sys/dev/ic/ar5212.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar5212.c,v 1.33 2006/09/19 17:49:13 reyk Exp $ */
+/* $OpenBSD: ar5212.c,v 1.34 2006/12/14 09:23:24 reyk Exp $ */
/*
* Copyright (c) 2004, 2005 Reyk Floeter <reyk@openbsd.org>
@@ -945,13 +945,12 @@ ar5k_ar5212_setup_tx_queue(struct ath_hal *hal, HAL_TX_QUEUE queue_type,
* Setup internal queue structure
*/
bzero(&hal->ah_txq[queue], sizeof(HAL_TXQ_INFO));
- hal->ah_txq[queue].tqi_type = queue_type;
-
if (queue_info != NULL) {
if (ar5k_ar5212_setup_tx_queueprops(hal, queue, queue_info)
!= AH_TRUE)
return (-1);
}
+ hal->ah_txq[queue].tqi_type = queue_type;
AR5K_Q_ENABLE_BITS(hal->ah_txq_interrupts, queue);
@@ -964,7 +963,7 @@ ar5k_ar5212_setup_tx_queueprops(struct ath_hal *hal, int queue,
{
AR5K_ASSERT_ENTRY(queue, hal->ah_capabilities.cap_queues.q_tx_num);
- if (hal->ah_txq[queue].tqi_type == HAL_TX_QUEUE_INACTIVE)
+ if (hal->ah_txq[queue].tqi_type != HAL_TX_QUEUE_INACTIVE)
return (AH_FALSE);
bcopy(queue_info, &hal->ah_txq[queue], sizeof(HAL_TXQ_INFO));
diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c
index be126db4c65..0a7b020b4a8 100644
--- a/sys/dev/ic/ath.c
+++ b/sys/dev/ic/ath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ath.c,v 1.59 2006/11/06 08:48:49 reyk Exp $ */
+/* $OpenBSD: ath.c,v 1.60 2006/12/14 09:23:24 reyk Exp $ */
/* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */
/*-
@@ -322,7 +322,7 @@ ath_attach(u_int16_t devid, struct ath_softc *sc)
* allocate more tx queues for splitting management
* frames and for QOS support.
*/
- sc->sc_bhalq = ath_hal_setup_tx_queue(ah,HAL_TX_QUEUE_BEACON,NULL);
+ sc->sc_bhalq = ath_hal_setup_tx_queue(ah, HAL_TX_QUEUE_BEACON, NULL);
if (sc->sc_bhalq == (u_int) -1) {
printf(": unable to setup a beacon xmit queue!\n");
goto bad2;
@@ -330,6 +330,7 @@ ath_attach(u_int16_t devid, struct ath_softc *sc)
for (i = 0; i <= HAL_TX_QUEUE_ID_DATA_MAX; i++) {
bzero(&qinfo, sizeof(qinfo));
+ qinfo.tqi_type = HAL_TX_QUEUE_DATA;
qinfo.tqi_subtype = i; /* should be mapped to WME types */
sc->sc_txhalq[i] = ath_hal_setup_tx_queue(ah,
HAL_TX_QUEUE_DATA, &qinfo);