From patchwork Fri Sep 11 10:29:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wen Gong X-Patchwork-Id: 11770209 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9367392C for ; Fri, 11 Sep 2020 10:29:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6EEA12075E for ; Fri, 11 Sep 2020 10:29:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="DNB78KAt"; dkim=pass (1024-bit key) header.d=amazonses.com header.i=@amazonses.com header.b="D8l5lMyX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725810AbgIKK3G (ORCPT ); Fri, 11 Sep 2020 06:29:06 -0400 Received: from a27-188.smtp-out.us-west-2.amazonses.com ([54.240.27.188]:50794 "EHLO a27-188.smtp-out.us-west-2.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725710AbgIKK3D (ORCPT ); Fri, 11 Sep 2020 06:29:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=gbvhytky6xpx7itkhb67ktsxbiwpnxix; d=codeaurora.org; t=1599820142; h=From:To:Cc:Subject:Date:Message-Id; bh=E0O4cRkVYea8p/aCJQqVPQUhPH/+iV+SPpANjQ/SNoQ=; b=DNB78KAtvueQ2q5Xr/ddZPrGyhZMxhCgbNR0Ik6kc6mXvobC1/0OGVBqGHjV1RrK EdsyIsE7DtN0SxxBhAgEvXUS478VFcb/dG03hrKW3hl6M2OBxkLiEKEWQbk9Jf+uzpu 0DQKwwwbzZjL5GICtCznRGoyd7tO5NXPb3rmJQ9I= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=hsbnp7p3ensaochzwyq5wwmceodymuwv; d=amazonses.com; t=1599820142; h=From:To:Cc:Subject:Date:Message-Id:Feedback-ID; bh=E0O4cRkVYea8p/aCJQqVPQUhPH/+iV+SPpANjQ/SNoQ=; b=D8l5lMyXHTDfMuoQK685Grms2IeON7FD4SYZpOXDKol3wuzVrcIVphGtwM1q/BHJ hjsmpNy0nWW2MmcJl6fK1bAhT/nHn7e4D/9Kmc7wHh7JfDdpgAwQlCpWTqL79YJ2S2c 6+qFqqLBPHLfPcju7sMMAJhrs+EYHyJVSnoX937E= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 727DFC433FE Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=wgong@codeaurora.org From: Wen Gong To: ath11k@lists.infradead.org, johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, wgong@codeaurora.org Subject: [PATCH] mac80211: do not set IEEE80211_STA_DISABLE_HE for NL80211_BAND_2GHZ Date: Fri, 11 Sep 2020 10:29:02 +0000 Message-ID: <010101747cb617f2-593c5410-1648-4a42-97a0-f3646a5a6dd1-000000@us-west-2.amazonses.com> X-Mailer: git-send-email 2.7.4 X-SES-Outgoing: 2020.09.11-54.240.27.188 Feedback-ID: 1.us-west-2.CZuq2qbDmUIuT3qdvXlRHZZCpfZqZ4GtG9v3VKgRyF0=:AmazonSES Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org VHT is not support for NL80211_BAND_2GHZ, but HE is support for it, so it should not set IEEE80211_STA_DISABLE_HE for NL80211_BAND_2GHZ if it does not support VHT. When connec to AP with NL80211_BAND_2GHZ, it does not support VHT, then it failed for HE and connected with HT mode. After this patch, it connected with HE mode for NL80211_BAND_2GHZ with a HE mode 11AX AP. Fixes: 57fa5e85d53ce51 ("mac80211: determine chandef from HE 6 GHz operation") Signed-off-by: Wen Gong --- 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 b2a9d47cf86d..c85186799d05 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; }