Skip to content

Commit

Permalink
mac80211: fixup radiotap tx flags for RTS/CTS
Browse files Browse the repository at this point in the history
When using RTS/CTS, the CTS-to-Self bit in radiotap TX flags is
getting set instead of the RTS bit.  Set the correct one.

Reported-by: Larry Maxwell <larrymaxwell@agilemesh.com>
Signed-off-by: Bob Copeland <bob@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Bob Copeland authored and Johannes Berg committed Apr 22, 2014
1 parent 062f1d6 commit 311ab8e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions net/mac80211/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,9 @@ ieee80211_add_tx_radiotap_header(struct ieee80211_local *local,
!is_multicast_ether_addr(hdr->addr1))
txflags |= IEEE80211_RADIOTAP_F_TX_FAIL;

if ((info->status.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) ||
(info->status.rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT))
if (info->status.rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT)
txflags |= IEEE80211_RADIOTAP_F_TX_CTS;
else if (info->status.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS)
if (info->status.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS)
txflags |= IEEE80211_RADIOTAP_F_TX_RTS;

put_unaligned_le16(txflags, pos);
Expand Down

0 comments on commit 311ab8e

Please sign in to comment.