-/* $OpenBSD: qwx.c,v 1.22 2024/02/08 11:16:49 stsp Exp $ */
+/* $OpenBSD: qwx.c,v 1.23 2024/02/08 11:20:29 stsp Exp $ */
/*
* Copyright 2023 Stefan Sperling <stsp@openbsd.org>
if (arvif->txmgmt.queued > 0)
arvif->txmgmt.queued--;
+ if (arvif->txmgmt.queued < nitems(arvif->txmgmt.data) - 1)
+ sc->qfullmsk &= ~(1U << QWX_MGMT_QUEUE_ID);
+
if (tx_compl_param->status != 0)
ifp->if_oerrors++;
}
qwx_dp_tx_complete_msdu(sc, tx_ring, msdu_id, &ts);
}
+ if (tx_ring->queued < sc->hw_params.tx_ring_size - 1)
+ sc->qfullmsk &= ~(1 << ring_id);
+
return 0;
}
#endif
tx_ring->queued++;
tx_ring->cur = (tx_ring->cur + 1) % sc->hw_params.tx_ring_size;
+
+ if (tx_ring->queued >= sc->hw_params.tx_ring_size - 1)
+ sc->qfullmsk |= (1 << ti.ring_id);
+
return 0;
}
txmgmt->cur = (txmgmt->cur + 1) % nitems(txmgmt->data);
txmgmt->queued++;
+
+ if (txmgmt->queued >= nitems(txmgmt->data) - 1)
+ sc->qfullmsk |= (1U << QWX_MGMT_QUEUE_ID);
+
return 0;
err_unmap_buf:
-/* $OpenBSD: qwxvar.h,v 1.12 2024/02/06 14:18:15 stsp Exp $ */
+/* $OpenBSD: qwxvar.h,v 1.13 2024/02/08 11:20:29 stsp Exp $ */
/*
* Copyright (c) 2018-2019 The Linux Foundation.
int sc_tx_timer;
uint32_t qfullmsk;
+#define QWX_MGMT_QUEUE_ID 31
bus_addr_t mem;
struct ath11k_hw_params hw_params;