Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2368471lqp; Sun, 24 Mar 2024 16:08:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUOMYqAbhkv5rVmQ/t3DxbaYiBpjHpLPdcsijQwYg9WV4XR8WutcvCFOlyjWG8+YAzK+unAhkhLHADdOA6q4lPE5hDFxg/tBT0jOSYkZg== X-Google-Smtp-Source: AGHT+IFPgOHl5ULaxIo7inTRuuMtgZhAyk4Mrb3MICQI10Vh7trAxsJa6EPiBhvOjjlOutczxchk X-Received: by 2002:a50:d71e:0:b0:568:a05e:eafd with SMTP id t30-20020a50d71e000000b00568a05eeafdmr3784212edi.39.1711321702969; Sun, 24 Mar 2024 16:08:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711321702; cv=pass; d=google.com; s=arc-20160816; b=iiqGAAdaOwgq3DKYNUHfJnujJwt40y9R7E0Y+a5k1UyGW99DF80Ujoaa18BGY+5QGr bilTP3/H3eMOsq9NTLEbBWCkfQXtmZSljRRwolS1TC2eHL+lYLEKfabmu2UviHAORC7E Epbcyeb3RygKsnpiNWxw/U303HcTq1tncj3IHmxOz7uWe5bOPTSyeu/KOacUhCcyZsPR o1IdEjQrzxQ3Kq/N1UMlemGpKOXn9ugA40E1jhzlKtJzRq+MtXpih8d83buBW/jsGona ZqKRZe6WyxwCZGKZAdrfi/p7O955wEYYU33xhBFKAX8zbzOd2U5mHJvbbYGO5oK0k1TO 5rfg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=aieVkXdPXtBPTQIUY8+YPZBCIczdCfW8yk+/iMyiDUQ=; fh=W7zJnwmhPdAsBzQ8T+4flLlNfCrIMnWRBw6Dj5MCkkk=; b=F8Q/RbwZ3ymklaMNnA9xuw/ucZs0/7O79P1aZhSjw0XyIPk0v9x+BMk4U7rwGR1W2z YOCjLQnV8PzQRyzgdjTrbkd+RWnWXx1m56QZOTCykthSXV2dnw99yATr9Dy+sN2nF4cK kI90naHxzpQ+dQ7k/I+FL/KJpkWzV3wF3i1oSSUYsAHfUa0hOszs98eMTDtlnTYHzY0M xQWewD/e89Ynxgx83CBWLevwAgrf0ZHPB7aqqrSjRrw46jVV0nOpD8UeZ+4ZV/c5YE7Q Qvzae4u2XRBNJtE0E2ackYJIq917Th5ci7Bgfe90NV/CGYuyU+ltbEHYxKTOYQg3CT7y Bf/A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gCGSu0jY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-112945-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112945-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id q20-20020a056402519400b0056bab0d1bd7si2076918edd.279.2024.03.24.16.08.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 16:08:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-112945-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gCGSu0jY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-112945-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112945-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 222851F23A1C for ; Sun, 24 Mar 2024 22:49:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 41ED1823C3; Sun, 24 Mar 2024 22:35:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gCGSu0jY" 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 4681681AD8; Sun, 24 Mar 2024 22:35:57 +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=1711319758; cv=none; b=shYpIUdAylr2mhKsEVTgaiCRv72V7CMDfUQNm05Utg5/MXXceKF33/BI1H4Kx4fErZsdeyAHdn3v03dR18hkztGg8/UayQ+E3AEIQuDUQSu1onYhIRN8PggkgGZ7xbX0j12y+Tc7H+HpGpYYEQNrdzm4HNbf+yenZnEokx8gAfw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711319758; c=relaxed/simple; bh=T+ReKdZ9roAuzU/DfsquugIpMTaDIpDuv/0TiIsOPPI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KGXdN88sCh7e9l3YdyxgL+10ttYcD46f8h3WM98DrxNabY3QfBL2ModiikgvTi8IXJreE/pf5kGjIl3tybdgjNPJAv8Wg+httNdw4hrC3RfAoPDxn/JwCRpYYTJycFAzS+CYtIEm1fmPNtkKg7xjqda9tFjMT+G6GUeFEiJB+W8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gCGSu0jY; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 086C6C43390; Sun, 24 Mar 2024 22:35:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711319757; bh=T+ReKdZ9roAuzU/DfsquugIpMTaDIpDuv/0TiIsOPPI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gCGSu0jY7evgzMDny8Vyuovq9qeSQEYFX2/ojodCbEMXY/HZMgLc6akIo85xmp6EL siZ7KTkfeIKFCOr9OJ6IuPm6W0q273/4cdvEodIoYbmYWpiGucTkJW7mJjLgdwUB/I SiXCiDXgqiMyUdHHyjnixsfuYN3uuCn9KuyWS0NSM2Ko/NW4svtesE3iz8HAbnmoD8 UeWnpHr1qlQ+eV6cD+LNbH7FgqC09W5fgECzgcpKGazBfNVw0K+vXlf9xyWQ+v3E4m sBrHJkWSQ6jN7VIyXaA/FwwHggqy5oKfhM9qOhc/y+Rz2B2Y5/t7R828cKLu24IUGq BdgVto/M4UNnw== 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.8 058/715] wifi: b43: Stop correct queue in DMA worker when QoS is disabled Date: Sun, 24 Mar 2024 18:23:57 -0400 Message-ID: <20240324223455.1342824-59-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-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