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: 10566195 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 A72B71515 for ; Wed, 15 Aug 2018 00:30:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9820029E1E for ; Wed, 15 Aug 2018 00:30:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C65629E54; Wed, 15 Aug 2018 00:30:53 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3765F29E1E for ; Wed, 15 Aug 2018 00:30:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=M502l46/QY73x8pD99/P1LHZzh8gYvqHF9dTnN+kPTU=; b=s46zQ0xql4rv6S7c1dNrqN880t hSIf5lhTY/XawleTNaAU8e0AqadZ8ah+otVYwCC7cv7CeT1g8300DlS6hANWl11nUtTV9gqYHMr+q 878pDdDimEjlAa1kI0YN4YVJKW1Sf8NkyRiTbX0FU4o3yuycjW2BByxsnTzh6PxgKRF0DhA6ABN+s egvDZpLoBfIFX5v1lnSRRuuBHNRfKv6Cc11SFw6ORRyFpbDMLes2/YXWIcj+fp5lEttehFvrBbr1I jk9Oym169YoU0K6CrkwhxNfuiK2S9UXGYOl6lzIOgvirm8qgrP7pmtKydu+7NZbUKnAYWC6T0fD+E CpKT8rBQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fpji7-0000BU-M6; Wed, 15 Aug 2018 00:30:51 +0000 Received: from alexa-out-sd-01.qualcomm.com ([199.106.114.38]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fpji4-0008Qd-0I for ath10k@lists.infradead.org; Wed, 15 Aug 2018 00:30:49 +0000 X-IronPort-AV: E=Sophos;i="5.53,240,1531810800"; d="scan'208";a="6148728" Received: from unknown (HELO ironmsg01-sd.qualcomm.com) ([10.53.140.141]) by alexa-out-sd-01.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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180814_173048_136383_60822FA1 X-CRM114-Status: UNSURE ( 9.76 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pradeep Kumar Chitrapu , linux-wireless@vger.kernel.org MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.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;