From nobody Fri Dec 19 21:49:49 2025 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 63F0E288916; Sun, 24 Mar 2024 23:47:13 +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=1711324033; cv=none; b=hSyl6rhkDjiJi1LeKC1gzXXCGRExAFuRjWlMba3Vii+9kqYtnZhZCwIEjsEDZAq5aEWOBfXH2hBOTJNH/dw7NXaiial1WYCcOKhvVUMOXpSmFd8ZWBEmzRdoiZRhCSrrW1yIwe5vfF6llV0AOhAA5A9b4zhyhlDZnVgat7s+uZw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711324033; c=relaxed/simple; bh=YeEcgtNG14s91o5QteY4cf13XJRDzXh4Bs56jSDt/XY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NoHMAPuYC1juMFl/9Qo5cEVFra2c0OEIYx8bdUb53K80HhAUoU6l7IeLiwhFE3ygXobN84Y2PzsvD/w7fXp7s6csYuc9w6c0HbSZNs4VH7uvdPahC5cCcfvTFRRQ3MaR9j/OmoZwcYyk4l573x5DmqbbYohN2Wc7uyzuflbgXtk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dG9wXmMx; 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="dG9wXmMx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B070C43390; Sun, 24 Mar 2024 23:47:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711324033; bh=YeEcgtNG14s91o5QteY4cf13XJRDzXh4Bs56jSDt/XY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dG9wXmMx2AqCDKoTjDowH7XiBpTC/G+UQ7Ilmw7GJH8gLS6k+CI905qkJwxoTy8R/ QAitUYuNPnJqXTIaqiG94296DhCZUJf38J9j9unRqNWXbcPR4vhjPgxUy/5XNO10Is 7cgnW5YRk63O7NjbB07V47Ymzt2i3EKK3ko/xYidLQ3pi+CNgId2synBwfLVkUciHt fL/kLHWYvr3jXoXYcuAjPHkuJ9pG77fv3ENETBQxpeq/HNiGEH5zfNJ7tnGxDhA2m/ l9cusKiVJoRDrTzs18gu5Ax5VYroRP4uN2Oo18ApRMYxqX7fn9Al4w0VjWIbv1YHvY hYQqfubEo+gHA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Rahul Rameshbabu , Julian Calaby , Kalle Valo , Sasha Levin Subject: [PATCH 5.4 034/183] wifi: b43: Stop correct queue in DMA worker when QoS is disabled Date: Sun, 24 Mar 2024 19:44:07 -0400 Message-ID: <20240324234638.1355609-35-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324234638.1355609-1-sashal@kernel.org> References: <20240324234638.1355609-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: quoted-printable Content-Type: text/plain; charset="utf-8" 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/wireles= s/broadcom/b43/main.c index 3ad94dad2d89b..b4701846caf3e 100644 --- a/drivers/net/wireless/broadcom/b43/main.c +++ b/drivers/net/wireless/broadcom/b43/main.c @@ -3601,7 +3601,7 @@ static void b43_tx_work(struct work_struct *work) err =3D b43_dma_tx(dev, skb); if (err =3D=3D -ENOSPC) { wl->tx_queue_stopped[queue_num] =3D true; - ieee80211_stop_queue(wl->hw, queue_num); + b43_stop_queue(dev, queue_num); skb_queue_head(&wl->tx_queue[queue_num], skb); break; } @@ -3625,6 +3625,7 @@ static void b43_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb) { struct b43_wl *wl =3D hw_to_b43_wl(hw); + u16 skb_queue_mapping; =20 if (unlikely(skb->len < 2 + 2 + 6)) { /* Too short, this can't be a valid frame. */ @@ -3633,12 +3634,12 @@ static void b43_op_tx(struct ieee80211_hw *hw, } B43_WARN_ON(skb_shinfo(skb)->nr_frags); =20 - skb_queue_tail(&wl->tx_queue[skb->queue_mapping], skb); - if (!wl->tx_queue_stopped[skb->queue_mapping]) { + skb_queue_mapping =3D 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); } =20 static void b43_qos_params_upload(struct b43_wldev *dev, --=20 2.43.0