From mboxrd@z Thu Jan 1 00:00:00 1970 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 986D03101CD; Mon, 13 Oct 2025 15:35:56 +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=1760369756; cv=none; b=mwBNJdTi0DbNkkMGnLfVF2noOHDEKqJ5joEIacXP0E09SfC21BZMUTwwHbkraEuH7w6DnjdyQs2JdT04PQnJmO/iMNY5zqLVapM7b/VReclp9AjN5dzoi88EWI2br8jh5ZKLKz+LwHwYQ5P6Khwi3BGBdOuwC73msjKZppqfCrA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760369756; c=relaxed/simple; bh=O/l61dwBdpAY2q00V4FaI0Bj+zAuRuXsMXm96RvQRpE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fe1nK0K3r7trTY19s0K4wCtii9Rnj7u57BsKOxbTEdnao6FFrX9hmcndxyfMSaqayQhTt6QaJX1KYFxAcyL49CX6zoUidr6Tb5E0vPUE+anxetplaxfLL2UX2/fVo8HPS6nf3V20rW38HaaEvhsnYdU2mB3seusfvPHzIbd+LeE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=uUYG3Nu0; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="uUYG3Nu0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99C44C16AAE; Mon, 13 Oct 2025 15:35:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1760369756; bh=O/l61dwBdpAY2q00V4FaI0Bj+zAuRuXsMXm96RvQRpE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uUYG3Nu0T5+ZfTjY0dG0buaWtqDoowd/J1K08iE2WhbydJqkdX4r8z6dvMbPggG3c El29vL18UJDbWRQrSzT+1VqgwJTSPRX37BkixiIXaYmuTpbhAdwvi4+tqeFxY/Wn7t A8KO+uXBnairkMWZZL3yEBvoYYNQt8Lkoj7aS5fo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sujuan Chen , Benjamin Lin , Rex Lu , Lorenzo Bianconi , Felix Fietkau , Sasha Levin Subject: [PATCH 6.17 358/563] wifi: mt76: mt7996: Fix tx-queues initialization for second phy on mt7996 Date: Mon, 13 Oct 2025 16:43:39 +0200 Message-ID: <20251013144424.247101640@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251013144411.274874080@linuxfoundation.org> References: <20251013144411.274874080@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.17-stable review patch. If anyone has any objections, please let me know. ------------------ From: Lorenzo Bianconi [ Upstream commit 77ff8caf3b17626ad91568cef63d75e288aa4052 ] Fix the second phy tx queue initialization if hif device is not available for MT7990 chipset. Fixes: 83eafc9251d6d ("wifi: mt76: mt7996: add wed tx support") Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Co-developed-by: Benjamin Lin Signed-off-by: Benjamin Lin Co-developed-by: Rex Lu Signed-off-by: Rex Lu Signed-off-by: Lorenzo Bianconi Link: https://patch.msgid.link/20250909-mt7996-rro-rework-v5-8-7d66f6eb7795@kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- .../net/wireless/mediatek/mt76/mt7996/init.c | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/init.c b/drivers/net/wireless/mediatek/mt76/mt7996/init.c index a9599c286328e..be729db5b75c1 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/init.c @@ -671,13 +671,20 @@ static int mt7996_register_phy(struct mt7996_dev *dev, enum mt76_band_id band) /* init wiphy according to mphy and phy */ mt7996_init_wiphy_band(mphy->hw, phy); - ret = mt7996_init_tx_queues(mphy->priv, - MT_TXQ_ID(band), - MT7996_TX_RING_SIZE, - MT_TXQ_RING_BASE(band) + hif1_ofs, - wed); - if (ret) - goto error; + + if (is_mt7996(&dev->mt76) && !dev->hif2 && band == MT_BAND1) { + int i; + + for (i = 0; i <= MT_TXQ_PSD; i++) + mphy->q_tx[i] = dev->mt76.phys[MT_BAND0]->q_tx[0]; + } else { + ret = mt7996_init_tx_queues(mphy->priv, MT_TXQ_ID(band), + MT7996_TX_RING_SIZE, + MT_TXQ_RING_BASE(band) + hif1_ofs, + wed); + if (ret) + goto error; + } ret = mt76_register_phy(mphy, true, mt76_rates, ARRAY_SIZE(mt76_rates)); -- 2.51.0