Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp655308pxv; Thu, 15 Jul 2021 12:36:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJ8ANawFeGORsIFOUUKgB7BclodTvEqrFzpT04M91fbVzYAeWeJsTENFM/w4p/dcG4PO13 X-Received: by 2002:a17:906:f746:: with SMTP id jp6mr7295991ejb.39.1626377805586; Thu, 15 Jul 2021 12:36:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626377805; cv=none; d=google.com; s=arc-20160816; b=KUgrLCv4kqFTzBPYG55xDxIN6OcfYmwqWm1DFD0bV+M/v56Iq0srb4DiWHLYAqj5rE BOhxIWBYy83drFb9lJOphzc4pTYAeFzarCPHknPSlKn6U67c+qKSaAH2/eDQG2kmRCow /F3hI2Y8IhHOjYfmC4fGwe9ZJhSTxjhEYQ8sQcbkHNdRB2slxqR2Z7rPavw/LTJMe+gZ daGHdwSQCihWubwSf5UdtF8NjHPGdh1eF7/ScLLbGSkVjZWESq37TjeuyRhBm6XFNH1R WsfXvUJVrjxhqAcIo8FfMksZzvTzLEjgWLcj0w/3osqHSsNO6eLXBBxq6dlPrDm3nuVd tvrA== 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=k44bUG+UvrTxoMV7syQYhnQGUr9u0qf25fy2CaannXE=; b=KDn/hJ7gFmlDDMPo5bg7kyrgHBk5lKgtLSDgxa38UXa/e0T0ddjma42mRwtmseDGo1 QofMiBfV82GCcO5DEPX5auY2a7LL094hIs+Yy885KdBFRLcW1VCp6S/pvZvnA6KllfRG 1Ls8MnCEEKJaY15sS5/7QBtA+Q3nluR01Qvp/xIylvR2JtovldGnl1yK6LOO4105EvK/ 1msIy0Dp0cM0HzEPbhXO9zVYeWRf/kqWB5igk8emo4vUecdxNDkro1lqWqAs5dJ2zz2v /qrTY3ZIUUM+xht0WRoWKP8Ms0kYXk5JQf9RkUX3G2/Z6dFExMIETj+AbnzoYhW9Fx+6 1gqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=byFy2i6e; 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 gb29si2446927ejc.623.2021.07.15.12.36.22; Thu, 15 Jul 2021 12:36:45 -0700 (PDT) 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=byFy2i6e; 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 S1345516AbhGOTgY (ORCPT + 99 others); Thu, 15 Jul 2021 15:36:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:51040 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244054AbhGOTMi (ORCPT ); Thu, 15 Jul 2021 15:12:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 36FBA613E6; Thu, 15 Jul 2021 19:09:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626376152; bh=AEFMNni0q72L8/+5niW7zEZN13RimeOt/iWZevfRFVg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=byFy2i6eGcPwPXDxhxtNkTeQrAyo9lZdK//lyrBpxwMtA37Az6VoLPZgLwKVe1HUq lHAKH13LdOHOlFdwnekl1ZnU5aXY9Or7C8jJCNHwyIegRtyW6JAiut5qUsxlTO3UF9 dhTw76P0SWCBrZBOtVw4mrlAD65Gd47LIRe2gKvA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ping-Ke Shih , Johannes Berg , Sasha Levin Subject: [PATCH 5.13 148/266] cfg80211: fix default HE tx bitrate mask in 2G band Date: Thu, 15 Jul 2021 20:38:23 +0200 Message-Id: <20210715182639.621011292@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182613.933608881@linuxfoundation.org> References: <20210715182613.933608881@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: Ping-Ke Shih [ Upstream commit 9df66d5b9f45c39b3925d16e8947cc10009b186d ] In 2G band, a HE sta can only supports HT and HE, but not supports VHT. In this case, default HE tx bitrate mask isn't filled, when we use iw to set bitrates without any parameter. Signed-off-by: Ping-Ke Shih Link: https://lore.kernel.org/r/20210609075944.51130-1-pkshih@realtek.com Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/wireless/nl80211.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index fc9286afe3c9..912977bf3ec8 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -4781,11 +4781,10 @@ static int nl80211_parse_tx_bitrate_mask(struct genl_info *info, sband->ht_cap.mcs.rx_mask, sizeof(mask->control[i].ht_mcs)); - if (!sband->vht_cap.vht_supported) - continue; - - vht_tx_mcs_map = le16_to_cpu(sband->vht_cap.vht_mcs.tx_mcs_map); - vht_build_mcs_mask(vht_tx_mcs_map, mask->control[i].vht_mcs); + if (sband->vht_cap.vht_supported) { + vht_tx_mcs_map = le16_to_cpu(sband->vht_cap.vht_mcs.tx_mcs_map); + vht_build_mcs_mask(vht_tx_mcs_map, mask->control[i].vht_mcs); + } he_cap = ieee80211_get_he_iftype_cap(sband, wdev->iftype); if (!he_cap) -- 2.30.2