aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/mac80211.h3
-rw-r--r--net/mac80211/tx.c6
2 files changed, 7 insertions, 2 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 1e9c93024cf2..74ccf30fdf8e 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -275,6 +275,8 @@ struct ieee80211_bss_conf {
275 * @IEEE80211_TX_INTFL_RETRANSMISSION: This frame is being retransmitted 275 * @IEEE80211_TX_INTFL_RETRANSMISSION: This frame is being retransmitted
276 * after TX status because the destination was asleep, it must not 276 * after TX status because the destination was asleep, it must not
277 * be modified again (no seqno assignment, crypto, etc.) 277 * be modified again (no seqno assignment, crypto, etc.)
278 * @IEEE80211_TX_INTFL_HAS_RADIOTAP: This frame was injected and still
279 * has a radiotap header at skb->data.
278 */ 280 */
279enum mac80211_tx_control_flags { 281enum mac80211_tx_control_flags {
280 IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), 282 IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0),
@@ -296,6 +298,7 @@ enum mac80211_tx_control_flags {
296 IEEE80211_TX_CTL_PSPOLL_RESPONSE = BIT(17), 298 IEEE80211_TX_CTL_PSPOLL_RESPONSE = BIT(17),
297 IEEE80211_TX_CTL_MORE_FRAMES = BIT(18), 299 IEEE80211_TX_CTL_MORE_FRAMES = BIT(18),
298 IEEE80211_TX_INTFL_RETRANSMISSION = BIT(19), 300 IEEE80211_TX_INTFL_RETRANSMISSION = BIT(19),
301 IEEE80211_TX_INTFL_HAS_RADIOTAP = BIT(20),
299}; 302};
300 303
301/** 304/**
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 14c70452c245..e7b1cdc7651b 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1108,7 +1108,7 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
1108 tx->flags |= IEEE80211_TX_FRAGMENTED; 1108 tx->flags |= IEEE80211_TX_FRAGMENTED;
1109 1109
1110 /* process and remove the injection radiotap header */ 1110 /* process and remove the injection radiotap header */
1111 if (unlikely(info->flags & IEEE80211_TX_CTL_INJECTED)) { 1111 if (unlikely(info->flags & IEEE80211_TX_INTFL_HAS_RADIOTAP)) {
1112 if (!__ieee80211_parse_tx_radiotap(tx, skb)) 1112 if (!__ieee80211_parse_tx_radiotap(tx, skb))
1113 return TX_DROP; 1113 return TX_DROP;
1114 1114
@@ -1117,6 +1117,7 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
1117 * the radiotap header that was present and pre-filled 1117 * the radiotap header that was present and pre-filled
1118 * 'tx' with tx control information. 1118 * 'tx' with tx control information.
1119 */ 1119 */
1120 info->flags &= ~IEEE80211_TX_INTFL_HAS_RADIOTAP;
1120 } 1121 }
1121 1122
1122 /* 1123 /*
@@ -1499,7 +1500,8 @@ static void ieee80211_xmit(struct ieee80211_sub_if_data *sdata,
1499 int hdrlen; 1500 int hdrlen;
1500 u16 len_rthdr; 1501 u16 len_rthdr;
1501 1502
1502 info->flags |= IEEE80211_TX_CTL_INJECTED; 1503 info->flags |= IEEE80211_TX_CTL_INJECTED |
1504 IEEE80211_TX_INTFL_HAS_RADIOTAP;
1503 1505
1504 len_rthdr = ieee80211_get_radiotap_len(skb->data); 1506 len_rthdr = ieee80211_get_radiotap_len(skb->data);
1505 hdr = (struct ieee80211_hdr *)(skb->data + len_rthdr); 1507 hdr = (struct ieee80211_hdr *)(skb->data + len_rthdr);