aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2011-08-30 02:32:38 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-09-13 15:45:03 -0400
commitedf6b784c0e574696915e7b04fe42158f3112d0d (patch)
treed423c979f0c87ba04891349c08d95573b43f90aa
parent24616152b1d184864370c5ea21f8fdbd5a90d58d (diff)
mac80211: add flag to indicate HW only Tx-agg setup support
When this flag is set, Tx A-MPDU sessions will not be started by mac80211. This flag is required for devices that support Tx A-MPDU setup in hardware. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--include/net/mac80211.h5
-rw-r--r--net/mac80211/agg-tx.c3
-rw-r--r--net/mac80211/debugfs.c2
-rw-r--r--net/mac80211/tx.c3
4 files changed, 11 insertions, 2 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 2e752df57510..5e5029b22ac7 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1096,6 +1096,10 @@ enum sta_notify_cmd {
1096 * stations based on the PM bit of incoming frames. 1096 * stations based on the PM bit of incoming frames.
1097 * Use ieee80211_start_ps()/ieee8021_end_ps() to manually configure 1097 * Use ieee80211_start_ps()/ieee8021_end_ps() to manually configure
1098 * the PS mode of connected stations. 1098 * the PS mode of connected stations.
1099 *
1100 * @IEEE80211_HW_TX_AMPDU_SETUP_IN_HW: The device handles TX A-MPDU session
1101 * setup strictly in HW. mac80211 should not attempt to do this in
1102 * software.
1099 */ 1103 */
1100enum ieee80211_hw_flags { 1104enum ieee80211_hw_flags {
1101 IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, 1105 IEEE80211_HW_HAS_RATE_CONTROL = 1<<0,
@@ -1121,6 +1125,7 @@ enum ieee80211_hw_flags {
1121 IEEE80211_HW_SUPPORTS_CQM_RSSI = 1<<20, 1125 IEEE80211_HW_SUPPORTS_CQM_RSSI = 1<<20,
1122 IEEE80211_HW_SUPPORTS_PER_STA_GTK = 1<<21, 1126 IEEE80211_HW_SUPPORTS_PER_STA_GTK = 1<<21,
1123 IEEE80211_HW_AP_LINK_PS = 1<<22, 1127 IEEE80211_HW_AP_LINK_PS = 1<<22,
1128 IEEE80211_HW_TX_AMPDU_SETUP_IN_HW = 1<<23,
1124}; 1129};
1125 1130
1126/** 1131/**
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index f10e1096c332..250b9a53f6d9 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -360,7 +360,8 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid,
360 return -EINVAL; 360 return -EINVAL;
361 361
362 if ((tid >= STA_TID_NUM) || 362 if ((tid >= STA_TID_NUM) ||
363 !(local->hw.flags & IEEE80211_HW_AMPDU_AGGREGATION)) 363 !(local->hw.flags & IEEE80211_HW_AMPDU_AGGREGATION) ||
364 (local->hw.flags & IEEE80211_HW_TX_AMPDU_SETUP_IN_HW))
364 return -EINVAL; 365 return -EINVAL;
365 366
366#ifdef CONFIG_MAC80211_HT_DEBUG 367#ifdef CONFIG_MAC80211_HT_DEBUG
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index 569609b94c8c..c9141168fd43 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -350,6 +350,8 @@ static ssize_t hwflags_read(struct file *file, char __user *user_buf,
350 sf += snprintf(buf + sf, mxln - sf, "SUPPORTS_PER_STA_GTK\n"); 350 sf += snprintf(buf + sf, mxln - sf, "SUPPORTS_PER_STA_GTK\n");
351 if (local->hw.flags & IEEE80211_HW_AP_LINK_PS) 351 if (local->hw.flags & IEEE80211_HW_AP_LINK_PS)
352 sf += snprintf(buf + sf, mxln - sf, "AP_LINK_PS\n"); 352 sf += snprintf(buf + sf, mxln - sf, "AP_LINK_PS\n");
353 if (local->hw.flags & IEEE80211_HW_TX_AMPDU_SETUP_IN_HW)
354 sf += snprintf(buf + sf, mxln - sf, "TX_AMPDU_SETUP_IN_HW\n");
353 355
354 rv = simple_read_from_buffer(user_buf, count, ppos, buf, strlen(buf)); 356 rv = simple_read_from_buffer(user_buf, count, ppos, buf, strlen(buf));
355 kfree(buf); 357 kfree(buf);
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index c9766ccb51a4..2521716aa97b 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1232,7 +1232,8 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
1232 tx->sta = sta_info_get(sdata, hdr->addr1); 1232 tx->sta = sta_info_get(sdata, hdr->addr1);
1233 1233
1234 if (tx->sta && ieee80211_is_data_qos(hdr->frame_control) && 1234 if (tx->sta && ieee80211_is_data_qos(hdr->frame_control) &&
1235 (local->hw.flags & IEEE80211_HW_AMPDU_AGGREGATION)) { 1235 (local->hw.flags & IEEE80211_HW_AMPDU_AGGREGATION) &&
1236 !(local->hw.flags & IEEE80211_HW_TX_AMPDU_SETUP_IN_HW)) {
1236 struct tid_ampdu_tx *tid_tx; 1237 struct tid_ampdu_tx *tid_tx;
1237 1238
1238 qc = ieee80211_get_qos_ctl(hdr); 1239 qc = ieee80211_get_qos_ctl(hdr);