Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1149832pxb; Fri, 6 Nov 2020 02:12:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJzKy/Pbc6f1lkEa6awGcMwK59r2RTB4JwcjAL+vakiCnJPcen4pZcgMBfNDjEIyugBu6gvB X-Received: by 2002:aa7:c948:: with SMTP id h8mr1158820edt.171.1604657528353; Fri, 06 Nov 2020 02:12:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604657528; cv=none; d=google.com; s=arc-20160816; b=dJl8MLhq/Vy4tDkDPva64UhyvI1+054DpDjWnIJVk8jpjO+BG6/iRzJDwkl1HbnygJ 4LExzot4/u/JpW0UEDnKeKWfh0I5wEs9NUaGu//AYwZLgnJUtGHoScYWDHE6Q+gjWwaP GauK8f/EnRPh5jFspD1S2GDS8FhD/R7g5+MB7E9CtVoxIdEi4GdG8neQMGL1ODGas4B0 uPDPoHInQPP3STGKOJIeIkQg/s653c9RUK9T6DcF22oAjtX+sw2fFBfg7LrNoTxBMjji Oy520vA309PmOp8jWwBi+c8868ZGgnh583YQyy7NiueUVcib6zi1P6jxZJTiHc6V1f5i ZnUA== 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=RdKj2779UeYDrAsAtSkiFNE54NCPGul6ABdv+9htfJM=; b=RepIgsPpgYyYfoS+OG5p9/m6lj7MDLVIzUYhBv4ant9J9TlbCj+DIZt+1SxaumHXkw 7gX4OT+hoPVUiLMQGhhae2gkraOCJ4JPDTpTehOu/onZi/dv54hP/PGu+9yDVr10mJzh ITySc9+Ki2cKXMGCOe2UnigM6GjInE+dhlau491fpU1ZGl3znrtqPRCKfV9dHrHVgxzg Vdhm8F5DePTIEGcO5q6AhjGZuYnzP9TxwN98G5T07PW//UkquIcOSs5zVkxa5NhjxSDp J/6PqjTLeTO/FQXwzhTrbnFLijIF7Mej+ok2dI0Z0oj0jB8w0uVb5c6b+iIQOwNuVIzs vtHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=VNL7UCeu; 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 bq23si496403ejb.529.2020.11.06.02.11.44; Fri, 06 Nov 2020 02:12:08 -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=VNL7UCeu; 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 S1726321AbgKFKL3 (ORCPT + 99 others); Fri, 6 Nov 2020 05:11:29 -0500 Received: from z5.mailgun.us ([104.130.96.5]:46404 "EHLO z5.mailgun.us" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726010AbgKFKL3 (ORCPT ); Fri, 6 Nov 2020 05:11:29 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1604657488; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=RdKj2779UeYDrAsAtSkiFNE54NCPGul6ABdv+9htfJM=; b=VNL7UCeunYnGLLGBPXE+yMl7PpgtNaIa8cl569znIWBShOie6xyATAKbjXhn2SJq0oBDgu1p iZBED13G20wpcoVo+O6CSeLfgjTEFYrJH2CMdVFVyY+IY6ZvX04exEIfwieAX4HNJ0bI5Nky w3qOw1eYO6A8XM0IfCI28WnbPxc= X-Mailgun-Sending-Ip: 104.130.96.5 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-n07.prod.us-west-2.postgun.com with SMTP id 5fa52150991cc324d41151ca (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 06 Nov 2020 10:11:28 GMT Sender: cjhuang=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 9C7DFC433F0; Fri, 6 Nov 2020 10:11:28 +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 9E775C433C8; Fri, 6 Nov 2020 10:11:27 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 06 Nov 2020 18:11:27 +0800 From: Carl Huang To: Brian Norris Cc: linux-wireless , Doug Anderson , ath10k , ath11k@lists.infradead.org, Kalle Valo , Abhishek Kumar 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> <877dr0nqtv.fsf@codeaurora.org> <728196c17b4e70e18c99798a9945d1e6@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-06 02:25, Brian Norris wrote: > On Thu, Nov 5, 2020 at 3:10 AM Carl Huang > wrote: >> On 2020-11-05 16:35, Kalle Valo wrote: >> > Brian Norris writes: >> >> On Tue, Nov 3, 2020 at 11:32 PM Carl Huang >> >> wrote: >> >>> On 2020-11-04 10:00, Brian Norris wrote: >> >>> > 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? > > To be clear: the answer here is "no." So we have to map out what the > user/kernel interaction looks like when they change. > >> >> ... >> >>> For a given chip(at least a QCOM chip), we don't see that the >> >>> range will grow or change. >> >> >> >> That's good to know. But that's not quite the same as an ABI >> >> guarantee. >> > >> > I'm not sure if I understood Brian's question correctly, but I have >> > concerns on the assumption that frequency ranges never change. For >> > example, in ath10k we have a patch[1] under discussion which adds more >> > channels and in ath11k we added 6 GHz band after initial ath11k support >> > landed. And I would not be surprised if in some boards/platforms a >> > certain band is disabled due to cotting costs (no antenna etc). > > Right, I certainly was not taking the "never change bands" claim from > Carl at face value ;) This is exactly why I was asking. > >> > My >> > preference is to have a robust interface which would be designed to >> > handle these kind of changes. > > Sure. > >> > [1] [PATCH] ath10k: enable advertising support for channels 32, 68 and >> > 98 >> >> So the trick here is even if more channels are supported, it doesn't >> mean >> that it can support different SAR setting on these new channels. In >> this >> case, >> it likely falls into 5G range. It's safe for driver to extend the 5G >> range and >> doesn't break userspace. (68 and 98 are already in the 5G range, so >> driver just >> extends the start edge freq to 32 here.). > > You can't just wave your hands and say it "doesn't break userspace" -- > you have to think about how user space can use this API. > > Specifically, consider that user space is not going to memorize > indeces, as those are per-driver implementation details; it's going to > memorize frequency bands. It wants to cross reference those with the > results of the GET/DUMP API before it translates those into indeces > for SET. As you're describing it, user space will have to have some > kind of "fuzziness" to its logic -- today, it thinks the 5G band is > [X,Y], but tomorrow it might expand to [X-N, Y+M]. So user space > should just ensure that it configures any band that intersects with > [X,Y], even though it didn't know about [X-N,X] or [Y,Y+M]? That logic > covers splits too, I suppose. > > There's still the question of ranges that user space has no knowledge > of (i.e., no intersection with any known [X,Y]). I think there's two > approaches that are roughly equivalent: > 1) require SET operations to specify all bands, and designate a NULL > or MAX value that user space should use for unknown/unconfigured bands > [or, user space uses some kind of "extension" from the nearest known > band, just to be safe?] > 2) allow SET operations to specify a subset of supported bands [gray > area: what happens with the unconfigured band(s)? left as-is? use > max?] > > We're approximately in #1 right now. If we're explicit about how > that's supposed to work, then I think we can stay with that. Although > it sounds like Carl is moving toward #2 (allow subsets). > >> But for flexibility, given 6 GHz as example here, let's keep the >> explicit >> index for SET command. For sar_capa advertisement, the explicit index >> is >> dropped as Johannes suggested. New ranges can only be appended to >> existing >> ones. Like Brian said, only add or split is allowed. > >> The complexity to >> handle >> splitted range Vs whole range is left to WLAN driver itself. > > Hmm? I thought we're keeping the driver simple. I'm OK with that (and > moving a little more complexity into user space) as long as we're > clear about it. > I've sent [PATCH 0/3] add common API to configure SAR, please let's start from there again. > Brian > >> Userspace can SET any ranges which are advertised by WLAN driver. It's >> not required to set all ranges and userspace can skip any ranges. > > _______________________________________________ > ath10k mailing list > ath10k@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/ath10k