Skip to content

Commit

Permalink
mac80211: add radiotap flag to assure frames are not reordered
Browse files Browse the repository at this point in the history
Add a new radiotap flag to indicate injected frames must not be
reordered relative to other frames that also have this flag set,
independent of priority field values in the transmitted frame.
Parse this radiotap flag and define and set a corresponding Tx
control flag. Note that this flag has recently been standardized
as part of an update to radiotap.

Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@kuleuven.be>
Link: https://lore.kernel.org/r/20201104061823.197407-2-Mathy.Vanhoef@kuleuven.be
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Mathy Vanhoef authored and Johannes Berg committed Nov 6, 2020
1 parent 70debba commit 30df813
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/net/ieee80211_radiotap.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ enum ieee80211_radiotap_tx_flags {
IEEE80211_RADIOTAP_F_TX_RTS = 0x0004,
IEEE80211_RADIOTAP_F_TX_NOACK = 0x0008,
IEEE80211_RADIOTAP_F_TX_NOSEQNO = 0x0010,
IEEE80211_RADIOTAP_F_TX_ORDER = 0x0020,
};

/* for IEEE80211_RADIOTAP_MCS "have" flags */
Expand Down
4 changes: 4 additions & 0 deletions include/net/mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,9 @@ enum mac80211_tx_info_flags {
* it can be sent out.
* @IEEE80211_TX_CTRL_NO_SEQNO: Do not overwrite the sequence number that
* has already been assigned to this frame.
* @IEEE80211_TX_CTRL_DONT_REORDER: This frame should not be reordered
* relative to other frames that have this flag set, independent
* of their QoS TID or other priority field values.
*
* These flags are used in tx_info->control.flags.
*/
Expand All @@ -869,6 +872,7 @@ enum mac80211_tx_control_flags {
IEEE80211_TX_CTRL_SKIP_MPATH_LOOKUP = BIT(5),
IEEE80211_TX_INTCFL_NEED_TXPROCESSING = BIT(6),
IEEE80211_TX_CTRL_NO_SEQNO = BIT(7),
IEEE80211_TX_CTRL_DONT_REORDER = BIT(8),
};

/*
Expand Down
3 changes: 3 additions & 0 deletions net/mac80211/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2102,6 +2102,9 @@ bool ieee80211_parse_tx_radiotap(struct sk_buff *skb,
info->flags |= IEEE80211_TX_CTL_NO_ACK;
if (txflags & IEEE80211_RADIOTAP_F_TX_NOSEQNO)
info->control.flags |= IEEE80211_TX_CTRL_NO_SEQNO;
if (txflags & IEEE80211_RADIOTAP_F_TX_ORDER)
info->control.flags |=
IEEE80211_TX_CTRL_DONT_REORDER;
break;

case IEEE80211_RADIOTAP_RATE:
Expand Down

0 comments on commit 30df813

Please sign in to comment.