From patchwork Fri Jan 31 11:12:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Coelho X-Patchwork-Id: 216554 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=-9.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 A3CD6C33CB2 for ; Fri, 31 Jan 2020 11:13:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7F31F20707 for ; Fri, 31 Jan 2020 11:13:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728425AbgAaLN0 (ORCPT ); Fri, 31 Jan 2020 06:13:26 -0500 Received: from paleale.coelho.fi ([176.9.41.70]:55856 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728325AbgAaLN0 (ORCPT ); Fri, 31 Jan 2020 06:13:26 -0500 Received: from 91-156-6-193.elisa-laajakaista.fi ([91.156.6.193] helo=redipa.ger.corp.intel.com) by farmhouse.coelho.fi with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.92.2) (envelope-from ) id 1ixUEi-0002GC-Dg; Fri, 31 Jan 2020 13:13:20 +0200 From: Luca Coelho To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Date: Fri, 31 Jan 2020 13:12:52 +0200 Message-Id: <20200131111300.891737-16-luca@coelho.fi> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200131111300.891737-1-luca@coelho.fi> References: <20200131111300.891737-1-luca@coelho.fi> MIME-Version: 1.0 Subject: [PATCH 15/23] mac80211: update condition for HE disablement Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Daniel Gabay Disable HE if the beacon does not contain an HE operation IE. Signed-off-by: Daniel Gabay Signed-off-by: Luca Coelho --- net/mac80211/mlme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index f78e7aa67991..9ab0842a7c37 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -313,8 +313,8 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata, ret |= ieee80211_chandef_downgrade(chandef); } - if (!cfg80211_chandef_usable(sdata->wdev.wiphy, chandef, - IEEE80211_CHAN_NO_HE)) + if (!he_oper || !cfg80211_chandef_usable(sdata->wdev.wiphy, chandef, + IEEE80211_CHAN_NO_HE)) ret |= IEEE80211_STA_DISABLE_HE; if (chandef->width != vht_chandef.width && !tracking)