Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp8794ybz; Thu, 30 Apr 2020 15:25:22 -0700 (PDT) X-Google-Smtp-Source: APiQypJ3Qa9/aYNWVDcLDf2hHdwijZaZbWBlO7ZpeicjHMIM1dwrQ48ZYKkiyztmwVju6qn+U0TO X-Received: by 2002:a17:907:7242:: with SMTP id ds2mr612207ejc.297.1588285522162; Thu, 30 Apr 2020 15:25:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588285522; cv=none; d=google.com; s=arc-20160816; b=RCNcmiY+nzInGqClTqg4OucVAIq/fqSo8Glm5r2ExKQMkHOBDeswvVt7tdw5uGnHTk HULUTCA3iutuHNsCSIByeUO6p1W7S1pbX3MrvOA7KfH5Qto9RV5JLthJQ7ELtDB0t7R1 +oisVK7OVny0A2LeEGsx1VDFMslyWg6jOQPPu2d4uFeCZqItXpnVNA2DZEXeY+KKWPrV JcJDA19lJ+U7VVfCbQG7K3yGa3+mQpxzuZUcOtZ7DdRxHukXj6Xh6hlNyClv6gIl+QkL SRHarXbcsD2nAbV8Qh4uEgjfzPO04/gDD0fffZt3GEUIvn7hL9Mx5DHgHrW5DFYiQNS1 HDhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature; bh=WYuQjWhAWvV4B+xX0+ZrAqZxe1/l+4HAU8Fy8l/RZMY=; b=MIsIcU4KHzlVa3bRMcpHmb6jAQL0oxrdRhGMIPSwtsmZNrcZlOYjoW/sxxSPWHMwpa bGN8d37aZKH8YiXkOH+mdNEm1wAITgb6Qpb4XfpH+qJ1WMZ2RktL5dbcuY4fSAbFr8bK X6VIDpXCM/KQZyFeo/NM86mA6D7VB/h67KJyDjSqPQrE6HMhnQEHI/cNGOzowi+MXB5v F8fjRHejgmxjfQyuueka8Y52hr+SLIwWvJpZ0hYNnr0apDZ9fAOCNFO1vaipIfatWLRO +DOWtef7MD130GQUUriYRzvwVYehBt46EEUW1rkh62+QjfLkkHCBiOiKhVphpeNZmOyH pXEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=AgrUKUNV; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gr21si530851ejb.482.2020.04.30.15.24.58; Thu, 30 Apr 2020 15:25:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=AgrUKUNV; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727884AbgD3WVg (ORCPT + 99 others); Thu, 30 Apr 2020 18:21:36 -0400 Received: from mail26.static.mailgun.info ([104.130.122.26]:59894 "EHLO mail26.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727850AbgD3WVg (ORCPT ); Thu, 30 Apr 2020 18:21:36 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1588285295; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=WYuQjWhAWvV4B+xX0+ZrAqZxe1/l+4HAU8Fy8l/RZMY=; b=AgrUKUNVNDHf19EJLjztAsKMaUEs8IlXP6l0e6Qov1E5PWvikjIFIBH+QksAwJ/7SFa/ScDG UR9TuNp5eNXWFG7wiY0UeDruovGkKrFO0S4duRTH3+SCmt1AhSN8697dxDnew5OC+8HJ9khU MVXJUCFHAus0ATZO7Q3VssoZUyU= X-Mailgun-Sending-Ip: 104.130.122.26 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5eab4f5d.7f1049fdab90-smtp-out-n01; Thu, 30 Apr 2020 22:21:17 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id EBE5DC433BA; Thu, 30 Apr 2020 22:21:16 +0000 (UTC) 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=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from rmanohar-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: rmanohar) by smtp.codeaurora.org (Postfix) with ESMTPSA id 54637C43636; Thu, 30 Apr 2020 22:21:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 54637C43636 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=none smtp.mailfrom=rmanohar@codeaurora.org From: Rajkumar Manoharan To: johannes@sipsolutions.net, kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, Rajkumar Manoharan Subject: [PATCH v2 09/11] mac80211: do not allow HT/VHT IEs in 6 GHz mesh mode Date: Thu, 30 Apr 2020 15:20:50 -0700 Message-Id: <1588285252-30034-9-git-send-email-rmanohar@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1588285252-30034-1-git-send-email-rmanohar@codeaurora.org> References: <1588285252-30034-1-git-send-email-rmanohar@codeaurora.org> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org As HT/VHT elements are not allowed in 6 GHz band, do not include them in mesh beacon template formation. Signed-off-by: Rajkumar Manoharan --- net/mac80211/mesh.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 0cbe3260c5c1..04d3da733bc8 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c @@ -415,6 +415,10 @@ int mesh_add_ht_cap_ie(struct ieee80211_sub_if_data *sdata, if (!sband) return -EINVAL; + /* HT not allowed in 6 GHz */ + if (sband->band == NL80211_BAND_6GHZ) + return 0; + if (!sband->ht_cap.ht_supported || sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_20_NOHT || sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_5 || @@ -452,6 +456,10 @@ int mesh_add_ht_oper_ie(struct ieee80211_sub_if_data *sdata, sband = local->hw.wiphy->bands[channel->band]; ht_cap = &sband->ht_cap; + /* HT not allowed in 6 GHz */ + if (sband->band == NL80211_BAND_6GHZ) + return 0; + if (!ht_cap->ht_supported || sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_20_NOHT || sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_5 || @@ -479,6 +487,10 @@ int mesh_add_vht_cap_ie(struct ieee80211_sub_if_data *sdata, if (!sband) return -EINVAL; + /* VHT not allowed in 6 GHz */ + if (sband->band == NL80211_BAND_6GHZ) + return 0; + if (!sband->vht_cap.vht_supported || sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_20_NOHT || sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_5 || @@ -516,6 +528,10 @@ int mesh_add_vht_oper_ie(struct ieee80211_sub_if_data *sdata, sband = local->hw.wiphy->bands[channel->band]; vht_cap = &sband->vht_cap; + /* VHT not allowed in 6 GHz */ + if (sband->band == NL80211_BAND_6GHZ) + return 0; + if (!vht_cap->vht_supported || sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_20_NOHT || sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_5 || -- 2.7.4