From patchwork Tue Sep 29 11:01:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 291057 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2A61C4741F for ; Tue, 29 Sep 2020 11:52:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5B0D8204FD for ; Tue, 29 Sep 2020 11:52:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601380340; bh=F9v5U96bzuyXYvFJ083FRdwS917633WDmhaRKpPm8L0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=NtT2uX8Q3zI+eg1GSxbObPhyWbMcTuGfxDYmDbI867hJDFPXre0/RB/ukMo2Q7aag KKWRad6k6cIvNd//wF/I/ZMC+wxojDeuvYo7g9CXUnq5nfQsN2llIWKRvLByQAaRfY HpVO5kDyknje1Mx1ut7lIp17E1CECO56QJP875kc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730714AbgI2LwB (ORCPT ); Tue, 29 Sep 2020 07:52:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:50254 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730437AbgI2LsK (ORCPT ); Tue, 29 Sep 2020 07:48:10 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 98CB321941; Tue, 29 Sep 2020 11:48:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601380087; bh=F9v5U96bzuyXYvFJ083FRdwS917633WDmhaRKpPm8L0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pcBkMuLIJkmqKGUcikPsME2+g+dqp0ihHpb6qCGdSANSnBT5JWTBq3DNtaIcL7jVB ntO+SYoVujXNSOOQORWA4aqSJia7Rv7QpHjnmX0LITfGkCzH3cFPFk5OnbGVltz1PT S7/2N2k1/GiWU+zDT0x2wq75vYLq/0H9WSasSm94= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wen Gong , Johannes Berg , Sasha Levin Subject: [PATCH 5.8 54/99] mac80211: do not disable HE if HT is missing on 2.4 GHz Date: Tue, 29 Sep 2020 13:01:37 +0200 Message-Id: <20200929105932.380313962@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200929105929.719230296@linuxfoundation.org> References: <20200929105929.719230296@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Wen Gong [ Upstream commit 780a8c9efc65f6d86acd44794495cedcd32eeb26 ] VHT is not supported on 2.4 GHz, but HE is; don't disable HE if HT is missing there, do that only on 5 GHz (6 GHz is only HE). Fixes: 57fa5e85d53ce51 ("mac80211: determine chandef from HE 6 GHz operation") Signed-off-by: Wen Gong Link: https://lore.kernel.org/r/010101747cb617f2-593c5410-1648-4a42-97a0-f3646a5a6dd1-000000@us-west-2.amazonses.com [rewrite the commit message] Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/mac80211/mlme.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index b2a9d47cf86dd..c85186799d059 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -4853,6 +4853,7 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata, struct ieee80211_supported_band *sband; struct cfg80211_chan_def chandef; bool is_6ghz = cbss->channel->band == NL80211_BAND_6GHZ; + bool is_5ghz = cbss->channel->band == NL80211_BAND_5GHZ; struct ieee80211_bss *bss = (void *)cbss->priv; int ret; u32 i; @@ -4871,7 +4872,7 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata, ifmgd->flags |= IEEE80211_STA_DISABLE_HE; } - if (!sband->vht_cap.vht_supported && !is_6ghz) { + if (!sband->vht_cap.vht_supported && is_5ghz) { ifmgd->flags |= IEEE80211_STA_DISABLE_VHT; ifmgd->flags |= IEEE80211_STA_DISABLE_HE; }