Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp769829ybm; Wed, 27 May 2020 07:38:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy18JmcaIHdnn/B8jbyGPYqv6izj//xYGy6eX4+jdm94HC7w3bNA87BUw4crhmL95d5rH81 X-Received: by 2002:a17:906:651:: with SMTP id t17mr6639868ejb.394.1590590300597; Wed, 27 May 2020 07:38:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590590300; cv=none; d=google.com; s=arc-20160816; b=OlvDpfNUQb+Wdldz6HC0d5UBaZJo6OxxsbncPbUxuLOHDcyenn2oRCK+eBi4VSVXtf uoVFRKeKpfcjv794hib5/rSIQWXgEbnz5ObVXpV9UwTUlG29anFib1/Qfmok1rTl4ne2 0s7LN0hjwyHhr/FRZCtg/O05v/FvysVvwIJwxy5JMnhZPn96cP/RlH9lnW4BvovOau4p FAUf9ZA/cGqPcSDXH7+76HgJQ4e0ZKvcOcQP/k0EV7mj+RwuYRi0lD4LSuH16UKKTzwj m8ieWo+7WgEHEHMbKPLNS13p9nhFlUeyGIPE59K2gW2o07h6SeG4rRdGaFF5kf7sFXls K6mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=h+jLnnkUihJ3I4Zpw/P2Ucot1cyU/C4JRkVh1mBBDYg=; b=Glm2HlrCQ/iXJ+yL3GbUTpozLnvPpi1+VKQ3yZtUiRkUkPRuy8p/PqH/VVrI0NguE9 3yxrRbcz0vdwmgeZCSC/6NRXMVOQ9U50c2WZxCAW5I0s71Zy79iAjAptukQcJRg7x/m/ tRDw6/T3EMQhkf8dObjw0L62i5R6Zr48jV91VJkKooTnWe3Hl6djw7yLCssmyyHcE/h0 XmOUHS4fBu/7Ssp5zD76Nkk16jLXfwJcSe7zaoZqh/BTpafaSzuIvfgetN9XZafPAh7N eJaMYQpGuYeUUzpKQZr/UmSsuoP03X0YdsTXofIT6GSqEmXi7kLuZDNKyeCqJS2ZJY5K e1MQ== ARC-Authentication-Results: i=1; mx.google.com; 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 lv3si1922960ejb.543.2020.05.27.07.37.56; Wed, 27 May 2020 07:38:20 -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; 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 S2389337AbgE0OhE (ORCPT + 99 others); Wed, 27 May 2020 10:37:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389335AbgE0OhD (ORCPT ); Wed, 27 May 2020 10:37:03 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 380D8C05BD1E for ; Wed, 27 May 2020 07:37:03 -0700 (PDT) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) (envelope-from ) id 1jdxAz-004A8x-H2; Wed, 27 May 2020 16:37:01 +0200 Message-ID: <80dbbfa0c72b92d4b30e234215f7978c3cbe433e.camel@sipsolutions.net> Subject: Re: [PATCH v3 07/11] mac80211: add HE 6 GHz Band Capability IE in Assoc. Request From: Johannes Berg To: Rajkumar Manoharan , kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org Date: Wed, 27 May 2020 16:37:00 +0200 In-Reply-To: <1589399105-25472-7-git-send-email-rmanohar@codeaurora.org> References: <1589399105-25472-1-git-send-email-rmanohar@codeaurora.org> <1589399105-25472-7-git-send-email-rmanohar@codeaurora.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.2 (3.36.2-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Wed, 2020-05-13 at 12:45 -0700, Rajkumar Manoharan wrote: > +int mesh_add_he_6ghz_cap_ie(struct ieee80211_sub_if_data *sdata, > + struct sk_buff *skb) > +{ > + const struct ieee80211_sta_he_cap *he_cap; > + struct ieee80211_supported_band *sband; > + u8 ie_len; > + u8 *pos; > + > + sband = ieee80211_get_sband(sdata); > + if (!sband) > + return -EINVAL; > + > + he_cap = ieee80211_get_he_iftype_cap(sband, NL80211_IFTYPE_MESH_POINT); > + > + if (!he_cap || > + sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_20_NOHT || > + sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_5 || > + sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_10) > + return 0; > + > + if (!he_cap->has_he_6ghz) > + return 0; I saw this before and thought it may actually exist, but it doesn't? Like I said before though, there doesn't seem much point in this, if you don't have 6 GHz then don't advertise those channels ... > static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata) > @@ -4803,7 +4809,8 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata, > if (!sband->ht_cap.ht_supported) { > ifmgd->flags |= IEEE80211_STA_DISABLE_HT; > ifmgd->flags |= IEEE80211_STA_DISABLE_VHT; > - ifmgd->flags |= IEEE80211_STA_DISABLE_HE; > + if (sband->band != NL80211_BAND_6GHZ) > + ifmgd->flags |= IEEE80211_STA_DISABLE_HE; > } > > if (!sband->vht_cap.vht_supported) > @@ -5493,7 +5500,8 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, > if (req->flags & ASSOC_REQ_DISABLE_HT) { > ifmgd->flags |= IEEE80211_STA_DISABLE_HT; > ifmgd->flags |= IEEE80211_STA_DISABLE_VHT; > - ifmgd->flags |= IEEE80211_STA_DISABLE_HE; > + if (sband->band != NL80211_BAND_6GHZ) > + ifmgd->flags |= IEEE80211_STA_DISABLE_HE; > } These changes really sort of belong more into the next patch, I guess? Not sure. > if (req->flags & ASSOC_REQ_DISABLE_VHT) > diff --git a/net/mac80211/util.c b/net/mac80211/util.c > index 5a33755c22f4..2bcebe672c0d 100644 > --- a/net/mac80211/util.c > +++ b/net/mac80211/util.c > @@ -2839,6 +2839,21 @@ u8 *ieee80211_ie_build_he_cap(u8 *pos, > return pos; > } > > +u8 *ieee80211_ie_build_he_6ghz_band_cap(u8 *pos, u16 he_6ghz_cap) > +{ > + __le16 cap = cpu_to_le16(he_6ghz_cap); > + > + *pos++ = WLAN_EID_EXTENSION; > + *pos++ = 3; > + *pos++ = WLAN_EID_EXT_HE_6GHZ_BAND_CAP; > + > + /* Fixed data */ > + memcpy(pos, &cap, sizeof(cap)); > + pos += sizeof(cap); > + > + return pos; > +} You forgot SMPS, so this needs to be a bit different, but it's probably better as a separate function since it's in multiple places, I guess I'll combine our two patches. johannes