From patchwork Mon Oct 16 06:00:29 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: 10007703 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 F0DDC60567 for ; Mon, 16 Oct 2017 05:59:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E245427CAF for ; Mon, 16 Oct 2017 05:59:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D6F1A27D4A; Mon, 16 Oct 2017 05:59:15 +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=unavailable 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 8B08527D4D for ; Mon, 16 Oct 2017 05:59:15 +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=fpuKYF2azbbske2oZaOogaEtNE7D1AZ/4XKYciC577c=; b=kSaZzyizuUTnxj 5iGcjebe/sdHWP3wOzFrkV/r/X8sl99ERoowb2oHFksV+v64tM+7KzLOVcTwehYuLEVHM2xCJ/E8W d4GpIpWtCMn4ZvGPOk3qwZyYOyEK5T2HT1pwQij7FWll4a4JaACua57MfM0G0AWvB3WWFPXUBsvlk FF19aNPN/ngr+hiOymeUcFRyk8R0FTWn9AqOWkrMqTaqveFei/eI6keYPXqUoKkas6RfeCrQcFPLO mgXr9WjPEU9hD76uwPQ7eRICGGoIL26obwGYzaEBhfk2YLm0msjvZoRNtylDV12ayd3xUp0phUVOL WmIO9WYaMtMB5x+XJsVg==; 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 1e3yQW-0006r4-PA; Mon, 16 Oct 2017 05:59:00 +0000 Received: from sabertooth01.qualcomm.com ([65.197.215.72]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e3yQS-0006n8-Qf for ath10k@lists.infradead.org; Mon, 16 Oct 2017 05:58:58 +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=1508133536; x=1539669536; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=PqdDtA5lM63102zazwUsD03pAL9MdLBrRCNrpKuOQWI=; b=fmpsHvIAVos6tIkGQWULNBeuhS7xs3MjhyiUlwe8tW4uiyYnWmnpIkRn cJ8w9fJ7C7XYciC4Oks1rda46xpg+YGNu4LoWGM+V0fcwapXSVfYWXqss iwOFxV99aM/I/E4GVILGLkWuK0N0IhQjqGU2ku0JtMmIaHgsZwNBPwbvz 0=; X-IronPort-AV: E=Sophos;i="5.43,385,1503385200"; d="scan'208";a="115844029" Received: from unknown (HELO Ironmsg03-L.qualcomm.com) ([10.53.140.110]) by sabertooth01.qualcomm.com with ESMTP; 15 Oct 2017 22:58:34 -0700 X-IronPort-AV: E=McAfee;i="5900,7806,8685"; a="1466686196" X-MGA-submission: =?us-ascii?q?MDG8VYD+DCR3uc/ranmc54qv/7kKMK7TkKY/3r?= =?us-ascii?q?x68XbHtO8zKKeSohZqj2vK57KYe3uzPO3Hzeza3p2O9Alld1dcRNPVqy?= =?us-ascii?q?70o/nFuS8DgLlrg9DT/R34yZYzY8lBQYqsWg8mohTzF6HpKI6a+2EOn7?= =?us-ascii?q?R6?= Received: from nasanexm03g.na.qualcomm.com ([10.85.0.49]) by Ironmsg03-L.qualcomm.com with ESMTP/TLS/AES256-SHA; 15 Oct 2017 22:58:34 -0700 Received: from aptaiexm02b.ap.qualcomm.com (10.249.150.12) by nasanexm03g.na.qualcomm.com (10.85.0.49) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Sun, 15 Oct 2017 22:58:33 -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; Mon, 16 Oct 2017 13:58:29 +0800 From: To: Subject: [PATCH V6 1/5] mac80211: Enable TDLS peer buffer STA feature Date: Mon, 16 Oct 2017 14:00:29 +0800 Message-ID: <1508133633-23214-2-git-send-email-yintang@qti.qualcomm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1508133633-23214-1-git-send-email-yintang@qti.qualcomm.com> References: <1508133633-23214-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-20171015_225857_090808_F6704624 X-CRM114-Status: UNSURE ( 8.37 ) 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/mac80211.h | 4 ++++ net/mac80211/tdls.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index f8149ca..5928123 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -2067,6 +2067,9 @@ struct ieee80211_txq { * The stack will not do fragmentation. * The callback for @set_frag_threshold should be set as well. * + * @IEEE80211_HW_SUPPORTS_TDLS_BUFFER_STA: Hardware support buffer STA when + * TDLS is established. + * * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays */ enum ieee80211_hw_flags { @@ -2109,6 +2112,7 @@ enum ieee80211_hw_flags { IEEE80211_HW_TX_FRAG_LIST, IEEE80211_HW_REPORTS_LOW_ACK, IEEE80211_HW_SUPPORTS_TX_FRAG, + IEEE80211_HW_SUPPORTS_TDLS_BUFFER_STA, /* keep last, obviously */ NUM_IEEE80211_HW_FLAGS diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c index 91093d4..8231466 100644 --- a/net/mac80211/tdls.c +++ b/net/mac80211/tdls.c @@ -47,6 +47,8 @@ static void ieee80211_tdls_add_ext_capab(struct ieee80211_sub_if_data *sdata, NL80211_FEATURE_TDLS_CHANNEL_SWITCH; bool wider_band = ieee80211_hw_check(&local->hw, TDLS_WIDER_BW) && !ifmgd->tdls_wider_bw_prohibited; + bool buffer_sta = ieee80211_hw_check(&local->hw, + SUPPORTS_TDLS_BUFFER_STA); struct ieee80211_supported_band *sband = ieee80211_get_sband(sdata); bool vht = sband && sband->vht_cap.vht_supported; u8 *pos = skb_put(skb, 10); @@ -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;