nexmon – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h
|
2 | index d364fd5..4e28c0c 100644
|
||
3 | --- a/include/net/ieee80211_radiotap.h
|
||
4 | +++ b/include/net/ieee80211_radiotap.h
|
||
5 | @@ -247,6 +247,9 @@ enum ieee80211_radiotap_type {
|
||
6 | * retries */ |
||
7 | #define IEEE80211_RADIOTAP_F_TX_CTS 0x0002 /* used cts 'protection' */ |
||
8 | #define IEEE80211_RADIOTAP_F_TX_RTS 0x0004 /* used rts/cts handshake */ |
||
9 | +#define IEEE80211_RADIOTAP_F_TX_NOACK 0x0008 /* frame should not be ACKed */
|
||
10 | +#define IEEE80211_RADIOTAP_F_TX_NOSEQ 0x0010 /* sequence number handled
|
||
11 | + * by userspace */
|
||
12 | |||
13 | /* Ugly macro to convert literal channel numbers into their mhz equivalents |
||
14 | * There are certianly some conditions that will break this (like feeding it '30') |
||
15 | diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
|
||
16 | index 22702e7..b397aed 100644
|
||
17 | --- a/net/mac80211/tx.c
|
||
18 | +++ b/net/mac80211/tx.c
|
||
19 | @@ -609,6 +609,10 @@ ieee80211_tx_h_sequence(struct ieee80211_tx_data *tx)
|
||
20 | u8 *qc; |
||
21 | int tid; |
||
22 | |||
23 | + if (unlikely(!(info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ)))
|
||
24 | + return TX_CONTINUE;
|
||
25 | + info->flags &= ~IEEE80211_TX_CTL_ASSIGN_SEQ;
|
||
26 | +
|
||
27 | /* |
||
28 | * Packet injection may want to control the sequence |
||
29 | * number, if we have no matching interface then we |
||
30 | @@ -867,6 +871,7 @@ __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx,
|
||
31 | struct ieee80211_radiotap_header *rthdr = |
||
32 | (struct ieee80211_radiotap_header *) skb->data; |
||
33 | struct ieee80211_supported_band *sband; |
||
34 | + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
|
||
35 | int ret = ieee80211_radiotap_iterator_init(&iterator, rthdr, skb->len); |
||
36 | |||
37 | sband = tx->local->hw.wiphy->bands[tx->channel->band]; |
||
38 | @@ -913,6 +918,12 @@ __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx,
|
||
39 | if (*iterator.this_arg & IEEE80211_RADIOTAP_F_FRAG) |
||
40 | tx->flags |= IEEE80211_TX_FRAGMENTED; |
||
41 | break; |
||
42 | + case IEEE80211_RADIOTAP_TX_FLAGS:
|
||
43 | + if (*iterator.this_arg & IEEE80211_RADIOTAP_F_TX_NOACK)
|
||
44 | + info->flags |= IEEE80211_TX_CTL_NO_ACK;
|
||
45 | + if (*iterator.this_arg & IEEE80211_RADIOTAP_F_TX_NOSEQ)
|
||
46 | + info->flags &= ~IEEE80211_TX_CTL_ASSIGN_SEQ;
|
||
47 | + break;
|
||
48 | |||
49 | /* |
||
50 | * Please update the file |
||
51 | @@ -965,6 +976,8 @@ __ieee80211_tx_prepare(struct ieee80211_tx_data *tx,
|
||
52 | * it will be cleared/left by radiotap as desired. |
||
53 | */ |
||
54 | tx->flags |= IEEE80211_TX_FRAGMENTED; |
||
55 | + /* Same here, controlled by radiotap and the stack */
|
||
56 | + info->flags |= IEEE80211_TX_CTL_ASSIGN_SEQ;
|
||
57 | |||
58 | /* process and remove the injection radiotap header */ |
||
59 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
||
60 | @@ -992,13 +1005,10 @@ __ieee80211_tx_prepare(struct ieee80211_tx_data *tx,
|
||
61 | info->flags |= IEEE80211_TX_CTL_AMPDU; |
||
62 | } |
||
63 | |||
64 | - if (is_multicast_ether_addr(hdr->addr1)) {
|
||
65 | - tx->flags &= ~IEEE80211_TX_UNICAST;
|
||
66 | + if (is_multicast_ether_addr(hdr->addr1))
|
||
67 | info->flags |= IEEE80211_TX_CTL_NO_ACK; |
||
68 | - } else {
|
||
69 | + else
|
||
70 | tx->flags |= IEEE80211_TX_UNICAST; |
||
71 | - info->flags &= ~IEEE80211_TX_CTL_NO_ACK;
|
||
72 | - }
|
||
73 | |||
74 | if (tx->flags & IEEE80211_TX_FRAGMENTED) { |
||
75 | if ((tx->flags & IEEE80211_TX_UNICAST) && |