diff options
author | Helmut Schaa <helmut.schaa@googlemail.com> | 2011-09-29 07:42:25 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-10-03 15:19:17 -0400 |
commit | 893d73f4a15bda966cb72f84897898eb235e134c (patch) | |
tree | 001d5b58d5c45f3d0c12a5de0bd0eb4290dd2819 | |
parent | a5abbcb2206953eb1bf86281626363f2fd7a8ceb (diff) |
mac80211: Allow noack flag overwrite for injected frames
Allow injected unicast frames to be sent without having to wait
for an ACK.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | include/net/ieee80211_radiotap.h | 1 | ||||
-rw-r--r-- | net/mac80211/tx.c | 15 |
2 files changed, 14 insertions, 2 deletions
diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h index b0be5fb9de19..7e2c4d483ad0 100644 --- a/include/net/ieee80211_radiotap.h +++ b/include/net/ieee80211_radiotap.h | |||
@@ -251,6 +251,7 @@ enum ieee80211_radiotap_type { | |||
251 | * retries */ | 251 | * retries */ |
252 | #define IEEE80211_RADIOTAP_F_TX_CTS 0x0002 /* used cts 'protection' */ | 252 | #define IEEE80211_RADIOTAP_F_TX_CTS 0x0002 /* used cts 'protection' */ |
253 | #define IEEE80211_RADIOTAP_F_TX_RTS 0x0004 /* used rts/cts handshake */ | 253 | #define IEEE80211_RADIOTAP_F_TX_RTS 0x0004 /* used rts/cts handshake */ |
254 | #define IEEE80211_RADIOTAP_F_TX_NOACK 0x0008 /* don't expect an ack */ | ||
254 | 255 | ||
255 | 256 | ||
256 | /* For IEEE80211_RADIOTAP_MCS */ | 257 | /* For IEEE80211_RADIOTAP_MCS */ |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index ae5dd85f1e93..ad2ee4a90ec4 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1054,6 +1054,7 @@ static bool __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx, | |||
1054 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | 1054 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); |
1055 | int ret = ieee80211_radiotap_iterator_init(&iterator, rthdr, skb->len, | 1055 | int ret = ieee80211_radiotap_iterator_init(&iterator, rthdr, skb->len, |
1056 | NULL); | 1056 | NULL); |
1057 | u16 txflags; | ||
1057 | 1058 | ||
1058 | info->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT; | 1059 | info->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT; |
1059 | tx->flags &= ~IEEE80211_TX_FRAGMENTED; | 1060 | tx->flags &= ~IEEE80211_TX_FRAGMENTED; |
@@ -1102,6 +1103,13 @@ static bool __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx, | |||
1102 | tx->flags |= IEEE80211_TX_FRAGMENTED; | 1103 | tx->flags |= IEEE80211_TX_FRAGMENTED; |
1103 | break; | 1104 | break; |
1104 | 1105 | ||
1106 | case IEEE80211_RADIOTAP_TX_FLAGS: | ||
1107 | txflags = le16_to_cpu(get_unaligned((__le16*) | ||
1108 | iterator.this_arg)); | ||
1109 | if (txflags & IEEE80211_RADIOTAP_F_TX_NOACK) | ||
1110 | info->flags |= IEEE80211_TX_CTL_NO_ACK; | ||
1111 | break; | ||
1112 | |||
1105 | /* | 1113 | /* |
1106 | * Please update the file | 1114 | * Please update the file |
1107 | * Documentation/networking/mac80211-injection.txt | 1115 | * Documentation/networking/mac80211-injection.txt |
@@ -1266,8 +1274,11 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata, | |||
1266 | tx->flags |= IEEE80211_TX_UNICAST; | 1274 | tx->flags |= IEEE80211_TX_UNICAST; |
1267 | if (unlikely(local->wifi_wme_noack_test)) | 1275 | if (unlikely(local->wifi_wme_noack_test)) |
1268 | info->flags |= IEEE80211_TX_CTL_NO_ACK; | 1276 | info->flags |= IEEE80211_TX_CTL_NO_ACK; |
1269 | else | 1277 | /* |
1270 | info->flags &= ~IEEE80211_TX_CTL_NO_ACK; | 1278 | * Flags are initialized to 0. Hence, no need to |
1279 | * explicitly unset IEEE80211_TX_CTL_NO_ACK since | ||
1280 | * it might already be set for injected frames. | ||
1281 | */ | ||
1271 | } | 1282 | } |
1272 | 1283 | ||
1273 | if (tx->flags & IEEE80211_TX_FRAGMENTED) { | 1284 | if (tx->flags & IEEE80211_TX_FRAGMENTED) { |