Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp5382837rdb; Sat, 30 Dec 2023 21:04:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IGDzKAAwx0QioQfpU777Id/LWYz7k/yPPAEfJX9GH6PerqLqVl3BfqK3jA1uY8FFCCcrvoI X-Received: by 2002:ac8:7f01:0:b0:427:9563:ada1 with SMTP id f1-20020ac87f01000000b004279563ada1mr20238277qtk.97.1703999053580; Sat, 30 Dec 2023 21:04:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703999053; cv=none; d=google.com; s=arc-20160816; b=TOkQieN8mzYNntkHoRuX1oHom/idCLbjXHm6UMyCw35tFVyKmSo17Ye2KW+dg4yYle hlvDuAwGLDn8hetQrifzRm018Zug5lZ5DBkVOoJR/WL3B7kgjl6fvfj3cm3euRlw26fx bF8RTuQFWT13sTGWthsGMOnBWSXTa14KYN04FED5pRj4LdIl2R7WldNAHXxgeikBJtWi VdHK9d7hwzfiMdPRpm43E1e/aMZxCLLX5bn3jIhMrn1mLbP6AAuVZ26uostzZvhLBUyU hMq+uu/EJOlPWt14vkOG3a3VWTENUeCBQc/8DIoDu+E8NfnnHfta7o6AKzh82pnYEuRH XA+w== ARC-Message-Signature: i=1; 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:feedback-id:references :in-reply-to:message-id:subject:cc:from:to:date:dkim-signature; bh=nMmY4lgSrVOhiGZvska8zO0P9lepPYf3Fiw+Sy4tIfM=; fh=PsnbK8gZ4eZSiF/O9d5dpgr6CuL/1pz8cu0fjhqYkzQ=; b=EgAwdvwgEATFUonur8FOIvyIaYn+5Rd8hMffGP4QXgO7F0t7YgICC+tN66Mmroqjvm ykk2K3gHDhLSPxqyfDVkqVY0F90Y7GapZgfNcpWNmxlwqy0yIms+g2kJ1V2BxLZmKsNe IOzIVLYGjk4DWtJvviwq4/alHWNqQY5QcclwpS2FypOKO4ok+p0ITwPgbh2WuBAq6oOV kXRn1zFLBruDZ4qi59z4z5xq65g74PUhL0Nqmo6AogyqdzfZ9AACZssFP95VeDgn8zOW XOobpP5LofTs1uZy5Vd17IPGjlQS4WjgEb10m/0qO3jG3ZzeTeOz8jUrW3xqUdkdPelo COjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=jr2j+Kfc; spf=pass (google.com: domain of linux-wireless+bounces-1360-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1360-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id v1-20020ac85781000000b0042812da70d4si2138684qta.484.2023.12.30.21.04.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Dec 2023 21:04:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-1360-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=jr2j+Kfc; spf=pass (google.com: domain of linux-wireless+bounces-1360-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1360-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 571E21C215B3 for ; Sun, 31 Dec 2023 05:04:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B10C93209; Sun, 31 Dec 2023 05:03:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.b="jr2j+Kfc" X-Original-To: linux-wireless@vger.kernel.org Received: from mail-4316.protonmail.ch (mail-4316.protonmail.ch [185.70.43.16]) (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 34EA92573 for ; Sun, 31 Dec 2023 05:03:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=protonmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=protonmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1703999034; x=1704258234; bh=nMmY4lgSrVOhiGZvska8zO0P9lepPYf3Fiw+Sy4tIfM=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=jr2j+Kfc4KlGvnS8FgkLquzWm38h6gO/Dm8FrvOU5KyM+gSPjvfkFr8EZeaFjVD7A 6DewXceSr5rOj+JqkZVDf+yg14Ni5d0eYG/fKz1k/v1q7lMtOohYm8qdT+QQZrj3yw /jdIYshMvSabOI9FoE4/OjKXnfkpfLijeXzfCTcjjDIcuIn2fR0opr1WIgp0yO48BQ gDY2ccGLeCOwtReCvzlF2e663WorzVNdWrA+/sGbm9xQlIbcnRldTxZNvAMnGYj/g2 sI4vLxBF/E1b2YaCxb2gyImD6HGSrXltHyUCTa8JJAqGowJbg1zY01+wJBtJGsio7q QEPjXlt3CPUoA== Date: Sun, 31 Dec 2023 05:03:45 +0000 To: Kalle Valo , Larry Finger , =?utf-8?Q?Michael_B=C3=BCsch?= , Julian Calaby From: Rahul Rameshbabu Cc: linux-wireless@vger.kernel.org, b43-dev@lists.infradead.org, linux-kernel@vger.kernel.org, Rahul Rameshbabu Subject: [PATCH wireless v2 2/4] wifi: b43: Stop/wake correct queue in PIO Tx path when QoS is disabled Message-ID: <20231231050300.122806-3-sergeantsagara@protonmail.com> In-Reply-To: <20231231050300.122806-1-sergeantsagara@protonmail.com> References: <20231231050300.122806-1-sergeantsagara@protonmail.com> Feedback-ID: 26003777:user:proton Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable When QoS is disabled, the queue priority value will not map to the correct ieee80211 queue since there is only one queue. Stop/wake queue 0 when QoS is disabled to prevent trying to stop/wake a non-existent queue and failing to stop/wake the actual queue instantiated. Fixes: 5100d5ac81b9 ("b43: Add PIO support for PCMCIA devices") Signed-off-by: Rahul Rameshbabu --- Notes: Changes: =20 v1->v2: - Refactored logic with helpers (suggested by Larry Finger ) =20 Issue Details: =20 When PIO support was first introduced to the b43 driver in commit 5100d5ac81b9 ("b43: Add PIO support for PCMCIA devices"), four queu= es were allocated for different QoS priorities for video, voice, best effort, and background. This was modelled after commit e6f5b934fba8 ("b43: Add QOS support"), which has the following issu= e. The core networking stack maps these priorities in the skb, and the= se mappings are noted in the ring's queue_prio member. When disabling = QoS in the driver, the skb will still contain the mapping for the core stack while only one queue is actually considered active (the best effort queue). In the situation that QoS is disabled, b43 needs to = pass 0 to ieee80211 queue functions since the number of queues is set to= 1 in the struct ieee80211_hw queues member. drivers/net/wireless/broadcom/b43/pio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/broadcom/b43/pio.c b/drivers/net/wireless= /broadcom/b43/pio.c index 0cf70fdb60a6..e41f2f5b4c26 100644 --- a/drivers/net/wireless/broadcom/b43/pio.c +++ b/drivers/net/wireless/broadcom/b43/pio.c @@ -525,7 +525,7 @@ int b43_pio_tx(struct b43_wldev *dev, struct sk_buff *s= kb) =09if (total_len > (q->buffer_size - q->buffer_used)) { =09=09/* Not enough memory on the queue. */ =09=09err =3D -EBUSY; -=09=09ieee80211_stop_queue(dev->wl->hw, skb_get_queue_mapping(skb)); +=09=09b43_stop_queue(dev, skb_get_queue_mapping(skb)); =09=09q->stopped =3D true; =09=09goto out; =09} @@ -552,7 +552,7 @@ int b43_pio_tx(struct b43_wldev *dev, struct sk_buff *s= kb) =09if (((q->buffer_size - q->buffer_used) < roundup(2 + 2 + 6, 4)) || =09 (q->free_packet_slots =3D=3D 0)) { =09=09/* The queue is full. */ -=09=09ieee80211_stop_queue(dev->wl->hw, skb_get_queue_mapping(skb)); +=09=09b43_stop_queue(dev, skb_get_queue_mapping(skb)); =09=09q->stopped =3D true; =09} =20 @@ -587,7 +587,7 @@ void b43_pio_handle_txstatus(struct b43_wldev *dev, =09list_add(&pack->list, &q->packets_list); =20 =09if (q->stopped) { -=09=09ieee80211_wake_queue(dev->wl->hw, q->queue_prio); +=09=09b43_wake_queue(dev, q->queue_prio); =09=09q->stopped =3D false; =09} } --=20 2.42.0