Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4316229pxu; Tue, 1 Dec 2020 01:46:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJyAdn8j2hdCoJ69b55rlJEKhToYP0a0ClbORElNzCkxtWHIdF2ICkIdVCP/avJzsMGSMuAU X-Received: by 2002:a17:906:9888:: with SMTP id zc8mr733582ejb.42.1606815960668; Tue, 01 Dec 2020 01:46:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606815960; cv=none; d=google.com; s=arc-20160816; b=V/b81+wg2EkZWqmIGEF7VHPqs1MrcRZQ/p0TY1wpagemrcBZNcQTCQpNAOFYN4oB3F LxIk540+GygrUYbGG8BxibmsjLy2JXrQqJzmsMp8PzKwVnJX3+XVKTb2b0muw0ktI0mf xffOEzFNwec/DphvzjI/qzJQj6bRtzN7j8oQfYKXCO2X/jUuzLabTVuWzhXLgv4WGxTp kxnek2zfVGGfcQZAAdLsgAH0+FKhSOiUm9VKfLbXqH5No68r4NcvgB20Vc31lz5sf9K/ 2sih2qVoZwdRoRR3pjsMLpEVBCG3qAm8veTR0ESfZGtiDmRQ577QT5Jl7Aq/ZbrOhZTp 7v2Q== 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=gpkMDoeUdaevEpDoNTHvqsV6XW6wb7L6hqUENT61/o0=; b=k/ZN1PHkFCLMmi7iSm0puh5vmfL71JtzjSkz4Y4fAREyrsin8PF/nqNOzqdgPZBJqV qoANOb+AUoglBubf1gqpyn/8amKQ9iBI1ld1Z1eZC8QKlc1JF9AkiMwd8gTS1aNt3kJz VodjcaM5DJ6mbklfe/YgRfMGpNcrvDy0zDjaBnm/dPNggF3T6m42mckuGEKs+s40MkKd U/g3wvHFI79kA6Qy04C2mzYgqZqcyAhDcaHgSvGXasDsWpTb+7c/0bC/YNpSxC5RpmSN aoA7faG/FiWplhPqN+BQBrfmMSXMWGKNmrulzQUEDlm7LY28bvk1ux3BPbchtcn60VnJ Q0KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b="ER4/jqHj"; 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 bm13si767184edb.281.2020.12.01.01.45.37; Tue, 01 Dec 2020 01:46:00 -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="ER4/jqHj"; 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 S2403785AbgLAJmb (ORCPT + 99 others); Tue, 1 Dec 2020 04:42:31 -0500 Received: from m42-5.mailgun.net ([69.72.42.5]:63061 "EHLO m42-5.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391060AbgLAJma (ORCPT ); Tue, 1 Dec 2020 04:42:30 -0500 X-Greylist: delayed 352 seconds by postgrey-1.27 at vger.kernel.org; Tue, 01 Dec 2020 04:42:30 EST DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1606815724; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=gpkMDoeUdaevEpDoNTHvqsV6XW6wb7L6hqUENT61/o0=; b=ER4/jqHjBgwOHJ3LjR1K8uPWXgLKc9UHr0N78HJJnKS3wrT/C8u8+O+pU6DfSAfuJd0vUa8d YdmxyA7G/gIbVL9hVUYmabmWfAzsSiDzcs4XUXl3cPdmtwilZrxP3vXAW7J2JLgguQ1o47so 9mgiuowc40E1dH296gLYUl/Iyok= X-Mailgun-Sending-Ip: 69.72.42.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-n05.prod.us-west-2.postgun.com with SMTP id 5fc60e8bf653ea0cd85804a9 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 01 Dec 2020 09:36:11 GMT Sender: cjhuang=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 6A129C43462; Tue, 1 Dec 2020 09:36:11 +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 96576C433C6; Tue, 1 Dec 2020 09:36:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 96576C433C6 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 v3 0/3] add common API to configure SAR Date: Tue, 1 Dec 2020 04:36:00 -0500 Message-Id: <20201201093603.4093-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 limitation to wlan driver. 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