Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp631142pxv; Thu, 15 Jul 2021 12:00:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRFGqLyPJDRxPpPjXGvtjjFRAO99FocrvayUX/CF9QNQuTW1lVU986wEIs03hPhAPPtJok X-Received: by 2002:a5d:9c07:: with SMTP id 7mr4081163ioe.111.1626375632552; Thu, 15 Jul 2021 12:00:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626375632; cv=none; d=google.com; s=arc-20160816; b=a3rNk9dYIIS0MCuIaS3un1+QZH9fEZt9D9Rm2oNsu8vT5S5tV6gGKLLo3XpyQ1kqf+ VRTN6WQjLHToiCbTZ1diwogCWU5Ngz4iS7SyeomfncgSYn5odYPzi7gzskEpmziDavYP 65Ek33kHf+5JhRrHd3p4/C5BN+hYKA8FTTs2QraC1nSHzu6RcHeh9TeaExyXiAfWgegv yAUA853wMy6sBWYD+I4RZriYiP3GPoFqpf8QJUmfTakfjmW79f9r5Bf3ILLVewEIlUCk FHB/3GQL+NweGdfLhZbOxiMLYcmMJFPIbq3kyNe2QBdWpqoTm/dYx+abTodVSAUvE71L 6A0Q== 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=N7GoFgrGwxZQWI+jPq6ANlBuMTxuQ8nlJqOsuRPQXQc=; b=X7e3EGa9cYyLW2/k16Mmc4K+xr4wwv6M/iiaNnYE3IJdmt7y7LWLb3EiORvJAiZvHM qSJ/xleGH8b+exV0dtyOXUPpSWbJ+LiEOE+XGSNpVQp4i+bahGXuhreeRcXAvovLwKRd yPBayhZihgvA5m9zW3xJj1KdM5Mht8/oL5hven/tiU2fSLl4K0dLT6pTeeE/v3XqdmKM JatHHT175nuP8YLfWumhA9O4cqllnBiNMYaVrzTs5LTDCQncdKAstdX76BBVbr6c7OYj YYlQt5SUOg2ZFNw7/P07LVGhiiemqaZAlfb4QAMR/jFBb+5tM7pqzlVCJy/i7lL+7xxW vdIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Um2jZKmX; 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 a1si1673572jat.32.2021.07.15.12.00.19; Thu, 15 Jul 2021 12:00:32 -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=Um2jZKmX; 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 S240917AbhGOTBi (ORCPT + 99 others); Thu, 15 Jul 2021 15:01:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:58132 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241250AbhGOSyP (ORCPT ); Thu, 15 Jul 2021 14:54:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CC256610C7; Thu, 15 Jul 2021 18:51:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375081; bh=bGPPZWBLMVLgaINi7y8s9K25vCFRqscWNsCygy0K0NQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Um2jZKmX9PufKtyUN5ghZ32DV9ki9HaInlzxKvB1IQi1OukSq1S4uyirBGfmb+2Vm uUy710MuJYpR+J/vllErxv4Qdfcnw1f6fm8aseNgyaSTs3nAY/jUG75b1EJFhUSxKT 1vqr22o2Eo1nhAa8WmrnQnvQ4yzmUAmkCbYPOmyM= 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.10 109/215] cfg80211: fix default HE tx bitrate mask in 2G band Date: Thu, 15 Jul 2021 20:38:01 +0200 Message-Id: <20210715182618.789466193@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182558.381078833@linuxfoundation.org> References: <20210715182558.381078833@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 daf3f29c7f0c..8fb0478888fb 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -4625,11 +4625,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