summaryrefslogtreecommitdiff
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2011-09-29 13:42:25 +0200
committerJohn W. Linville <linville@tuxdriver.com>2011-10-03 15:19:17 -0400
commit893d73f4a15bda966cb72f84897898eb235e134c (patch)
tree001d5b58d5c45f3d0c12a5de0bd0eb4290dd2819 /net/mac80211/tx.c
parenta5abbcb2206953eb1bf86281626363f2fd7a8ceb (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>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index ae5dd85f1e9..ad2ee4a90ec 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,
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
int ret = ieee80211_radiotap_iterator_init(&iterator, rthdr, skb->len,
NULL);
+ u16 txflags;
info->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
tx->flags &= ~IEEE80211_TX_FRAGMENTED;
@@ -1102,6 +1103,13 @@ static bool __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx,
tx->flags |= IEEE80211_TX_FRAGMENTED;
break;
+ case IEEE80211_RADIOTAP_TX_FLAGS:
+ txflags = le16_to_cpu(get_unaligned((__le16*)
+ iterator.this_arg));
+ if (txflags & IEEE80211_RADIOTAP_F_TX_NOACK)
+ info->flags |= IEEE80211_TX_CTL_NO_ACK;
+ break;
+
/*
* Please update the file
* Documentation/networking/mac80211-injection.txt
@@ -1266,8 +1274,11 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
tx->flags |= IEEE80211_TX_UNICAST;
if (unlikely(local->wifi_wme_noack_test))
info->flags |= IEEE80211_TX_CTL_NO_ACK;
- else
- info->flags &= ~IEEE80211_TX_CTL_NO_ACK;
+ /*
+ * Flags are initialized to 0. Hence, no need to
+ * explicitly unset IEEE80211_TX_CTL_NO_ACK since
+ * it might already be set for injected frames.
+ */
}
if (tx->flags & IEEE80211_TX_FRAGMENTED) {