Commit 8db6e736 authored by John Crispin's avatar John Crispin Committed by Johannes Berg

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: 3d07ffca ("mac80211: add struct ieee80211_tx_status support to ieee80211_add_tx_radiotap_header")
Signed-off-by: default avatarJohn Crispin <john@phrozen.org>
Link: https://lore.kernel.org/r/20190807075949.32414-2-john@phrozen.orgSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent dc649d64
...@@ -327,13 +327,13 @@ ieee80211_add_tx_radiotap_header(struct ieee80211_local *local, ...@@ -327,13 +327,13 @@ ieee80211_add_tx_radiotap_header(struct ieee80211_local *local,
/* IEEE80211_RADIOTAP_RATE */ /* IEEE80211_RADIOTAP_RATE */
if (status && status->rate && !(status->rate->flags & if (status && status->rate) {
(RATE_INFO_FLAGS_MCS | if (!(status->rate->flags & (RATE_INFO_FLAGS_MCS |
RATE_INFO_FLAGS_60G | RATE_INFO_FLAGS_60G |
RATE_INFO_FLAGS_VHT_MCS | RATE_INFO_FLAGS_VHT_MCS |
RATE_INFO_FLAGS_HE_MCS))) RATE_INFO_FLAGS_HE_MCS)))
legacy_rate = status->rate->legacy; legacy_rate = status->rate->legacy;
else if (info->status.rates[0].idx >= 0 && } else if (info->status.rates[0].idx >= 0 &&
!(info->status.rates[0].flags & (IEEE80211_TX_RC_MCS | !(info->status.rates[0].flags & (IEEE80211_TX_RC_MCS |
IEEE80211_TX_RC_VHT_MCS))) IEEE80211_TX_RC_VHT_MCS)))
legacy_rate = legacy_rate =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment