Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3677318pxb; Mon, 24 Jan 2022 15:07:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJxHhhLiw1SsTUxjlRbSrHzUsUN6+Y7J1DKjQpg+7Dre4bHenXwG6BJs1J0eL/CydbHBn2uN X-Received: by 2002:a17:902:a5c6:b0:149:c926:7c31 with SMTP id t6-20020a170902a5c600b00149c9267c31mr16519183plq.141.1643065632313; Mon, 24 Jan 2022 15:07:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643065632; cv=none; d=google.com; s=arc-20160816; b=yrWue91fJSMPGPKUVyuhP0v84u6+3FneF/k/IE3ypR/dlxu/6dFSywSyOSKehkhRMM OOk9CdxFEjfTVNR05Cs90ONebkQh0qnLHXY1vLSMO9BOR8G+sBm5PlATDI8e6K9pEJ86 z4+QJudAH1siDoHXDqvxQzzD1TzK4XLyAab51siJVYlAnKKEAFMGZLNqPCjOqPsIUQyV 7yOVAWj9ckFAjL+l/3oyCsp3VCblgo9B6OKjoodciFdoa7YfQqLBpqBwhzcdH2sPKggv rDOtiAlBgbY5Vnkh2k7kEBY4ZgGRwwLd7HUuSYnFV0QHTzI2M+wMN12+1aSl3ZVhkAhu rI4w== 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=ThDyrsGF+3x0GhM1SNnJXuJng2VKNnTlyThEVPdf68w=; b=V7g9Rdeo0oABxd9NRCoGoBhFHG9Wv3oimshNiI1JJgz5OKAKCf6mtulCHCrhEwJr8P dLtWEkh7yGfkKVViKkkSLzkYWmbg3HQgUBnROI1eK6jrWlUyGkR5w+GE9bQx4NiAUvYY ivkys39pwzr2oynj4DETUVYV2LyDO00dIXeIkrqyW6ihf3nVEWet93Nb4x5pdHzNflv4 NQeD0X+kpXO9AceZe5Y4lHwVbIm8Pih2N38F0DN1LQo1s8WRlKSBCweFy3myoOsaQ+Dk eEnuvVyQxDA2kGXiWkTWxnep8iGxE5KSkTW9MJc1Uov6okCS4xBTVroIxzadFI1wipvv uyvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="UFgM/C1B"; 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 l187si4973314pfd.276.2022.01.24.15.06.30; Mon, 24 Jan 2022 15:07:12 -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="UFgM/C1B"; 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 S1843090AbiAXXDT (ORCPT + 99 others); Mon, 24 Jan 2022 18:03:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1576924AbiAXV5B (ORCPT ); Mon, 24 Jan 2022 16:57:01 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6B68C06178C; Mon, 24 Jan 2022 12:38:18 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id AA133B811F9; Mon, 24 Jan 2022 20:38:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4742C340E5; Mon, 24 Jan 2022 20:38:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643056696; bh=G+He0CBs0oY7cJsck3Uiaa6jdKC0I2296gCo9uHeeZU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UFgM/C1Bb1DHRJe1Xn525JyZos7luuY5faP8Vy83ASNwF49IEmEMCjJyydDA0T0tq PiV8TGfCddre4vef+GQebmBp2XD3pnwDPvTyrvvxqwF0vlGMfsXU7PIISrkjRgupbr ax5DH6qsxYCbW+/ySQI+pmK45ZJsZqjkVc2wprA0= 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.15 569/846] mt76: mt7615: improve wmm index allocation Date: Mon, 24 Jan 2022 19:41:26 +0100 Message-Id: <20220124184120.671123228@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@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 51260a669d166..fc266da54fe7b 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