Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp573011pxb; Tue, 15 Feb 2022 22:30:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJzSwHJqUdgUV8o502M1RkvrclurwvaC9MjRsCrb2jc/RgWGYkqUNjq2YP7jrG9rpddUqXW6 X-Received: by 2002:a17:90b:314e:b0:1b9:ef8b:d441 with SMTP id ip14-20020a17090b314e00b001b9ef8bd441mr82784pjb.215.1644993023330; Tue, 15 Feb 2022 22:30:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644993023; cv=none; d=google.com; s=arc-20160816; b=selzoZ1L5lOgUi7Adx6YR8XAm5Zoboh+dKVmwLgRBmjIZjd2yV19OMT0dBzD5oGdHr rtnBpWNGX9WHMzHc7p+onHBjggC3Q8bhkzCul4ZZ8viRKd9XZUE4JeYeYEDgJgPlPFOR ANYyzPTeZhZuxl84lxgb3yjzBrAAVCCBImQjnrQIzfq7QEyK+cfK5gBmEFpLevOem4Xu 07OwO59rHtvkehmhl7/SWcgKVKOQsg74BafbSOSvzy3gn8D7tkclFN7wWMxZ+tvxLcE1 lHGM5gQEbRvsLqnBv8qiq/4u++fAYdqhNR1jDApRhnZVemdq2ch+RpLNGZRB2usYETo1 LGIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=Arrbd2Ykpy56L/skI75TlgsKaz3/6MKmznLIvckiGgU=; b=opNzVIvvcGkBx8TFRb3lswkG3nWcW+4OjZUIbVMu1uxkxaTvndZu1MK6TjMlAJSD11 okIPhoErfwiNBSCj3LdvA7SmWm/bDkUN/z009XQjpgBma6Bjyez7tN1/2lqICVltN5ki HC3Ioz4PtxhjYTJO8mwvRQhWHbF/Lh+Y3orfktby3CSfsZK0YfCOyqD/4qg8IpBFxqF+ Nq0bHYoPJmIwc1nlbYyy4urkf2ie5VckZTG0ex7kkrvxqMImi3VB88aOlF70L9WHXDlG k0yIQOQZTekCLtHdMTNmo28xPPcMDbUwS6GfBIsqsYz1RopIbT7TqgtWXTFqz4Gad2yL DgAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=FR2gRfHh; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u63si4764093pgd.299.2022.02.15.22.30.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 22:30:23 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=FR2gRfHh; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 560A61CAF74; Tue, 15 Feb 2022 22:24:28 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240231AbiBPAiM (ORCPT + 73 others); Tue, 15 Feb 2022 19:38:12 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:45246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235223AbiBPAiL (ORCPT ); Tue, 15 Feb 2022 19:38:11 -0500 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81A0F2B263 for ; Tue, 15 Feb 2022 16:38:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1644971880; x=1676507880; h=message-id:date:mime-version:subject:to:references:from: in-reply-to:content-transfer-encoding; bh=Arrbd2Ykpy56L/skI75TlgsKaz3/6MKmznLIvckiGgU=; b=FR2gRfHhzm+ZK+Zu+jYh1qPTZydhEmCRkEKgKufWDIYZhOP4fXipT5B4 MS/IVcIRrcPVL98kxYoNdZH9F4jfO5FBVYMkeFDiBf5lhaJ7hFY2Bb+4J INgK6lVzf3uuSZPyii61DzADxIHWJppMfWePm7ZuXl5bbEHf8L9kRuihb 8=; Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 15 Feb 2022 16:38:00 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2022 16:38:01 -0800 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Tue, 15 Feb 2022 16:37:59 -0800 Received: from [10.110.76.85] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.19; Tue, 15 Feb 2022 16:37:59 -0800 Message-ID: <6cf56be5-16d6-2bcd-150f-bf29f98b7f1b@quicinc.com> Date: Tue, 15 Feb 2022 16:37:58 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: [PATCH 2/3] cfg80211: validate RU puncturing bitmap Content-Language: en-US To: Johannes Berg , References: <20220214223051.3610-1-quic_alokad@quicinc.com> <20220214223051.3610-3-quic_alokad@quicinc.com> From: Aloka Dixit In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2/15/2022 12:19 AM, Johannes Berg wrote: > On Mon, 2022-02-14 at 14:30 -0800, Aloka Dixit wrote: >> >> + >> +bool cfg80211_ru_punct_bitmap_valid(const struct cfg80211_chan_def *chandef) >> > > Heh. We wrote basically the same code just the other day (except I think > inverting the bitmasks or something?) in mac80211 for the client side, > i.e. when receiving puncturing from the AP ... > I instead reverted the passed bitmap inside the function because that way if the map is not provided at all, it will be all 0's by default and will be considered as all channels active. > Can we export this function maybe so mac80211 can use it? > Sure, will add in the next version. > > Conceptually, I'm wondering if it really belongs into the chandef? Can > you explain why it's part of the channel configuration? If you've got > two chandefs with the same control channel, CCFS and bandwidth, but > different puncturing, does it really make sense to treat them as two > separate channel contexts, e.g. in mac80211? It seems strange to do > that. > > johannes Added it here so that any command working with chandef will be updated without any other change. Example: During channel switch, user can provide a puncturing bitmap with a new option I added in userspace, and because it is part of chandef, the same code path validates it for that command automatically. Regarding if different puncturing pattern should be considered as a new context - yes, depending on if it is HE or non-HE mode, the new bitmap may be invalid and the operation should fail. Thanks, Aloka