diff options
author | John Crispin <john@phrozen.org> | 2019-08-07 09:59:47 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2019-08-21 10:32:57 +0200 |
commit | 8db6e7367d3ca78dd85c5e9fec2bd6d69981a980 (patch) | |
tree | 0fed45b42a7a99307810e0a198f1802317c9d5ae /net/mac80211 | |
parent | dc649d649a5e07eaf8f4aefb8f0e35cc178dd11f (diff) |
mac80211: fix bad guard when reporting legacy rates
When reporting legacy rates inside the TX Radiotap header we need to split
the check between "uses tx_statua_ext" and "is legacy rate". Not doing so
would make the code drop into the !tx_status_ext path.
Fixes: 3d07ffcaf320 ("mac80211: add struct ieee80211_tx_status support to ieee80211_add_tx_radiotap_header")
Signed-off-by: John Crispin <john@phrozen.org>
Link: https://lore.kernel.org/r/20190807075949.32414-2-john@phrozen.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/status.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index f984943cdabd..4eac88fd2903 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c @@ -327,13 +327,13 @@ ieee80211_add_tx_radiotap_header(struct ieee80211_local *local, /* IEEE80211_RADIOTAP_RATE */ - if (status && status->rate && !(status->rate->flags & - (RATE_INFO_FLAGS_MCS | - RATE_INFO_FLAGS_60G | - RATE_INFO_FLAGS_VHT_MCS | - RATE_INFO_FLAGS_HE_MCS))) - legacy_rate = status->rate->legacy; - else if (info->status.rates[0].idx >= 0 && + if (status && status->rate) { + if (!(status->rate->flags & (RATE_INFO_FLAGS_MCS | + RATE_INFO_FLAGS_60G | + RATE_INFO_FLAGS_VHT_MCS | + RATE_INFO_FLAGS_HE_MCS))) + legacy_rate = status->rate->legacy; + } else if (info->status.rates[0].idx >= 0 && !(info->status.rates[0].flags & (IEEE80211_TX_RC_MCS | IEEE80211_TX_RC_VHT_MCS))) legacy_rate = |