Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp385266pxu; Thu, 3 Dec 2020 02:46:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJyI79naRp7Z/FyX7wjGGZsc4sYSfKFsMzJVQ3iXy2Xe4qkZB/dBxKe960lcS6UD0SLrvbbF X-Received: by 2002:a17:906:851:: with SMTP id f17mr1983161ejd.392.1606992396932; Thu, 03 Dec 2020 02:46:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606992396; cv=none; d=google.com; s=arc-20160816; b=j2TKEO9AlfG/1jeYG/Kr2Y7rOJaZY4BGWc0lffUSM57AN1Io+nixlzskKcMmCEZVOR t7ummOazrhseDhYWpkn8O2YfROaJpt90blzLSdeAYKdmAcXzKvqXI4wSq+4/+4jRHp49 9KU7+wxx7m5nqGMM6/0xK+DYqHcFt/OZVU6qAYXLlX478pCKu9lpb+i+sJ3bapvKySpD DLR1a23Jc4PdYhCCmINj46jdpmUd6+AxnniYKaApsCXvtyJRK4J5MP5hmvNmEdQuOH6w 0bfOjFyNk1z6zVEjd8RSZ6AtIDwrgkN//f+93r3yys/whqGObZLMMtHUPMPfX0LGCTY/ h4pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dmarc-filter:sender:dkim-signature; bh=MTdDFvSdYLCw/TTnvoWjLGu8HmRfuHPiNT7t6ZmQ1Tk=; b=KwL/Z9j7av+VACHwbaPNsFYwfFiz+FL1oVCBIkMonqkgSy+XgwET6KKGWDfHEbf7GS FMREYFs4iTk5b1RdqGcWrPD0IBnczN0JsC39cTjd8+RIwd/f6nZ5K4dNZ7D14cqFNZCf UGraO17bK2yQ5jZT57++h+I6Lo9p5sJR19KWF+4VW5K3T7gBwGTkiJWBMfm/IUK+/TFT 3Ebp4E4OKPabj6/c0+XK9OVmmCiuUJu0JD+piAG9g3TKO2wJ6CeFTvhAccCAKtAfGEA6 lY4YTRAHVHNiAyq4MbNGVX4MXZMEaB1j1XOCgvQKScJdU+zm/jILdVtKnTskhW2dh9am vEfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=FnXwY9yF; 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 bv24si853818ejb.22.2020.12.03.02.46.12; Thu, 03 Dec 2020 02:46:36 -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=FnXwY9yF; 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 S1730256AbgLCKoV (ORCPT + 99 others); Thu, 3 Dec 2020 05:44:21 -0500 Received: from m43-15.mailgun.net ([69.72.43.15]:47928 "EHLO m43-15.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730214AbgLCKoV (ORCPT ); Thu, 3 Dec 2020 05:44:21 -0500 X-Greylist: delayed 353 seconds by postgrey-1.27 at vger.kernel.org; Thu, 03 Dec 2020 05:44:20 EST DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1606992235; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=MTdDFvSdYLCw/TTnvoWjLGu8HmRfuHPiNT7t6ZmQ1Tk=; b=FnXwY9yFQ/SqYT+cw0/PGzeSrjLXroNX5qHPtq1KkLTnP1fwTzPQVGRaN4/TdrMfFRfb16Sh kM0w129+FatPb8sd1cHxld8eGg1EISMKbR5Y5z5nGFpULAuah1kvwKPKqJWLsHhANH7t+5Yg BFKoaEWZXDeQGk1fbMmgMG7W2Bs= X-Mailgun-Sending-Ip: 69.72.43.15 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-n10.prod.us-east-1.postgun.com with SMTP id 5fc8bff5a1906b87a60a9b60 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 03 Dec 2020 10:37:41 GMT Sender: cjhuang=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 40B04C433ED; Thu, 3 Dec 2020 10:37:41 +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, URIBL_BLOCKED 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 76812C43460; Thu, 3 Dec 2020 10:37:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 76812C43460 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 2/3] mac80211: add ieee80211_set_sar_specs Date: Thu, 3 Dec 2020 05:37:27 -0500 Message-Id: <20201203103728.3034-3-cjhuang@codeaurora.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201203103728.3034-1-cjhuang@codeaurora.org> References: <20201203103728.3034-1-cjhuang@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This change registers ieee80211_set_sar_specs to mac80211_config_ops, so cfg80211 can call it. Signed-off-by: Carl Huang Reviewed-by: Brian Norris Reviewed-by: Abhishek Kumar --- v4: - add "Reviewed-by:" tag v3: - no change v2: - rebased on ToT include/net/mac80211.h | 2 ++ net/mac80211/cfg.c | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 05c7524..3576e34 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -4197,6 +4197,8 @@ struct ieee80211_ops { struct ieee80211_vif *vif); void (*sta_set_4addr)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta, bool enabled); + int (*set_sar_specs)(struct ieee80211_hw *hw, + const struct cfg80211_sar_specs *sar); }; /** diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 7276e66a..f7ff35b 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -4083,6 +4083,17 @@ static int ieee80211_reset_tid_config(struct wiphy *wiphy, return ret; } +static int ieee80211_set_sar_specs(struct wiphy *wiphy, + struct cfg80211_sar_specs *sar) +{ + struct ieee80211_local *local = wiphy_priv(wiphy); + + if (!local->ops->set_sar_specs) + return -EOPNOTSUPP; + + return local->ops->set_sar_specs(&local->hw, sar); +} + const struct cfg80211_ops mac80211_config_ops = { .add_virtual_intf = ieee80211_add_iface, .del_virtual_intf = ieee80211_del_iface, @@ -4186,4 +4197,5 @@ const struct cfg80211_ops mac80211_config_ops = { .probe_mesh_link = ieee80211_probe_mesh_link, .set_tid_config = ieee80211_set_tid_config, .reset_tid_config = ieee80211_reset_tid_config, + .set_sar_specs = ieee80211_set_sar_specs, }; -- 2.7.4