Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp709875pxv; Thu, 15 Jul 2021 14:07:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6+ztXe0h5GdllbPmfAvchK/bKX44HfysypAiAZxpUkih7On8OlMmrKTx33TLKFX5f/GL1 X-Received: by 2002:a17:907:990d:: with SMTP id ka13mr7542790ejc.392.1626383222824; Thu, 15 Jul 2021 14:07:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626383222; cv=none; d=google.com; s=arc-20160816; b=wNEU96FH3FgxdYDIe5ZN6aRba0RTquH8qviiR2kxEyhrSoDZUqzp0YqbqLyCCAGhSH GhFLJee7CnY+5JJGQ1YUTsoDgLDbW7RR7xu1Gr6cdGAHp2hEyKIAoPVQXkbjQc0a2fQx 9VfWe9E7hiDChXR6OxpsqwYIw74gmCv68L1DJfs3XdfKbOk1VoYsU82S1T7LV6uZsV2z 8RPAsDDaKw5CdWivwaY39dNBmt9QtSGw8qgEzwAWibiohELT6DvSVlcd2SRknEOxUXX/ UQbRhDXZDB66WfFa7H58xBh/vnU/ZRXq1chlnNVeHYPH5M3wNAiG0cj3vlFBTOk/byIy F9jg== 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=QRB6gDULvir7QXNqf09LZkRQCfATtMZs6IIFS+q22Mk=; b=deyLom89PQMKO90RDSi1+A8LFFjYRp5kjlWjvF975TFK71MsVouoG3lIRauHz9YN5e BQAYK26M2XqEiSWmzeFCWMS2f8E/N922OjD5OF2yiiZYnNM2dbAgx4JaKlnAXvore+uV bRUGQrnjgRoA7Ate9TsoZQP8Ehn+RjMw9/3gndEKZFr9rZi0aKLGpsRRQsBCpRtcXkNI 30eE7UCGYdrtFsELmCkK9quL26gRh56FDjwbFbT9r6Kyg3/tU7LmT+K3OFKoTJ233g6K 96NRuw7ZHB3QJJ5HdGD+/vKNrKV4P5qqC+CwvVAprbqjQ9dNciwnrwrZf1iToS3Dopkd JibQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=acQXZZai; 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 v3si8723082edx.413.2021.07.15.14.06.38; Thu, 15 Jul 2021 14:07:02 -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=acQXZZai; 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 S242650AbhGOTP7 (ORCPT + 99 others); Thu, 15 Jul 2021 15:15:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:38920 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243298AbhGOTBz (ORCPT ); Thu, 15 Jul 2021 15:01:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BEB09613ED; Thu, 15 Jul 2021 18:58:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375527; bh=V+HbKc4x6+LAJEgQTouvuy37V+Np+L0h/aB3oMk1irI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=acQXZZaiE0IdX0Z73z7yU/H+r4yBwEVUsrd8475V94X0Z3G2M8f1g7BBhl4VYan/x TbzBFej/J8S2v9Tr3Rvy2B1KyoMMLMjHxP50zLL1gBAgrd16jZH3dQQvWtaSccBzVn cbQS3EJn8adt/I6gJJqFxdxmALE3QJClh7clPyRk= 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.12 126/242] cfg80211: fix default HE tx bitrate mask in 2G band Date: Thu, 15 Jul 2021 20:38:08 +0200 Message-Id: <20210715182615.227950927@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182551.731989182@linuxfoundation.org> References: <20210715182551.731989182@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 a5224da63832..be0f616f85d3 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -4779,11 +4779,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