From patchwork Tue Sep 19 02:51:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: yintang@qti.qualcomm.com X-Patchwork-Id: 9958041 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BE20F60568 for ; Tue, 19 Sep 2017 02:51:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 929B4289B2 for ; Tue, 19 Sep 2017 02:51:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 87ACD28A09; Tue, 19 Sep 2017 02:51:11 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 20CAF289B2 for ; Tue, 19 Sep 2017 02:51:10 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=v+UDjBa0cX1dvA9lVNETO4pnUhVSgx/EdVAbOHk0iWM=; b=rSWZO790gRyvQT EfRjdd6VUmuj6fbnyBOQ9Sz6OiqthnsSOWxI76Qb2DC0f76MMZi8HONlCnpfQB/05MK5/1fk/aF7g MJQwlehlsk6y4kT0TokauGb7Hf1cbKmFQO4FaZgq7FqpD7o6OXd3ArL8MTRGnusP8+mURRar0ynnC ky6W7HubHC7mrr6lOio8QSOhKw9mULBzgpglG2QtsAkiiGro8sEqkPpiJ8UsoQxixYg+cE6atIlJM NhMx8hvTbnLZc1JX0U/u4JHa6xjBiqnDKwiWXLAZXODWeLeAPxnlIqdltN+Q2KbWnFvhIdx/9WlY7 6tNbTc8aM9oHGXrHThXA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1du8cq-0007vn-DE; Tue, 19 Sep 2017 02:51:04 +0000 Received: from alexa-out.qualcomm.com ([129.46.98.28] helo=alexa-out-lv-02.qualcomm.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1du8cK-0007cb-Gh for ath10k@lists.infradead.org; Tue, 19 Sep 2017 02:50:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1505789432; x=1537325432; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=Lg6LZFzIpBerXtS5JIypLgl7eHCaC4GT9RXcOeMf0pQ=; b=OhxZAUrmlAer8fjxrUFdWqHU9UAvUiLoYw9lyB/pduxX9U9JNCxhoD74 2Fv1NvRGXAwGuxdbFr/rpG0l5nO3X20GlGzZaU6D3kD/ZlRAgdl151wUJ jroqF0+yLXq/kBM8k952QOnCRDQcRjPFZGMMPTDz4OCqmkz+xekDJNQkW Y=; X-IronPort-AV: E=Sophos;i="5.42,415,1500966000"; d="scan'208";a="5649644" Received: from ironmsg04-l-new.qualcomm.com (HELO Ironmsg04-L.qualcomm.com) ([10.53.140.111]) by alexa-out-lv-02.qualcomm.com with ESMTP; 18 Sep 2017 19:50:11 -0700 X-IronPort-AV: E=McAfee;i="5900,7806,8658"; a="1424997155" X-MGA-submission: =?us-ascii?q?MDF7zuQBfRa5bEWrLakhzeB2e2coC6sCWJhD+u?= =?us-ascii?q?Z2zgkl1ThWzcw8lRtb7XNFxgMygqQmUxWF6J8dVZLdCZM6TNnhvg34tJ?= =?us-ascii?q?3uxk8YND8BOa8KvJ2PyYfTm5e9JMvqMFBhhfhGS1Hmn/0qyo89Ci08iP?= =?us-ascii?q?Pt?= Received: from nasanexm03f.na.qualcomm.com ([10.85.0.47]) by Ironmsg04-L.qualcomm.com with ESMTP/TLS/AES256-SHA; 18 Sep 2017 19:50:02 -0700 Received: from aptaiexm02b.ap.qualcomm.com (10.249.150.12) by nasanexm03f.na.qualcomm.com (10.85.0.47) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Mon, 18 Sep 2017 19:50:01 -0700 Received: from yintang-HP-EliteBook-1.qca.qualcomm.com (10.80.80.8) by aptaiexm02b.ap.qualcomm.com (10.249.150.12) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Tue, 19 Sep 2017 10:49:56 +0800 From: To: Subject: [TDLS PATCH V2 1/5] mac80211: Enable TDLS peer buffer STA feature Date: Tue, 19 Sep 2017 10:51:04 +0800 Message-ID: <1505789468-25330-2-git-send-email-yintang@qti.qualcomm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1505789468-25330-1-git-send-email-yintang@qti.qualcomm.com> References: <1505789468-25330-1-git-send-email-yintang@qti.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01B.na.qualcomm.com (10.85.0.82) To aptaiexm02b.ap.qualcomm.com (10.249.150.12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170918_195033_031794_F56EE288 X-CRM114-Status: UNSURE ( 8.83 ) 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: linux-wireless@vger.kernel.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Yingying Tang Enable TDLS peer buffer STA feature. Set extended capability bit to enable buffer STA when driver support it. Signed-off-by: Yingying Tang --- include/net/cfg80211.h | 3 +++ net/mac80211/tdls.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index f12fa52..edefc25 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -3249,6 +3249,8 @@ struct cfg80211_ops { * beaconing mode (AP, IBSS, Mesh, ...). * @WIPHY_FLAG_HAS_STATIC_WEP: The device supports static WEP key installation * before connection. + * @WIPHY_FLAG_SUPPORT_TDLS_BUFFER_ST: Device support buffer STA when TDLS is + * established. */ enum wiphy_flags { /* use hole at 0 */ @@ -3275,6 +3277,7 @@ enum wiphy_flags { WIPHY_FLAG_SUPPORTS_5_10_MHZ = BIT(22), WIPHY_FLAG_HAS_CHANNEL_SWITCH = BIT(23), WIPHY_FLAG_HAS_STATIC_WEP = BIT(24), + WIPHY_FLAG_SUPPORT_TDLS_BUFFER_STA = BIT(25), }; /** diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c index 91093d4..f99e379 100644 --- a/net/mac80211/tdls.c +++ b/net/mac80211/tdls.c @@ -49,6 +49,8 @@ static void ieee80211_tdls_add_ext_capab(struct ieee80211_sub_if_data *sdata, !ifmgd->tdls_wider_bw_prohibited; struct ieee80211_supported_band *sband = ieee80211_get_sband(sdata); bool vht = sband && sband->vht_cap.vht_supported; + bool buffer_sta = + local->hw.wiphy->flags & WIPHY_FLAG_SUPPORT_TDLS_BUFFER_STA; u8 *pos = skb_put(skb, 10); *pos++ = WLAN_EID_EXT_CAPABILITY; @@ -56,7 +58,8 @@ static void ieee80211_tdls_add_ext_capab(struct ieee80211_sub_if_data *sdata, *pos++ = 0x0; *pos++ = 0x0; *pos++ = 0x0; - *pos++ = chan_switch ? WLAN_EXT_CAPA4_TDLS_CHAN_SWITCH : 0; + *pos++ = (chan_switch ? WLAN_EXT_CAPA4_TDLS_CHAN_SWITCH : 0) | + (buffer_sta ? WLAN_EXT_CAPA4_TDLS_BUFFER_STA : 0); *pos++ = WLAN_EXT_CAPA5_TDLS_ENABLED; *pos++ = 0; *pos++ = 0;