git: a5ae63edd594 - main - LinuxKPI: 802.11: initialize txq

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Sat, 10 Jun 2023 23:08:58 UTC
The branch main has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=a5ae63edd59453f23d51a0cc61922bd3e1e4cce4

commit a5ae63edd59453f23d51a0cc61922bd3e1e4cce4
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2023-06-10 22:18:38 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2023-06-10 23:05:15 +0000

    LinuxKPI: 802.11: initialize txq
    
    In 5a9a0d7803382321b5f9fff1deae5fb08463cf1a we omitted the initialization
    of the per-hw txq settings.  Fix this.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      10 days
    Fixes:          5a9a0d7803382321b5f9fff1deae5fb08463cf1a
---
 sys/compat/linuxkpi/common/src/linux_80211.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c
index c9279581062e..5bc99a1b1ae5 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -3521,6 +3521,7 @@ linuxkpi_ieee80211_alloc_hw(size_t priv_len, const struct ieee80211_ops *ops)
 	struct ieee80211_hw *hw;
 	struct lkpi_hw *lhw;
 	struct wiphy *wiphy;
+	int ac;
 
 	/* Get us and the driver data also allocated. */
 	wiphy = wiphy_new(&linuxkpi_mac80211cfgops, sizeof(*lhw) + priv_len);
@@ -3534,6 +3535,10 @@ linuxkpi_ieee80211_alloc_hw(size_t priv_len, const struct ieee80211_ops *ops)
 	LKPI_80211_LHW_SCAN_LOCK_INIT(lhw);
 	sx_init_flags(&lhw->lvif_sx, "lhw-lvif", SX_RECURSE | SX_DUPOK);
 	TAILQ_INIT(&lhw->lvif_head);
+	for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
+		lhw->txq_generation[ac] = 1;
+		TAILQ_INIT(&lhw->scheduled_txqs[ac]);
+	}
 
 	/*
 	 * XXX-BZ TODO make sure there is a "_null" function to all ops