Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1104861ybm; Wed, 27 May 2020 16:34:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJww/PDkQjZFkrvFAH4KLxuVHOcGnNM/BzHY0VMQfmMuIr/UCjK+i1qH85ZDRifVuUeu5fbU X-Received: by 2002:a17:906:6c82:: with SMTP id s2mr608096ejr.215.1590622473433; Wed, 27 May 2020 16:34:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590622473; cv=none; d=google.com; s=arc-20160816; b=qRRLdOqYmtN4Pc1NztClV3ZEXxhSA8XjF8PrAtwFZU0Ya4+wRKTKFSodCoTewLUt0x X3XcN+Fjeg1jE4SQBrWvYH93W6yu8plPnEXU2vHgsz282VysnNqRo4CRxGmgzUmUMANO jY9RYgnrcdWtVbYy+zpxtWrASTlaHPd681z1UO9K51Dz1UvFJPWymAOZsuuJ9JMYCR/e BeXkgsLDvoiLVE31QkIwgsuaeLlljJgnWQrkrqvm/IfvqL/dDoZxNaDWO4afA19JDiLb qKGqR/YCHin8mS2NMvGpjmvB0yr3tZt6rtWY7BsVX52827t5Px1gJ+by5V6XNRB63OLs UPRQ== 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=9Gz/LANfjeSNR228OFq3RM4Wbcf/OEnHdzfHvhy6o6g=; b=rzDx9LfdejW6qU69RshQJTQW2L0d6+G7M2WrLRToBxbMNFwsMtbRSPnBFOnIW8Vwpk qiIxcj+AT6CsonQeLIxlVvGNwT9I3TiV71yM5FFCbKfZOR0XzooZoVFT5AQmRN/Pahnm 7acO/bkllYD237Z+yhWciw3qQztNTfsdLw30Up9znMS7gZFcHKOfOww//ZQlpldEgWmG GvssWZY7qllzoemPn71B3lynselhiP8OA047X80jaOLbe5h3peQWAtjtujSlVL6WkgXW kYFOERcbL0Pg6Lb906nparKt9bYlObNjOkuNdvAFaVQTyx2IaahxHChAZZLf58Zd21bP VapQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=aWKf1lSg; 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 h10si2875409eja.307.2020.05.27.16.34.08; Wed, 27 May 2020 16:34:33 -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=aWKf1lSg; 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 S1726161AbgE0Xcf (ORCPT + 99 others); Wed, 27 May 2020 19:32:35 -0400 Received: from mail27.static.mailgun.info ([104.130.122.27]:48362 "EHLO mail27.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725880AbgE0Xce (ORCPT ); Wed, 27 May 2020 19:32:34 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1590622354; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=9Gz/LANfjeSNR228OFq3RM4Wbcf/OEnHdzfHvhy6o6g=; b=aWKf1lSgvZ37QJNvMW+Sh58dxAGBP2tOw+0IXZrYg1ZjvqWcCPGg9tV3x7E36ul5tJeWMCkg 2qURD87ZUEx67o+wEyz4RALJnJPlfncy2XVrGtd8XxBDw4t5EbvPduhf6of7g0UnGBNDHKuk BQpiSKFGXEX+P3gwbGGJMaSBgg8= 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-n01.prod.us-east-1.postgun.com with SMTP id 5ecef8913131442d953ded0e (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 27 May 2020 23:32:33 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 12B13C433C6; Wed, 27 May 2020 23:32:33 +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,URIBL_BLOCKED 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 652C3C433CB; Wed, 27 May 2020 23:32:32 +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:32:32 -0700 From: Rajkumar Manoharan To: Johannes Berg Cc: kvalo@codeaurora.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, Vamsi Krishna , linux-wireless-owner@vger.kernel.org Subject: Re: [PATCH v3 01/11] cfg80211: use only HE capability to set prohibited flags in 6 GHz In-Reply-To: <7f2a2a382c42b7285b9ad1eeac4e8060bc8d897a.camel@sipsolutions.net> References: <1589399105-25472-1-git-send-email-rmanohar@codeaurora.org> <7f2a2a382c42b7285b9ad1eeac4e8060bc8d897a.camel@sipsolutions.net> Message-ID: <0fa1c07811796add4a6a23c81cbafe41@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 06:43, Johannes Berg wrote: > Hi, > > This is what we have in this area: > https://p.sipsolutions.net/d8e56772a261199a.txt > > but I see it's also incomplete. > >> +static bool cfg80211_is_6ghz_freq(u32 freq) >> +{ >> + return (freq > 5940 && freq < 7105); >> +} > > That doesn't really make sense, I don't want to see those hardcoded > frequencies all over the place. > >> case NL80211_CHAN_WIDTH_40: >> width = 40; >> + if (cfg80211_is_6ghz_freq(chandef->center_freq1)) { > > You can check chandef->chan->band instead. (In fact, we did) > Got it.. >> + if (!he_cap) >> + return false; >> + if (!he_cap->has_he_6ghz) >> + return false; > > I'm not sure you should even _get_ here with a 6 GHz channel if you > don't have 6 GHz capability? I mean, why did you register the channel > in > the first place then? This seems unnecessarily complex. If the channel > didn't exist, it was rejected long before here. > Hmm... Agreed. > However, looking at D6.0, maybe we do need some checks of the HE > capability? > >> + if (!(he_cap->he_cap_elem.phy_cap_info[0] & >> + IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G)) >> + return false; > > Looks like even D6.0 still changed something in this area... > > Evidently our patch just assumed that in 6 GHz all of this is > supported, > but the spec doesn't support that theory :-) > IIUC the same bits are applicable for both 5 GHz & 6 GHz. I understand the macro doesn't capture both. > Can you respin this with D6.0 taken into account? > Let me check again and respin after your series. Does it sound good? -Rajkumar