git: 05b1792754ea - stable/13 - LinuxKPI: 802.11: remove an early bandaid to make sure queues are allocated

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Fri, 01 Jul 2022 14:57:47 UTC
The branch stable/13 has been updated by bz:

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

commit 05b1792754ea397bd8147dd15df5e12f8fc1d2db
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2022-06-26 19:17:04 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2022-07-01 13:49:55 +0000

    LinuxKPI: 802.11: remove an early bandaid to make sure queues are allocated
    
    iwlwifi allocates queues on first wakeup.  This takes a lot longer on
    FreeBSD's work implementation that it seems to on Linux based on some
    discussion.  That meant that we couldn't get non-data frames out quickly
    enough initially and failed to associate.
    d0d2911035192473e8bd3f6b99ed5ca9b1b29e47 should have solved most of this
    for us with iwlwifi.  None of the other drivers ported to LinuxKPI/802.11
    up to today will call a dequeue so we get notified when the queus are
    allocated or even need to do so.
    Remove the bandaid initilly put in for iwlwifi now and speed up the
    overall process of getting us associated.
    
    (cherry picked from commit 841719c08fd3635a396f62a58aa017ae0bf563e0)
---
 sys/compat/linuxkpi/common/src/linux_80211.c | 41 ----------------------------
 1 file changed, 41 deletions(-)

diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c
index c19dca862d0a..728f732e5a75 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -1030,47 +1030,6 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int
 	 */
 	lkpi_wake_tx_queues(hw, sta, false, false);
 
-	{
-		int i, count;
-
-		for (i = 3 * (hw->queues + 1); i > 0; i--) {
-			struct lkpi_txq *ltxq;
-			int tid;
-
-			count = 0;
-			/* Wake up all queues to know they are allocated in the driver. */
-			for (tid = 0; tid < nitems(sta->txq); tid++) {
-
-				if (tid == IEEE80211_NUM_TIDS) {
-					IMPROVE("station specific?");
-					if (!ieee80211_hw_check(hw, STA_MMPDU_TXQ))
-						continue;
-				} else if (tid >= hw->queues)
-					continue;
-
-				if (sta->txq[tid] == NULL)
-					continue;
-
-				ltxq = TXQ_TO_LTXQ(sta->txq[tid]);
-				if (!ltxq->seen_dequeue)
-					count++;
-			}
-			if (count == 0)
-				break;
-#ifdef LINUXKPI_DEBUG_80211
-			if (count > 0)
-				ic_printf(vap->iv_ic, "%s: waiting for %d queues "
-				    "to be allocated by driver\n", __func__, count);
-#endif
-			pause("lkpi80211txq", hz/10);
-		}
-#ifdef LINUXKPI_DEBUG_80211
-		if (count > 0)
-			ic_printf(vap->iv_ic, "%s: %d queues still not "
-			    "allocated by driver\n", __func__, count);
-#endif
-	}
-
 	/* Start mgd_prepare_tx. */
 	memset(&prep_tx_info, 0, sizeof(prep_tx_info));
 	prep_tx_info.duration = PREP_TX_INFO_DURATION;