From patchwork Tue Oct 10 08:11:16 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: 9995269 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 62F6560230 for ; Tue, 10 Oct 2017 08:10:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5421D28113 for ; Tue, 10 Oct 2017 08:10:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 490EF28174; Tue, 10 Oct 2017 08:10:03 +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 024F828113 for ; Tue, 10 Oct 2017 08:10:03 +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=KaHt7gWWtNDYxw XPiFCQT0rgV3ElvP3ARfQn9ZYNusTS0wSTbLJSWBGKt1ikHhaJrv/k4uMI0p/hZ8GEOtueTQh4G1V Z56diML5lcCDuQvU6JY+SZ+YiQXJiSqN4gs0PFtL9cP7vBF23rTSbseDokagoUZeSRufbJz/GoOq0 PCs1IOkCpeksHhOVmZMPHOopS6pYzgZiZP+rnYlWkrEr7xufOnDKXm/ggmfXSnPAxB45vDCSkuVNm AgWNuGMGB7HpnWpWo9FEdCdTqQtB1hI4iIiUIEOOcLNoKbyoFS02OCWyWRP+hOlAbOQhFChrpuekz Q2uu2tLJZtcps/smqqEg==; 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 1e1pbx-0003p4-Ih; Tue, 10 Oct 2017 08:09:57 +0000 Received: from alexa-out.qualcomm.com ([129.46.98.28]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e1pbq-0003YY-5f for ath10k@lists.infradead.org; Tue, 10 Oct 2017 08:09:53 +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=1507622990; x=1539158990; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=Lg6LZFzIpBerXtS5JIypLgl7eHCaC4GT9RXcOeMf0pQ=; b=Io1JWO5heNpVsJy20IQLHZwuRdnpkw6R/W/5GQ+zyBFBIf9Yk3rUO65F g6N7iTw3tgHImoduLyRRCagYPjf4VcIU5G4Wlz8+ErfxCLBKMbQitTFhA mqrohHW8nfK5MlGIZdOoN69J5fDJ8Prs7beWc4nnuTuP8w2wOLlNfSm8E M=; X-IronPort-AV: E=Sophos;i="5.42,503,1500966000"; d="scan'208";a="6179668" Received: from ironmsg04-l-new.qualcomm.com (HELO Ironmsg04-L.qualcomm.com) ([10.53.140.111]) by alexa-out.qualcomm.com with ESMTP; 10 Oct 2017 01:09:33 -0700 X-IronPort-AV: E=McAfee;i="5900,7806,8679"; a="1439814785" X-MGA-submission: =?us-ascii?q?MDEvbVdy9lCQqFzbdpAYFn6kb5C8eJLT90NtpZ?= =?us-ascii?q?CaaWSOe5ZJQAJ3YuHQoe+OK0V+h7fGFRYSVEeNPYC1xuYkCUre66go28?= =?us-ascii?q?tFJTmnayOfEk5DM61RE9lm4PFbhVxjoGpWZ1iWGPAFEGqHcidHP2c4em?= =?us-ascii?q?6w?= Received: from nasanexm03f.na.qualcomm.com ([10.85.0.47]) by Ironmsg04-L.qualcomm.com with ESMTP/TLS/AES256-SHA; 10 Oct 2017 01:09:32 -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; Tue, 10 Oct 2017 01:09:31 -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, 10 Oct 2017 16:09:27 +0800 From: To: Subject: [PATCH V5 1/5] mac80211: Enable TDLS peer buffer STA feature Date: Tue, 10 Oct 2017 16:11:16 +0800 Message-ID: <1507623080-9311-2-git-send-email-yintang@qti.qualcomm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1507623080-9311-1-git-send-email-yintang@qti.qualcomm.com> References: <1507623080-9311-1-git-send-email-yintang@qti.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01E.na.qualcomm.com (10.85.0.31) 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-20171010_010950_350424_A880FCE6 X-CRM114-Status: UNSURE ( 8.85 ) 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;