Fortunately, this bug was harmless. The last Tx agg queue is never used
because ieee80211_classify() only returns TID values in the range 0 - 3.
And iterations over the txq array use nitems() to find the upper bound.
The possiblity of shrinking the txq array by 4 elements to get rid of
unused Tx agg queues could be investigated later.
For now, just fix the off-by-one error.
ok kettenis@
-/* $OpenBSD: if_iwxreg.h,v 1.31 2021/09/23 15:34:00 stsp Exp $ */
+/* $OpenBSD: if_iwxreg.h,v 1.32 2021/11/22 10:31:58 stsp Exp $ */
/*-
* Based on BSD-licensed source modules in the Linux iwlwifi driver,
#define IWX_MAX_TID_COUNT 8
#define IWX_FIRST_AGG_TX_QUEUE (IWX_DQA_MGMT_QUEUE + 1)
#define IWX_LAST_AGG_TX_QUEUE (IWX_FIRST_AGG_TX_QUEUE + IWX_MAX_TID_COUNT - 1)
+#define IWX_NUM_TX_QUEUES (IWX_LAST_AGG_TX_QUEUE + 1)
/**
* Max Tx window size is the max number of contiguous TFDs that the scheduler
-/* $OpenBSD: if_iwxvar.h,v 1.25 2021/10/15 13:38:10 stsp Exp $ */
+/* $OpenBSD: if_iwxvar.h,v 1.26 2021/11/22 10:31:58 stsp Exp $ */
/*
* Copyright (c) 2014 genua mbh <info@genua.de>
int sc_msix;
/* TX/RX rings. */
- struct iwx_tx_ring txq[IWX_LAST_AGG_TX_QUEUE];
+ struct iwx_tx_ring txq[IWX_NUM_TX_QUEUES];
struct iwx_rx_ring rxq;
int qfullmsk;
int qenablemsk;