Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp694350pxb; Tue, 5 Apr 2022 19:05:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGQjHE1+dBNtv7yjixvfyvViWh93qAEGo2QFNyoBnJB80UbpFiBgc7mXUHGoHYhdY5bOE3 X-Received: by 2002:a17:90b:4b47:b0:1c7:7c38:57d9 with SMTP id mi7-20020a17090b4b4700b001c77c3857d9mr7387658pjb.241.1649210590994; Tue, 05 Apr 2022 19:03:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649210590; cv=none; d=google.com; s=arc-20160816; b=vKMNgImYRN369q9K6puSf7R+QfvPFHYXjpM1KKmqGZSotbtSSRxFcDZ6A0YInjTz5b gm05VCuCBqfgwJhlI2W4j4NomABEb8Oslf3yjXMvnczXN2VdOkqg4JjBRFYAgLGHlDlf oR9/YAp/GARgxPiyWpTAai/y0yhnMq4OExBqPtXXBU03jmBH8dZACe5DyNcL+b9WCYcC GBRbzhC7pcWt/R8lsM+YwBYdGq0N+dy/qzsYQkQRYR8UrWlL/M5gCf7OrUHkTgv41SNK p8GMK1/1WWMB+qx8qX87dvITCrg1djYDG2agBY/VL4zagqAyjloDsKJru1Sz7PTW+vGc hivA== 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=DggOXn2j1w2U9bMXf2WI1S0rS/8s/LYT2sUQIvOnJBY=; b=gyiDL+pUTfpLPw29gMkl8UEifpl9G9piTCwVU40hG8sbMk5Jz9WHaNRdxT0UwZdQYu Yb6TJGp3fp6G/DIictKQ77zdAlFvh25NrsG8ABB+Lw8YpNobfmHom+Q5T/5OtY+uldk3 2DB8WGonrY+a0V/KxXyw0mCO8DD5G0tm0yqmb24YYL/NH/okmlGrYE+1A+S2vhrcKmXH eL+BAC+TsxM6OU+jrB0jDy7rjcOEOQPrPl+Z+GrAMuPxDVr7XTnBzU2J1wVjuL6ssGiu fbxmHRpD6UEmMY2WxpEw5MZP5cpWwKD0JFHykzX8jFkPPJENsKqToi83bP9GgRLelHck UxRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HWapMY3H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o11-20020a635a0b000000b0038178754018si13633253pgb.78.2022.04.05.19.02.53; Tue, 05 Apr 2022 19:03:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HWapMY3H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1386201AbiDEMkd (ORCPT + 99 others); Tue, 5 Apr 2022 08:40:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236480AbiDEJDA (ORCPT ); Tue, 5 Apr 2022 05:03:00 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C5D711C06; Tue, 5 Apr 2022 01:54:45 -0700 (PDT) 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 B6902B81C15; Tue, 5 Apr 2022 08:54:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0C1F4C385A0; Tue, 5 Apr 2022 08:54:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148882; bh=mPVrZdRJ9e3MIMaNoTtfRmSysmhMmo05jO1t2TBd+Ew=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HWapMY3HxprYp+Q/91gZyl/qfS9vOAEDZCXUk3KwXyWiQfFlchso8uv+a7RgZwHSo eLn7NhFJmapHghcT6lezybzrH9ocw3LLFUp8v1lIdP3y2C4T0d6Zb3R9D2pCsTDI96 uTzoZBkEVgIlpI2x6uZQU4xABXFziY2dYIytgG/w= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ryder Lee , MeiChia Chiu , Felix Fietkau , Sasha Levin Subject: [PATCH 5.16 0467/1017] mt76: mt7915: fix the nss setting in bitrates Date: Tue, 5 Apr 2022 09:23:00 +0200 Message-Id: <20220405070408.160948329@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: MeiChia Chiu [ Upstream commit c41d2a075206fcbdc89695b874a6ac06160b4f1a ] without this change, the fixed MCS only supports 1 Nss. Fixes: 70fd1333cd32f ("mt76: mt7915: rework .set_bitrate_mask() to support more options") Reviewed-by: Ryder Lee Signed-off-by: MeiChia Chiu Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c index ef8b0d0a05ef..21fbe7a6141f 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c @@ -2124,9 +2124,12 @@ mt7915_mcu_add_rate_ctrl_fixed(struct mt7915_dev *dev, phy.sgi |= gi << (i << (_he)); \ phy.he_ltf |= mask->control[band].he_ltf << (i << (_he));\ } \ - for (i = 0; i < ARRAY_SIZE(mask->control[band]._mcs); i++) \ - nrates += hweight16(mask->control[band]._mcs[i]); \ - phy.mcs = ffs(mask->control[band]._mcs[0]) - 1; \ + for (i = 0; i < ARRAY_SIZE(mask->control[band]._mcs); i++) { \ + if (!mask->control[band]._mcs[i]) \ + continue; \ + nrates += hweight16(mask->control[band]._mcs[i]); \ + phy.mcs = ffs(mask->control[band]._mcs[i]) - 1; \ + } \ } while (0) if (sta->he_cap.has_he) { -- 2.34.1