Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1100764ybm; Wed, 27 May 2020 16:28:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznLQqWIOjYfvJuprDm4q5+yTciBtLuL88vWyypq2beCk8jwk3WupOfbo/ovsIBOoAQBVDh X-Received: by 2002:a50:f086:: with SMTP id v6mr506873edl.140.1590622087257; Wed, 27 May 2020 16:28:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590622087; cv=none; d=google.com; s=arc-20160816; b=XbWSt5bT9OGaMq9k+RM3xbhZGagnBAMHLHVMMnCUQzb28ZSSgyKF7lUNq+DB4jnBre gKGDEDX+qSa3NXTOyC3Il0+hWrLyNZn2CA6KARmAARKFsj28IeJyKjWPoqcD1ZDZh/5B BhKC/q4qdSNQJveLYtdBPm37T63TLRRrTgaDtljwLOUZP+H8QErvOU7/Ma+BEzyyo75o 0+zXOid9POo3A9mqa5vHW9WYQVlDdpEKE2mfma/c6+d0iWSbn7G5Cysa6IfwnVR+DOzl ndyKdQymRbl+xC8J1OU0TXWz4oQirCyRqWHL0Tu5jcEie2EvO8SAwiKu34SxRDR4APs8 MKlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=IO5NWo0C9B5g1gCC6iQDUqGcstgG33qK8tScAeLTVtc=; b=O25UhPJa6PSb678LBqIizjR6+VG5r/ItAsHCseOebLP9Q84D2UN/BuajYlAjBmuV1O 8wJ8Of1Lvy1KVQZcnNigv2OKzbXlZZvjifYUOZaYQ6hxpwJmVo0NitKV1YMvVCrXnXOJ 63oiWM+X6+/nkDZFZLl/zuQxKP/cN/RELG4+/jfkxu4Q/O70ikGrlv1AvNwodZ8Ld+r3 I+OQ/LZHQOjqxvbdufQdgWVYghMf6A9WZ8v57sFr06IpKeUvJw/m9PDGQhFyf2UuFVXq V4aAk3ZPIjApUQU46jVU2I6GdAF9eJpH/57533+Y3OWuNcUy415zy69f4Qj1M9//oanI XrxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=pO9MD9XI; 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 f26si3420810ejj.168.2020.05.27.16.26.08; Wed, 27 May 2020 16:28:07 -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=pO9MD9XI; 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 S1726069AbgE0XZD (ORCPT + 99 others); Wed, 27 May 2020 19:25:03 -0400 Received: from mail27.static.mailgun.info ([104.130.122.27]:41945 "EHLO mail27.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725267AbgE0XZC (ORCPT ); Wed, 27 May 2020 19:25:02 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1590621902; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=IO5NWo0C9B5g1gCC6iQDUqGcstgG33qK8tScAeLTVtc=; b=pO9MD9XIRkbqt+ebKkwArz4WX7qjFZqSSMP74/Ozu4kzKkuNq6C7YVCAyBwqC9Z4XMv/4QhG fkmS7cnmjK0+n4EurHHqKUyoEAHlDvVb0axNDCX+lFx2kTtGC+/EfEvF/GFdGe/bI2hFwHd8 FnvbxB5M7mi1mQH56PBprwe4akk= X-Mailgun-Sending-Ip: 104.130.122.27 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 smtp-out-n02.prod.us-east-1.postgun.com with SMTP id 5ecef6cdea0dfa490e5b0182 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 27 May 2020 23:25:01 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 72A97C4339C; Wed, 27 May 2020 23:25:00 +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 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: rmanohar) by smtp.codeaurora.org (Postfix) with ESMTPSA id D1BFBC433CB; Wed, 27 May 2020 23:24:59 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 27 May 2020 16:24:59 -0700 From: Rajkumar Manoharan To: Johannes Berg Cc: kvalo@codeaurora.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org Subject: Re: [PATCH v3 02/11] cfg80211: handle 6 GHz capability of new station In-Reply-To: References: <1589399105-25472-1-git-send-email-rmanohar@codeaurora.org> <1589399105-25472-2-git-send-email-rmanohar@codeaurora.org> Message-ID: <17385b3a2fca16521858bf0956904698@codeaurora.org> X-Sender: rmanohar@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2020-05-27 07:00, Johannes Berg wrote: > On Wed, 2020-05-13 at 12:44 -0700, Rajkumar Manoharan wrote: >> Handle 6 GHz HE capability while adding new station. It will be used >> later in mac80211 station processing. > > This doesn't compile without the next patch. > My bad.. I must have overlooked while splitting the patch. :( >> + const struct ieee80211_he_6ghz_band_cap *he_6ghz_capa; > > This we made just an __le16, any particular reason to have the struct? > It does need to be a pointer for the "no changes" case, but the struct > seems a bit overkill? > Initially I thought of splitting into two u8 for a_mpdu_params and info. Later changed to __le16 but retained struct. Nothing else :) >> + * @NL80211_ATTR_HE_6GHZ_CAPABILITY: HE 6 GHz Band Capability element >> (from >> + * association request when used with NL80211_CMD_NEW_STATION). > > That we have pretty much identically. > >> @@ -2998,6 +3003,7 @@ enum nl80211_attrs { >> #define NL80211_HE_MAX_CAPABILITY_LEN 54 >> #define NL80211_MAX_NR_CIPHER_SUITES 5 >> #define NL80211_MAX_NR_AKM_SUITES 2 >> +#define NL80211_HE_6GHZ_CAPABILITY_LEN 2 > > This not, we defined it just to be a U16. > >> + [NL80211_ATTR_HE_6GHZ_CAPABILITY] = { >> + .type = NLA_EXACT_LEN, >> + .len = NL80211_HE_6GHZ_CAPABILITY_LEN, >> + }, > > This no longer exists, but I guess I'll just take our patch for the U16 > here. > >> + /* Ensure that HT/VHT capabilities are not set for 6 GHz HE STA */ >> + if (params.he_6ghz_capa && (params.ht_capa || params.vht_capa)) >> + return -EINVAL; > > Not sure this makes much sense? We can only check what's being set at > the same time, so multiple calls here would still be possible ... > doesn't hurt much though. > > We didn't have this check, and have one additional check: > > @@ -6170,7 +6200,7 @@ static int nl80211_new_station(struct sk_buff > *skb, struct genl_info *info) > params.vht_capa = NULL; > > /* HE requires WME */ > - if (params.he_capa_len) > + if (params.he_capa_len || params.he_6ghz_capa) > return -EINVAL; > } > Fine. One more thing. Pradeep found that 6 GHz capability is not filled in set_station. Please handle that in your series. I'm fine with rest of the changes you mentioned. --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -5893,6 +5893,10 @@ static int nl80211_set_station_tdls(struct genl_info *info, return -EINVAL; } + if (info->attrs[NL80211_ATTR_HE_6GHZ_CAPABILITY]) + params->he_6ghz_capa = + nla_data(info->attrs[NL80211_ATTR_HE_6GHZ_CAPABILITY]); + -Rajkumar