Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp4925639rdb; Fri, 29 Dec 2023 20:52:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IERQfLmh2C0ePpONCKwMp8ckR+hWxw7ZabTjCxSGXVepUeLHjkmIR1KtjLoHGATPQXqoTsn X-Received: by 2002:a05:620a:6193:b0:781:3825:b87a with SMTP id or19-20020a05620a619300b007813825b87amr15228215qkn.88.1703911972606; Fri, 29 Dec 2023 20:52:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703911972; cv=none; d=google.com; s=arc-20160816; b=vVsfOQctx1cMAVcAMlU/tN3U0z0bsxzhggxai4Tx+wYANXmdlfxTtDo26xzpvGOIyn tZb43f6uT6rBDwflLCOy1Ykt1HGqq8KU9eT8AD0s8LUwxRjddKMLSjUFAi4RKwTa6m0F sxve+GCfRDZ4k4WtxhEG6FwfqyAHWGwA6KGgbmZJznh/XaKTrA3Fvgp8AndtYNhbS5C5 hm7IpmlQAUsdJnbSdSvltk+TVzs/5PIcecF/7LrML5lb8T9lmtnuZIdPwDRF8ovH4Ejd ULe4dVlK40T+PNDEYVLLifpUhm1nQ7Du55P+4dV5L1ueIJbE+0Nzkg7lvNJuMAzb6XI2 +fxA== 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=caRSz9JKsn3mBdUsKSY4AOfcZFf54zv3YQQgaKNP9h8=; fh=+21FHHkXcWPzhlDv3RJju/ybCufC5jSccWkxzweibX0=; b=p7ynTOp68awbQNK4xV4zah3XLKXJuDg7vf3DZgMBHxupVlhnUmQ2N4q9UjtNEdtOvz DRhHFVfaL3WJRU0Wk7vWs4j//KZsG2DNhRDc1eAX4kJ7gWR+I3PCYNvxGDrpYhWLKxxA MwA6Pxo75K5RCPphUgQ+qSJJSOe0mPEF9q8iQ2yleHme5qQGT5MLs140t7lqJA5U2/fx SmPNChwjY4JRsEXI6LPAjcF1hTAF3QJjzMWh54+RJJzFLQmrNzbP2S2CEhNSORky0UTu Y5umoH/c0Cr7Hol41xtZFvmclspRbwsxGAXfcdEZjFjp31fHCJ30ILfXGua+HQZJ1rvp jqlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=njDNIiTL; spf=pass (google.com: domain of linux-wireless+bounces-1339-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1339-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. [147.75.199.223]) by mx.google.com with ESMTPS id m16-20020a05620a221000b00781711c6a09si5317613qkh.189.2023.12.29.20.52.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 20:52:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-1339-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=njDNIiTL; spf=pass (google.com: domain of linux-wireless+bounces-1339-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1339-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 5C0841C21159 for ; Sat, 30 Dec 2023 04:52:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 67A2015B7; Sat, 30 Dec 2023 04:52:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.b="njDNIiTL" X-Original-To: linux-wireless@vger.kernel.org Received: from mail-4322.protonmail.ch (mail-4322.protonmail.ch [185.70.43.22]) (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 BC792187E; Sat, 30 Dec 2023 04:51:58 +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=1703911916; x=1704171116; bh=caRSz9JKsn3mBdUsKSY4AOfcZFf54zv3YQQgaKNP9h8=; 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=njDNIiTL3IF6x3x/pXq0Ry8quqaGuG+CzH54ahHsfyz+W9qccrydDwGbmqrzrCiXb sqqjDsPkSodTUlwTgtcdPPGNbJrE9btj76ixqdc1ueE8oAiKqZmfCDvpsApMDQ8SIr qY3kJpQ1H3auM0Q4I11P/ro6ivWXDDREHKOjhfLNxCCyfiLBxt4zs9M7TW1sK+hA9+ nbNckCWKvkDxJtTd61NfF16H77lrJRY9s4D3nv83TCFJ9Qv+jomqj5cxVQICc/3O2w sCVU66WXaT+qO4m+PXOrw9D8sUWiWn5fRgY9rDhBQkVmMXDVBJCimasNFRzENUls95 mIhtexoqM3YLQ== Date: Sat, 30 Dec 2023 04:51:40 +0000 To: Kalle Valo From: Rahul Rameshbabu Cc: linux-wireless@vger.kernel.org, b43-dev@lists.infradead.org, linux-kernel@vger.kernel.org, Rahul Rameshbabu Subject: [PATCH wireless 3/5] wifi: b43: Stop/wake correct queue in PIO Tx path when QoS is disabled Message-ID: <20231230045105.91351-4-sergeantsagara@protonmail.com> In-Reply-To: <20231230045105.91351-1-sergeantsagara@protonmail.com> References: <20231230045105.91351-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 --- drivers/net/wireless/broadcom/b43/pio.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/broadcom/b43/pio.c b/drivers/net/wireless= /broadcom/b43/pio.c index 0cf70fdb60a6..7168fe50af5b 100644 --- a/drivers/net/wireless/broadcom/b43/pio.c +++ b/drivers/net/wireless/broadcom/b43/pio.c @@ -525,7 +525,11 @@ int b43_pio_tx(struct b43_wldev *dev, struct sk_buff *= skb) =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=09if (dev->qos_enabled) +=09=09=09ieee80211_stop_queue(dev->wl->hw, +=09=09=09=09=09 skb_get_queue_mapping(skb)); +=09=09else +=09=09=09ieee80211_stop_queue(dev->wl->hw, 0); =09=09q->stopped =3D true; =09=09goto out; =09} @@ -552,7 +556,11 @@ int b43_pio_tx(struct b43_wldev *dev, struct sk_buff *= skb) =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=09if (dev->qos_enabled) +=09=09=09ieee80211_stop_queue(dev->wl->hw, +=09=09=09=09=09 skb_get_queue_mapping(skb)); +=09=09else +=09=09=09ieee80211_stop_queue(dev->wl->hw, 0); =09=09q->stopped =3D true; =09} =20 @@ -587,7 +595,10 @@ 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=09if (dev->qos_enabled) +=09=09=09ieee80211_wake_queue(dev->wl->hw, q->queue_prio); +=09=09else +=09=09=09ieee80211_wake_queue(dev->wl->hw, 0); =09=09q->stopped =3D false; =09} } --=20 2.42.0