Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3653909pxb; Mon, 24 Jan 2022 14:31:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJwgy3zyWCVS6Qs8GA/EkL5G6l85RBMKMsFslV2GkFTcrq4zyQ0ni0ZPMoHuHZQWDi5dp9qx X-Received: by 2002:a05:6a00:8c5:b0:4bc:4c7e:7742 with SMTP id s5-20020a056a0008c500b004bc4c7e7742mr15941806pfu.18.1643063512631; Mon, 24 Jan 2022 14:31:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643063512; cv=none; d=google.com; s=arc-20160816; b=UJxdd9UDplrFFlPGXV5q+6cYfrRy2JCjWkF7QygNSnKA+B1O8WprsK/T1+26aY1xTu aFSBYohCIYU11xErvi7moGrErWSCuwvH6S9nBk46YHg40Hq0SBEX+uCFsA/fGpgkqPe8 aRwe0BR7basTDGdbR6kYAnwLU/zj0LROTvvgpx88AkXvtXBEpQnuMkdZzdgNVOufswYk GN/vv01ErpRXNC0Q8AjYo3oiVsb3Hs2tXwDuG5r2Ehmm1/2NjSYhAjIcVTXvB1njDkGT SEb9WzVzOCPuv9l/G7YVBRzsYIiI5c/FcjTOaT76x0ex6ToaeCYnIv2SZ5wxkIjE1Qme OLXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kAgQrhnZTeHOdgN4Zw0ETExL3t/MY2m8bd1IoRkEeMQ=; b=pTTzdUYHqqST8aHq36ANc9f+LhgcwFXKp78uVgfT8BVnMn3fDmV2lBQkTrq040MokT teKfjRoYQKEI89xDjoVr5FoveQTUoNESBOH6dYTlH/FQwE5H81KJbXu8iJwEvJyKUwOH sUR76YO6BNAERxQ4/F32AeRsNHThdfDabyvIrN0ib35eSqg3bnpwvMjedgAsZ7Ykjzuy D17msQDEkyf4jg2ONppY/ma2RdnywMG0N0PoC9+khpk/HyKVjdXapUlKl9bHXlrtgJJD of7wAw8xj6/v7oG/KG9AtlE3vm8Srpv+wSLElpxY03h1zBjBI6/qb5SRZkZC65UN+/oU eLoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dDzIivjU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 20si13811124pll.297.2022.01.24.14.31.40; Mon, 24 Jan 2022 14:31:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dDzIivjU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1585468AbiAXWXe (ORCPT + 99 others); Mon, 24 Jan 2022 17:23:34 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:47056 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359651AbiAXV0w (ORCPT ); Mon, 24 Jan 2022 16:26:52 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1313F614C7; Mon, 24 Jan 2022 21:26:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EFAF0C340E4; Mon, 24 Jan 2022 21:26:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643059610; bh=NQzJYw+ZcwRxHtulPkHp+iCaV8fwvy2mncxzli3v9QI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dDzIivjUfYKH+aZ8G7eUjKD66d7bLbWols2ypFASzB2iTfv4ul4BY8H/9oMH71uTn 4KrPtboYFSXwC5+/K9S4LGxge4BZA4ndW5oGOazPHZAQYkEEHXvhhfLbsKZsRcppKr Fik0fsnWTcTOTBmRn/kmyN15i/SJDaFROGt1iM30= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Felix Fietkau , Sasha Levin Subject: [PATCH 5.16 0673/1039] mt76: mt7615: improve wmm index allocation Date: Mon, 24 Jan 2022 19:41:02 +0100 Message-Id: <20220124184147.996738911@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Felix Fietkau [ Upstream commit 70fb028707c8871ef9e56b3ffa3d895e14956cc4 ] Typically all AP interfaces on a PHY will share the same WMM settings, while sta/mesh interfaces will usually inherit the settings from a remote device. In order minimize the likelihood of conflicting WMM settings, make all AP interfaces share one slot, and all non-AP interfaces another one. This also fixes running multiple AP interfaces on MT7613, which only has 3 WMM slots. Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- drivers/net/wireless/mediatek/mt76/mt7615/main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/main.c b/drivers/net/wireless/mediatek/mt76/mt7615/main.c index 24c23d4951432..1fdcada157d6b 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/main.c @@ -211,11 +211,9 @@ static int mt7615_add_interface(struct ieee80211_hw *hw, mvif->mt76.omac_idx = idx; mvif->mt76.band_idx = ext_phy; - if (mt7615_ext_phy(dev)) - mvif->mt76.wmm_idx = ext_phy * (MT7615_MAX_WMM_SETS / 2) + - mvif->mt76.idx % (MT7615_MAX_WMM_SETS / 2); - else - mvif->mt76.wmm_idx = mvif->mt76.idx % MT7615_MAX_WMM_SETS; + mvif->mt76.wmm_idx = vif->type != NL80211_IFTYPE_AP; + if (ext_phy) + mvif->mt76.wmm_idx += 2; dev->mt76.vif_mask |= BIT(mvif->mt76.idx); dev->omac_mask |= BIT_ULL(mvif->mt76.omac_idx); -- 2.34.1