From patchwork Wed Aug 15 00:30:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pradeep Kumar Chitrapu X-Patchwork-Id: 10566199 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 96E3D1815 for ; Wed, 15 Aug 2018 00:36:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8905D2A193 for ; Wed, 15 Aug 2018 00:36:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D5622A1FB; Wed, 15 Aug 2018 00:36:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 198012A1DC for ; Wed, 15 Aug 2018 00:36:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728141AbeHOD0J (ORCPT ); Tue, 14 Aug 2018 23:26:09 -0400 Received: from alexa-out-sd-02.qualcomm.com ([199.106.114.39]:7323 "EHLO alexa-out-sd-02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726044AbeHOD0J (ORCPT ); Tue, 14 Aug 2018 23:26:09 -0400 X-IronPort-AV: E=Sophos;i="5.53,240,1531810800"; d="scan'208";a="8939520" Received: from unknown (HELO ironmsg01-sd.qualcomm.com) ([10.53.140.141]) by alexa-out-sd-02.qualcomm.com with ESMTP; 14 Aug 2018 17:30:21 -0700 Received: from pradeepc-linux.qualcomm.com (HELO pradeepc-linux.localdomain) ([10.234.220.147]) by ironmsg01-sd.qualcomm.com with ESMTP; 14 Aug 2018 17:30:21 -0700 Received: by pradeepc-linux.localdomain (Postfix, from userid 204078) id EEE872D64; Tue, 14 Aug 2018 17:30:20 -0700 (PDT) From: Pradeep Kumar Chitrapu To: johannes@sipsolutions.net, ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Pradeep Kumar Chitrapu Subject: [PATCH 2/3] mac80211: Add support to notify ftm responder configuration to the driver Date: Tue, 14 Aug 2018 17:30:17 -0700 Message-Id: <1534293018-4930-3-git-send-email-pradeepc@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1534293018-4930-1-git-send-email-pradeepc@codeaurora.org> References: <1534293018-4930-1-git-send-email-pradeepc@codeaurora.org> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP New bss param ftm_responder is used to notify the driver to enable or disable fine timing request (FTM) responder role in AP mode. Signed-off-by: Pradeep Kumar Chitrapu --- include/net/mac80211.h | 4 ++++ net/mac80211/cfg.c | 4 ++++ net/mac80211/util.c | 3 +++ 3 files changed, 11 insertions(+) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 5790f55c241d..6593c611655b 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -308,6 +308,8 @@ struct ieee80211_vif_chanctx_switch { * @BSS_CHANGED_KEEP_ALIVE: keep alive options (idle period or protected * keep alive) changed. * @BSS_CHANGED_MCAST_RATE: Multicast Rate setting changed for this interface + * @BSS_CHANGED_FTM_RESPONDER: fime timing reasurement request responder + * functionality changed for this BSS (AP mode). * */ enum ieee80211_bss_change { @@ -337,6 +339,7 @@ enum ieee80211_bss_change { BSS_CHANGED_MU_GROUPS = 1<<23, BSS_CHANGED_KEEP_ALIVE = 1<<24, BSS_CHANGED_MCAST_RATE = 1<<25, + BSS_CHANGED_FTM_RESPONDER = 1<<26, /* when adding here, make sure to change ieee80211_reconfig */ }; @@ -611,6 +614,7 @@ struct ieee80211_bss_conf { bool allow_p2p_go_ps; u16 max_idle_period; bool protected_keep_alive; + int ftm_responder; }; /** diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index d25da0e66da1..75e314b826fb 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -964,6 +964,10 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev, sdata->vif.bss_conf.p2p_noa_attr.oppps_ctwindow |= IEEE80211_P2P_OPPPS_ENABLE_BIT; + sdata->vif.bss_conf.ftm_responder = params->ftm_responder; + if (params->ftm_responder >= 0) + changed |= BSS_CHANGED_FTM_RESPONDER; + err = ieee80211_assign_beacon(sdata, ¶ms->beacon, NULL); if (err < 0) { ieee80211_vif_release_channel(sdata); diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 88efda7c9f8a..835fcf01fabc 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -2076,6 +2076,9 @@ int ieee80211_reconfig(struct ieee80211_local *local) case NL80211_IFTYPE_AP: changed |= BSS_CHANGED_SSID | BSS_CHANGED_P2P_PS; + if (sdata->vif.bss_conf.ftm_responder >= 0) + changed |= BSS_CHANGED_FTM_RESPONDER; + if (sdata->vif.type == NL80211_IFTYPE_AP) { changed |= BSS_CHANGED_AP_PROBE_RESP;