Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp382641pxu; Thu, 3 Dec 2020 02:41:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJyAtfGBMPCVWMnnP/OG2bZWHCa1dKDYuNRUshyXcBN1gvlm/Xs4YtQslm2JREExVKNQRPqX X-Received: by 2002:a17:906:2a93:: with SMTP id l19mr1954917eje.244.1606992099064; Thu, 03 Dec 2020 02:41:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606992099; cv=none; d=google.com; s=arc-20160816; b=jnz20jdi8QmKj/GR+JlKFX2ya1sIk4lsXosKrVVyKKLlPBbC52YUXFL4gDBH9yhVyq GdPeuNG+vYbHCpPD5Au7j1lj4jtusu47xRXbJslKxLAIliu3+gWTdkhdxGtxjfe002+h 7tkesq/l3ot+8ouv5eVORjt9ZTBVJxXol8UE4xo3Q9lNBnqHWhHs/K6VQReW1SQMXyQy jgJc1csn7XGDwo/20RK9oo/PuW3XXTp57xcvhi3879GmydtqCcXCjwel8NyOCnlzYu2c WEXBJPxNm6GLGFj2RM18e/mqWIlDnmCJh2CeAvFG8LpK3qWe5UFM0yWEoYFHMB3Y1MFn U0zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from:dmarc-filter :sender:dkim-signature; bh=phg2/TkrjV0irm6eIUZcG2DimLLflq+SrGdP4e4cIdY=; b=ES6OgU9QxDfJZwZgovvNK5AbU0jVlu2FbSWdK98kGzK5158QyROgsZtBjBrhNnbfWT ZX5Dr+NeTJhSXSODgTh44/CLyTdhOGOKT8a6AVcNK1NXRpm840SOcU3+fzWFoPoMKpPl h3rbo2Mt7cAItPFOMmAEFfuSKl4U/A28iGk959kHxH9MqYzIZMi+8HvC7GyP2CRQ1/UV h/L14pIFqPWNnY9zg9ClGH+POJ3P4Hits1/7mU/JUCiAfJQ1zaIco5XPi/S5M0nlafG6 l2dps+uH+z+6UBgKBSyPJKQzi2lIJGDs23C9H9Na0E3+GwcEI0YlaR+Uym8OqRdUx1IX Vwcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=AY4fh6VQ; 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 t23si741049edc.387.2020.12.03.02.41.04; Thu, 03 Dec 2020 02:41:39 -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=AY4fh6VQ; 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 S2388533AbgLCKiY (ORCPT + 99 others); Thu, 3 Dec 2020 05:38:24 -0500 Received: from so254-31.mailgun.net ([198.61.254.31]:30032 "EHLO so254-31.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387840AbgLCKiY (ORCPT ); Thu, 3 Dec 2020 05:38:24 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1606991884; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=phg2/TkrjV0irm6eIUZcG2DimLLflq+SrGdP4e4cIdY=; b=AY4fh6VQfIVZ4kNSu2vYHeWcaEVHxBiTAa/92O2oevNXyU3oUIsSnutUBEYmzMcXELyI1TS4 skk/1oRscXVMSPn2/lEw/iXiOOUclx/6t+F/QmNTe2wri9cmkxP1v++UepznXIzg44R7wqjJ Zx1M/jAtzXBHZXYsoVxSpNEasVw= X-Mailgun-Sending-Ip: 198.61.254.31 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-n05.prod.us-east-1.postgun.com with SMTP id 5fc8bff20e79641fd5e1f4e3 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 03 Dec 2020 10:37:38 GMT Sender: cjhuang=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 9D07CC43461; Thu, 3 Dec 2020 10:37:37 +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,SPF_FAIL autolearn=no autolearn_force=no version=3.4.0 Received: from cjhuang-Inspiron-7590.qca.qualcomm.com (unknown [180.166.53.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: cjhuang) by smtp.codeaurora.org (Postfix) with ESMTPSA id 10D65C433ED; Thu, 3 Dec 2020 10:37:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 10D65C433ED Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=cjhuang@codeaurora.org From: Carl Huang To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, briannorris@chromium.org, dianders@chromium.org Subject: [PATCH v4 0/3] add common API to configure SAR Date: Thu, 3 Dec 2020 05:37:25 -0500 Message-Id: <20201203103728.3034-1-cjhuang@codeaurora.org> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This patchset is to add common API to configure SAR. The mechanism is wlan driver registers sar capability to wiphy and userspace queries it. Userspace then sets power limiation to wlan driver. v4: - add "Reviewed-by:" tag v3: - check index duplicates. If index duplicates, returns error v2: - rebased on ToT - fix comments by Johannes and Abhishek - change sar_power to s32 and range_index to u32 Carl Huang (3): nl80211: add common API to configure SAR power limitations. mac80211: add ieee80211_set_sar_specs ath10k: allow dynamic SAR power limits via common API drivers/net/wireless/ath/ath10k/core.c | 16 +++ drivers/net/wireless/ath/ath10k/core.h | 3 + drivers/net/wireless/ath/ath10k/hw.h | 2 + drivers/net/wireless/ath/ath10k/mac.c | 225 ++++++++++++++++++++++++--------- include/net/cfg80211.h | 51 ++++++++ include/net/mac80211.h | 2 + include/uapi/linux/nl80211.h | 102 +++++++++++++++ net/mac80211/cfg.c | 12 ++ net/wireless/nl80211.c | 185 +++++++++++++++++++++++++++ net/wireless/rdev-ops.h | 12 ++ net/wireless/trace.h | 19 +++ 11 files changed, 570 insertions(+), 59 deletions(-) -- 2.7.4