From patchwork Tue Oct 24 08:51:10 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: 10023747 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 D663A604D7 for ; Tue, 24 Oct 2017 08:50:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C46B8289A6 for ; Tue, 24 Oct 2017 08:50:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B93C9289B0; Tue, 24 Oct 2017 08:50:33 +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 BCAD8289B6 for ; Tue, 24 Oct 2017 08:50:32 +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=VoURovjM1OrjMFdiIQEpSDZmw/CcBrk7egIduAOWdKY=; b=lQLB7FtzW1Cqs+ aZsI+7Oimc7HGB3aBdnaiD9x5BycRwMulXURwQXyXVOiFzstovDP4/qaPx2fOlcgrnk6a5ziKtkaI XZ8FFrNTMlWcE9hgbPTEFH9tCjrL3UUF/XJEnUDS7uPR1m9S0s39gbHKETaFWm7KBgVoYKoodQi6T UtoWvxdctbzJ7e7Ig9t4UWihi83x9WRzuGrWHEFZp6Rxn1+g2akAxShdXz0p39UYmH3Uv3Pi3z07A z19ZLxqjmA99qdxA2PS00Hq4C3yRn+De0ZX/RBmJgBo6BTJ2GnVjv1A8bQ4TK6Ij2tUbq+W+hqDpV m0gR8vIl/9azxVktx58Q==; 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 1e6uuo-0003iV-4T; Tue, 24 Oct 2017 08:50:26 +0000 Received: from sabertooth01.qualcomm.com ([65.197.215.72]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e6utu-0001SU-0k for ath10k@lists.infradead.org; Tue, 24 Oct 2017 08:49:32 +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=1508834969; x=1540370969; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=isQtmfY4Vv0/MkKWrWxf9BBrIQnQkjeU/9ZNqddtrHs=; b=a75psGE0TobKdp0p3I4j39oxWQXfJrzHmOAogsVoaEOvlsAEw+LuaQBp 0IaqlTwV+JMdc8W1Yr4WA03+SDhwM7HnWkOB2jrxQNuwcVwH1rm/7diVW 5JvRw+BRTne4YV2mu7sytyxHVLIh/SJ1/3nnVMkfOBetpSB9hQYnKnO8s k=; X-IronPort-AV: E=Sophos;i="5.43,427,1503385200"; d="scan'208";a="116092127" Received: from unknown (HELO ironmsg02-L.qualcomm.com) ([10.53.140.109]) by sabertooth01.qualcomm.com with ESMTP; 24 Oct 2017 01:49:07 -0700 X-IronPort-AV: E=McAfee;i="5900,7806,8693"; a="1022784616" X-MGA-submission: =?us-ascii?q?MDGk29T/YNPMa4nBlXuiNzwr9ks7jkCfcyIQKh?= =?us-ascii?q?qJxs38MMVDopKEkmzqA3nQyiW8CYFmziDwjCFRiqAXG3+EZgXHYKAHvI?= =?us-ascii?q?JQzi9+vOsyxNhj5GyOaxpdqVO4+EwXi0+seJQw4Xqke3BPSm52+ALdfI?= =?us-ascii?q?t5?= Received: from nasanexm01g.na.qualcomm.com ([10.85.0.33]) by ironmsg02-L.qualcomm.com with ESMTP/TLS/AES256-SHA; 24 Oct 2017 01:49:07 -0700 Received: from aptaiexm02b.ap.qualcomm.com (10.249.150.12) by NASANEXM01G.na.qualcomm.com (10.85.0.33) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Tue, 24 Oct 2017 01:49:06 -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, 24 Oct 2017 16:49:02 +0800 From: To: Subject: [PATCH v7 1/5] mac80211: Enable TDLS peer buffer STA feature Date: Tue, 24 Oct 2017 16:51:10 +0800 Message-ID: <1508835074-3384-2-git-send-email-yintang@qti.qualcomm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1508835074-3384-1-git-send-email-yintang@qti.qualcomm.com> References: <1508835074-3384-1-git-send-email-yintang@qti.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01C.na.qualcomm.com (10.85.0.83) 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-20171024_014930_247014_2B71C442 X-CRM114-Status: UNSURE ( 9.50 ) 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/debugfs.c | 1 + net/mac80211/tdls.c | 5 ++++- 3 files changed, 9 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/debugfs.c b/net/mac80211/debugfs.c index 5fae001..1f466d1 100644 --- a/net/mac80211/debugfs.c +++ b/net/mac80211/debugfs.c @@ -211,6 +211,7 @@ static ssize_t reset_write(struct file *file, const char __user *user_buf, FLAG(TX_FRAG_LIST), FLAG(REPORTS_LOW_ACK), FLAG(SUPPORTS_TX_FRAG), + FLAG(SUPPORTS_TDLS_BUFFER_STA), #undef FLAG }; 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;