All of lore.kernel.org
 help / color / mirror / Atom feed
From: <yintang@qti.qualcomm.com>
To: <ath10k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>
Subject: [TDLS PATCH V3 1/5] mac80211: Enable TDLS peer buffer STA feature
Date: Tue, 19 Sep 2017 11:15:09 +0800	[thread overview]
Message-ID: <1505790913-28377-2-git-send-email-yintang@qti.qualcomm.com> (raw)
In-Reply-To: <1505790913-28377-1-git-send-email-yintang@qti.qualcomm.com>

From: Yingying Tang <yintang@qti.qualcomm.com>

Enable TDLS peer buffer STA feature.
Set extended capability bit to enable buffer STA when driver
support it.

Signed-off-by: Yingying Tang <yintang@qti.qualcomm.com>
---
 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_STA: 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;
-- 
1.7.9.5

WARNING: multiple messages have this Message-ID (diff)
From: <yintang@qti.qualcomm.com>
To: ath10k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org
Subject: [TDLS PATCH V3 1/5] mac80211: Enable TDLS peer buffer STA feature
Date: Tue, 19 Sep 2017 11:15:09 +0800	[thread overview]
Message-ID: <1505790913-28377-2-git-send-email-yintang@qti.qualcomm.com> (raw)
In-Reply-To: <1505790913-28377-1-git-send-email-yintang@qti.qualcomm.com>

From: Yingying Tang <yintang@qti.qualcomm.com>

Enable TDLS peer buffer STA feature.
Set extended capability bit to enable buffer STA when driver
support it.

Signed-off-by: Yingying Tang <yintang@qti.qualcomm.com>
---
 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_STA: 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;
-- 
1.7.9.5


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  reply	other threads:[~2017-09-19  3:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <TDLS for ath10k patchset v3>
2017-09-19  3:15 ` [TDLS PATCH V3 0/5] Add TDLS feature for ath10k yintang
2017-09-19  3:15   ` yintang
2017-09-19  3:15   ` yintang [this message]
2017-09-19  3:15     ` [TDLS PATCH V3 1/5] mac80211: Enable TDLS peer buffer STA feature yintang
2017-09-19  7:56     ` Arend van Spriel
2017-09-19  7:56       ` Arend van Spriel
2017-09-19  8:15       ` Johannes Berg
2017-09-19  8:15         ` Johannes Berg
2017-09-19  9:55         ` Arend van Spriel
2017-09-19  9:55           ` Arend van Spriel
2017-09-19  3:15   ` [TDLS PATCH V3 2/5] ath10k: " yintang
2017-09-19  3:15     ` yintang
2017-09-19  3:15   ` [TDLS PATCH V3 3/5] ath10k: Enable TDLS peer inactivity detection yintang
2017-09-19  3:15     ` yintang
2017-09-19  3:15   ` [TDLS PATCH V3 4/5] ath10k: Avoid to set WEP key for TDLS peer yintang
2017-09-19  3:15     ` yintang
2017-09-19  3:17 ` [TDLS PATCH V3 5/5] " yintang
2017-09-19  3:17   ` yintang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1505790913-28377-2-git-send-email-yintang@qti.qualcomm.com \
    --to=yintang@qti.qualcomm.com \
    --cc=ath10k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.