From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2D3D200A3A; Sun, 24 Mar 2024 23:03:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711321392; cv=none; b=XNB3cOWU+RwZLgM/2tEXdcXaqO1zc7RBbMv2Qr4k278KIY5iZ2xdWdrTd/kh/QjfcbsMoJE/+T4D1qy/qjoMmKIbD8n6gVw8h95ypBLVs6bP1wK7jv3iI7ZnQho1Smb9Gke58ACltE3tyW3ix7+Xsj4jl4dQfaEyBAY0lc4pYaM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711321392; c=relaxed/simple; bh=T+ReKdZ9roAuzU/DfsquugIpMTaDIpDuv/0TiIsOPPI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sFt1ef3hmMWUP92epHKcFJDKjw2wONu2a0S8MpbyCeMNCh0+1A9ENPVqh4avtXA5ylKnF7ESIUTWg6sXxHYJ3wzVhjOzLit7gzH8Yk/qT0v6ZkHsFquEPWBe2eWzJE1DmOAdtmHoupO17z8Znx4pTRBO30ZAwFBpfVejIDLi+/I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YHG6DYwg; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YHG6DYwg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 081C8C433F1; Sun, 24 Mar 2024 23:03:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711321392; bh=T+ReKdZ9roAuzU/DfsquugIpMTaDIpDuv/0TiIsOPPI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YHG6DYwg1JjTEOdtmTV4ruC6S92cr45J6WZt6aF7Idxi98wWqu0UnQWvrwGNKcupc UROP1lSIjYGRZNuGhsK5MOjMRiIqHxzBPA+uRJHe49ToLag7LH510hhUVLiSLRjpOV ckSHaBLr9tE+Y9l+3Snm6rkqWVI4klfBeG6nmN962CNliGC0VqaHgrALyrJ2WTrMvn AkIi4Bx6KAjOSbiEOnXKPkQBGr5H8K1GEpwN+URk405jtffVVweLWX2lo1hayguO2Q ilaQ7GLYk9tkH0dm7XW8ybOTPKAZ/6/IoepI/Okgh9VCTNT4TdeAM+QK29IvU9MC8O GHLWKiOHNuzmA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Rahul Rameshbabu , Julian Calaby , Kalle Valo , Sasha Levin Subject: [PATCH 6.6 116/638] wifi: b43: Stop correct queue in DMA worker when QoS is disabled Date: Sun, 24 Mar 2024 18:52:33 -0400 Message-ID: <20240324230116.1348576-117-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324230116.1348576-1-sashal@kernel.org> References: <20240324230116.1348576-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Rahul Rameshbabu [ Upstream commit 581c8967d66c4961076dbbee356834e9c6777184 ] When QoS is disabled, the queue priority value will not map to the correct ieee80211 queue since there is only one queue. Stop queue 0 when QoS is disabled to prevent trying to stop a non-existent queue and failing to stop the actual queue instantiated. Fixes: bad691946966 ("b43: avoid packet losses in the dma worker code.") Signed-off-by: Rahul Rameshbabu Reviewed-by: Julian Calaby Signed-off-by: Kalle Valo Link: https://msgid.link/20231231050300.122806-4-sergeantsagara@protonmail.com Signed-off-by: Sasha Levin --- drivers/net/wireless/broadcom/b43/main.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c index 92ca0b2ca286d..97d8bdeaa06cb 100644 --- a/drivers/net/wireless/broadcom/b43/main.c +++ b/drivers/net/wireless/broadcom/b43/main.c @@ -3603,7 +3603,7 @@ static void b43_tx_work(struct work_struct *work) err = b43_dma_tx(dev, skb); if (err == -ENOSPC) { wl->tx_queue_stopped[queue_num] = true; - ieee80211_stop_queue(wl->hw, queue_num); + b43_stop_queue(dev, queue_num); skb_queue_head(&wl->tx_queue[queue_num], skb); break; } @@ -3627,6 +3627,7 @@ static void b43_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb) { struct b43_wl *wl = hw_to_b43_wl(hw); + u16 skb_queue_mapping; if (unlikely(skb->len < 2 + 2 + 6)) { /* Too short, this can't be a valid frame. */ @@ -3635,12 +3636,12 @@ static void b43_op_tx(struct ieee80211_hw *hw, } B43_WARN_ON(skb_shinfo(skb)->nr_frags); - skb_queue_tail(&wl->tx_queue[skb->queue_mapping], skb); - if (!wl->tx_queue_stopped[skb->queue_mapping]) { + skb_queue_mapping = skb_get_queue_mapping(skb); + skb_queue_tail(&wl->tx_queue[skb_queue_mapping], skb); + if (!wl->tx_queue_stopped[skb_queue_mapping]) ieee80211_queue_work(wl->hw, &wl->tx_work); - } else { - ieee80211_stop_queue(wl->hw, skb->queue_mapping); - } + else + b43_stop_queue(wl->current_dev, skb_queue_mapping); } static void b43_qos_params_upload(struct b43_wldev *dev, -- 2.43.0