summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYingying Tang <yintang@qti.qualcomm.com>2017-10-24 04:51:10 -0400
committerJohannes Berg <johannes.berg@intel.com>2017-12-11 06:16:05 -0500
commite2fb1b839208ad776c0ffbb55f17e6968389ce02 (patch)
treef5d17aea033426a9a094000ea3ca68771efa80ca
parentd559e303b17826a6e4879fc6f12d929562c4061c (diff)
mac80211: enable TDLS peer buffer STA feature
Allow drivers to set the buffer station extended capability for TDLS links, with a new hardware flag indicating this. Signed-off-by: Yingying Tang <yintang@qti.qualcomm.com> [change commit log/documentation wording] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--include/net/mac80211.h4
-rw-r--r--net/mac80211/debugfs.c1
-rw-r--r--net/mac80211/tdls.c5
3 files changed, 9 insertions, 1 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index eec143cca1c0..2ee4af25256d 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -2056,6 +2056,9 @@ struct ieee80211_txq {
2056 * The stack will not do fragmentation. 2056 * The stack will not do fragmentation.
2057 * The callback for @set_frag_threshold should be set as well. 2057 * The callback for @set_frag_threshold should be set as well.
2058 * 2058 *
2059 * @IEEE80211_HW_SUPPORTS_TDLS_BUFFER_STA: Hardware supports buffer STA on
2060 * TDLS links.
2061 *
2059 * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays 2062 * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays
2060 */ 2063 */
2061enum ieee80211_hw_flags { 2064enum ieee80211_hw_flags {
@@ -2098,6 +2101,7 @@ enum ieee80211_hw_flags {
2098 IEEE80211_HW_TX_FRAG_LIST, 2101 IEEE80211_HW_TX_FRAG_LIST,
2099 IEEE80211_HW_REPORTS_LOW_ACK, 2102 IEEE80211_HW_REPORTS_LOW_ACK,
2100 IEEE80211_HW_SUPPORTS_TX_FRAG, 2103 IEEE80211_HW_SUPPORTS_TX_FRAG,
2104 IEEE80211_HW_SUPPORTS_TDLS_BUFFER_STA,
2101 2105
2102 /* keep last, obviously */ 2106 /* keep last, obviously */
2103 NUM_IEEE80211_HW_FLAGS 2107 NUM_IEEE80211_HW_FLAGS
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index 5fae001f286c..1f466d12a6bc 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -211,6 +211,7 @@ static const char *hw_flag_names[] = {
211 FLAG(TX_FRAG_LIST), 211 FLAG(TX_FRAG_LIST),
212 FLAG(REPORTS_LOW_ACK), 212 FLAG(REPORTS_LOW_ACK),
213 FLAG(SUPPORTS_TX_FRAG), 213 FLAG(SUPPORTS_TX_FRAG),
214 FLAG(SUPPORTS_TDLS_BUFFER_STA),
214#undef FLAG 215#undef FLAG
215}; 216};
216 217
diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c
index 96d4fb998e33..5cd5e6e5834e 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,
47 NL80211_FEATURE_TDLS_CHANNEL_SWITCH; 47 NL80211_FEATURE_TDLS_CHANNEL_SWITCH;
48 bool wider_band = ieee80211_hw_check(&local->hw, TDLS_WIDER_BW) && 48 bool wider_band = ieee80211_hw_check(&local->hw, TDLS_WIDER_BW) &&
49 !ifmgd->tdls_wider_bw_prohibited; 49 !ifmgd->tdls_wider_bw_prohibited;
50 bool buffer_sta = ieee80211_hw_check(&local->hw,
51 SUPPORTS_TDLS_BUFFER_STA);
50 struct ieee80211_supported_band *sband = ieee80211_get_sband(sdata); 52 struct ieee80211_supported_band *sband = ieee80211_get_sband(sdata);
51 bool vht = sband && sband->vht_cap.vht_supported; 53 bool vht = sband && sband->vht_cap.vht_supported;
52 u8 *pos = skb_put(skb, 10); 54 u8 *pos = skb_put(skb, 10);
@@ -56,7 +58,8 @@ static void ieee80211_tdls_add_ext_capab(struct ieee80211_sub_if_data *sdata,
56 *pos++ = 0x0; 58 *pos++ = 0x0;
57 *pos++ = 0x0; 59 *pos++ = 0x0;
58 *pos++ = 0x0; 60 *pos++ = 0x0;
59 *pos++ = chan_switch ? WLAN_EXT_CAPA4_TDLS_CHAN_SWITCH : 0; 61 *pos++ = (chan_switch ? WLAN_EXT_CAPA4_TDLS_CHAN_SWITCH : 0) |
62 (buffer_sta ? WLAN_EXT_CAPA4_TDLS_BUFFER_STA : 0);
60 *pos++ = WLAN_EXT_CAPA5_TDLS_ENABLED; 63 *pos++ = WLAN_EXT_CAPA5_TDLS_ENABLED;
61 *pos++ = 0; 64 *pos++ = 0;
62 *pos++ = 0; 65 *pos++ = 0;