Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2560501lqp; Mon, 25 Mar 2024 02:37:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV0kJtv4s10DQZ8bSCOJFIKctd/8r+eG0ocer8vZLzrHVzTLsxYDVk8z2XTkFBdkLCl/BWK33kN6dhlejD2rJCc2K3Duwh3IPpy57XqQg== X-Google-Smtp-Source: AGHT+IGgrJJLByMth3Es7Oa9nj0wk2KGE4MI5KxcVhrL2kGOHhP+xTBFoTv9/RXz+khL+JAdPJn1 X-Received: by 2002:a05:6a20:daa0:b0:1a3:6a4f:d229 with SMTP id iy32-20020a056a20daa000b001a36a4fd229mr8776529pzb.25.1711359476674; Mon, 25 Mar 2024 02:37:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711359476; cv=pass; d=google.com; s=arc-20160816; b=fV5/fDjwvWXEplY2w3eSqag5cdkSYm4HXI3Q7qU7Id+p/mVDzVnB64aGUzgZ/7HzhE UR0V7I29WiI6fFlekdnbYuTshYK8LbanOvXGNu1xzqaUoWhm3EEr+Yx6tH+weLv3WmRe /bIAAiLTkH/zeJo/n4wk+GBnGJwso/xFSyW9bMbBNUhLt4kchCj0sMokE/IizlAqCZBB zynoVe2h1DxNfVAkZu9mTpJbK5b0z6szHD+TQyiwUr0UPbAHMzOGb0Gu4uD2Y42Z7JaT R+C0nArx+54/SUDTBvPins4nSah2WrsyMJ7kzg9PfO32HFsb9A61+dnugOs9Fk5hHELI bwNA== 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=zAAyMHHg49yUApvBiVIq+xbwJ/Np4q/x25+BLwc6NGg=; fh=W7zJnwmhPdAsBzQ8T+4flLlNfCrIMnWRBw6Dj5MCkkk=; b=tfaWZF0+rARr7y2nxCJMOljA3kBow+vJcr1njC+ZrYNf77UiP840w7O1zf6pkcvd6U rsP4Wu+w3zL2qwvFu4i02kZ7fYt1ipmfE9RFsU2XHSZ1+kBDuWGUi3TMkavSQpmy4hvS ead+c0l9bLzWWnmbJYAoX/0vzYa/ZPcx0iWFM0czqkisPMoe/sZdYBZMCs6b+XrWjStO Xq2TNwadwexUlG3h15vTQVB5vVhPMGseHLMRIKJE6+BCWbb1nMPG8BGsGcMUHF76uv+G W9r3vGE2oAxAh8bn2kDUYOpDgOMB4AwTGgPSzjHMSIqHJ1CVdhxlmq3j/kmv1CpPCSif wFmw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=crcVQpjY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115848-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115848-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id y4-20020a62f244000000b006e64519650esi4790435pfl.205.2024.03.25.02.37.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 02:37:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115848-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=crcVQpjY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115848-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115848-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D8CAC29E8D3 for ; Mon, 25 Mar 2024 09:32:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D9C1B226928; Mon, 25 Mar 2024 03:02:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="crcVQpjY" 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 8A3F4145B15; Sun, 24 Mar 2024 23:13:34 +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=1711322014; cv=none; b=kjV8/+MIaW1HgLJSGYFhi7zCElSTKoTlHkYsGjrExzmleyqOk7wa2R2tKwj25D+rUsp+dEzCwfPQNXmHQJ6wLPjPKuwuMrhXxf0DLqyW8QaEJtUvajiYVrDVnydYGeAiLb58bCJRmaHf0I620bGBhVzGCwiDv7UjnIzuQYORVzA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322014; c=relaxed/simple; bh=JormID0mpDAoMktOmH3B7X1mZ+zkwgsuNBGDq22flRY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Hcw089HhE/WTBDci73CFFPEZO/Ut7G1WCw6KuWuHRIesQDTVLwDqc9TtFGTFij96t0WyVUFjgUPXHMKtqeex1Nc7kK23raXX8PofaO/1c1kgOYyYOs5Un8xG5xKJvSl631gdyn2YH2tOZr7csesIXamgslhITDjemd+j67bIn0k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=crcVQpjY; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AEA0DC43394; Sun, 24 Mar 2024 23:13:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711322014; bh=JormID0mpDAoMktOmH3B7X1mZ+zkwgsuNBGDq22flRY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=crcVQpjY10H6qXFoqL3nCt6nbAeg/KHKzTmVDnT4gqLFJ/WDwn1DJ0Q+AXN6HC4KB +Bxr5xbeJlBzaA4jWr9IPtThfxImWUji+YySsASMISWEHRFLeX/pxPFYlG7owCt+jS n0UWBoVC9jWgMqKgPoqxWnZOt15JXjJh5/ogAcUiyDgiZ3V7+T32jmqCaSuIXwwftW i8Wfstm8XusuV+p77BLAfCckq9wB+8yZiFM6XlCefGW4mJnSM9/zsWMdeN2Wf89R2p yCS0aCslJmc1tQCCAPAYA5rReiPMTlpqlIVSnMvDVFu2QT20YkTi5DMLi4ZBS0D52V vvYNSxY5VOaLA== 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.1 086/451] wifi: b43: Stop correct queue in DMA worker when QoS is disabled Date: Sun, 24 Mar 2024 19:06:02 -0400 Message-ID: <20240324231207.1351418-87-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324231207.1351418-1-sashal@kernel.org> References: <20240324231207.1351418-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 b2539a916fd04..c75f294ca1bc9 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