Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1106156pxb; Tue, 3 Nov 2020 23:33:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJyUqEdcOFevSS6WMEDcoQwGKNaJCDr0FxzoserOsEvxCVs4u3rq+PJu5PIetYNsv/lzMq/N X-Received: by 2002:a17:907:4302:: with SMTP id nh2mr20265402ejb.451.1604475196790; Tue, 03 Nov 2020 23:33:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604475196; cv=none; d=google.com; s=arc-20160816; b=R7jpLsBX+3F8AKBgAaGXWaytsc1ujCAddXzi+oUOTMDGX4IT0wrYeTwvCE2W2HCGEp BzaRdgraSO2nciSXHSpN0jXjaGQsy/PnYHdvR0y79W5VZeKY8aapZ9+iOsXwRF2xR9uG Xo7S/5XmKSdUpeUJM6idNPRem/mm0equpn3/BIVHsCVy4Tqc21UfRux6heAwoT6mdthO APSEUBlMn2bjikl81st7igWWighbawvitvmf0T6jLYxOYswPyfJFGhoN4lgNRQ/5eCPQ Xn/KiymD3zkigd7vHZ4DA5wev1Cy7n4bJJHrfDpE84aXuxrt1j+bPUv/5IgLlpT8P38j FV6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=PmT/lRSSkZac1ZkiO1gAPjcZE46NX2dF9QNKGHEK6Hk=; b=L03x21ZLx/yJ8lnOLF6RP7oKPAkiv91DUrdrTzzeWG/GKwOb9FMpo2qCS7fzHOYgYT 5cIehp2mwT/MoJJSKL0SzAVZnkc2qwzLKLlR5H6Be/lcQ/ADzBGqFgzif+VAqv8kjxQQ igFjRbWg2EZpo77vxO/OLMy6jFTn+I9p2s+HPuJzmf0S0OLxYb2vcase4l4ka0vTFWtR +x/J5bIYUshq9jj0XkSLQdNMi9ez0l/SWrfX/bkySYgNJEzO16KURd81qYInCH7KHC0f lzcAyj6BsUSOp5ahA0ArXB8YlaGJbagxDR1mZT5TFhKpIRHdyaw7q8YvUIj+YR/3heAP feaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=bqfcJBYU; 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 cx24si707105edb.419.2020.11.03.23.32.42; Tue, 03 Nov 2020 23:33:16 -0800 (PST) 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=pass header.i=@mg.codeaurora.org header.s=smtp header.b=bqfcJBYU; 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 S1727754AbgKDHcb (ORCPT + 99 others); Wed, 4 Nov 2020 02:32:31 -0500 Received: from m42-4.mailgun.net ([69.72.42.4]:27101 "EHLO m42-4.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726259AbgKDHca (ORCPT ); Wed, 4 Nov 2020 02:32:30 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1604475150; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=PmT/lRSSkZac1ZkiO1gAPjcZE46NX2dF9QNKGHEK6Hk=; b=bqfcJBYU+/eQxQ4c8PNL4u21BZBdDJrhGixSb+dO9v2Kg7tM+u7yiZLOJqx5WGdMtP2hM9BM qJCl8R33/BxhN/1BMcjZXd9RZOshO7nUSjO1g+w4GsiS8s2KaKljb+hCGsdqKWj2eQCvLQt1 O8IEuZ7IxBkjAC6rONJq8yDmzV0= X-Mailgun-Sending-Ip: 69.72.42.4 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-n03.prod.us-east-1.postgun.com with SMTP id 5fa2590750440018cb3cf92b (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 04 Nov 2020 07:32:23 GMT Sender: cjhuang=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 53A55C433C9; Wed, 4 Nov 2020 07:32:22 +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=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00, 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: cjhuang) by smtp.codeaurora.org (Postfix) with ESMTPSA id A0029C433C6; Wed, 4 Nov 2020 07:32:21 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 04 Nov 2020 15:32:21 +0800 From: Carl Huang To: Brian Norris Cc: linux-wireless , ath11k@lists.infradead.org, Doug Anderson Subject: Re: [RFC 1/2] nl80211: add common API to configure SAR power limitations. In-Reply-To: References: <1600753017-4614-1-git-send-email-cjhuang@codeaurora.org> Message-ID: X-Sender: cjhuang@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2020-11-04 10:00, Brian Norris wrote: > On Mon, Sep 21, 2020 at 10:37 PM Carl Huang > wrote: >> +/** >> + * struct cfg80211_sar_capa - sar limit capability >> + * @type: it's set via power in 0.25dbm or other types >> + * @num_freq_ranges: number of frequency ranges >> + * @chan_ranges: memory to hold the channel ranges. >> + */ >> +struct cfg80211_sar_capa { >> + enum nl80211_sar_type type; >> + u8 num_freq_ranges; >> + const struct cfg80211_sar_freq_ranges *freq_ranges; >> +}; > ... >> u8 max_data_retry_count; >> >> + const struct cfg80211_sar_capa *sar_capa; >> + >> char priv[] __aligned(NETDEV_ALIGN); >> }; > > What are the ABI guarantees around a given driver/chip's 'sar_capa'? > Do we guarantee that if the driver supports N ranges of certain bands, > that it will always continue to support those bands? What if, for > instance, ath10k grows a new set of subbands, supporting sub-sections > of the 5GHz band -- does it still need to support both a contiguous > [5, 5 + X] and a split [5, 5 + X/2], [5 + X/2, 5 + X]? Basically, do > we intend to put the burden on user space to figure out how to map its > power tables to the supported frequency band(s), or on the kernel, to > support a backwards-compatible set of frequency ranges? The latter > doesn't really work if you expect user space to always specify all > ranges in a SET command. > > To be clear, I'm not as worried about differences between chips or > drivers (I expect that different driver or chips may have different > range support); just about stability for a given chip. > For a given chip(at least a QCOM chip), we don't see that the range will grow or change. In addition, with current index-power SET method, it's hard for driver to know what the index mean given your example. Does the index mean [5,5 + x] or [5, 5 + x/2] ? So it's required for user-space to specify all the ranges. The number of ranges is quite small, so the SET itself is not a problem to specify all. Brian, are you fine that we go with this proposal? I'll send V2 based on the comments from Johannes and Abhishek. > Brian