From patchwork Tue Dec 1 09:36:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Huang X-Patchwork-Id: 335570 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D153EC64E7A for ; Tue, 1 Dec 2020 09:43:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3A07020657 for ; Tue, 1 Dec 2020 09:43:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="XXSKY2FH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728210AbgLAJnN (ORCPT ); Tue, 1 Dec 2020 04:43:13 -0500 Received: from a2.mail.mailgun.net ([198.61.254.61]:37576 "EHLO a2.mail.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727990AbgLAJnN (ORCPT ); Tue, 1 Dec 2020 04:43:13 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1606815772; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=P57Lr3P+zu2Xstcb3hlJYuTHwcNm/rZ8uepqo8Tg73Q=; b=XXSKY2FHr3A2cqNgcpOnhVstxgJJOivJ+5PqMEZKLHiG/KhPRo5PwdsV4D7lm/G5tu3hpei8 iWqsBRU3eMLKz04pyQcXKnOAxzQHCsco/t6eM3mZVo5QGmWAVu+86Pr2A1D+YYR4xZVm3a22 POyPLqkLhog3U3dGtn2dX7TRDyQ= X-Mailgun-Sending-Ip: 198.61.254.61 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-n02.prod.us-west-2.postgun.com with SMTP id 5fc60e8f4a918fcc07ecc319 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 01 Dec 2020 09:36:15 GMT Sender: cjhuang=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id A19ADC43462; Tue, 1 Dec 2020 09:36:15 +0000 (UTC) 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 C50FBC433C6; Tue, 1 Dec 2020 09:36:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org C50FBC433C6 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 2/3] mac80211: add ieee80211_set_sar_specs Date: Tue, 1 Dec 2020 04:36:02 -0500 Message-Id: <20201201093603.4093-3-cjhuang@codeaurora.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201201093603.4093-1-cjhuang@codeaurora.org> References: <20201201093603.4093-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 --- 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, };