summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/realtek/rtw89/debug.c
diff options
context:
space:
mode:
authorPo Hao Huang <phhuang@realtek.com>2021-11-11 10:37:06 +0800
committerKalle Valo <kvalo@kernel.org>2021-12-08 20:27:18 +0200
commiteb4e52b3f38dfd08a89e1084f5980a2bb93456fb (patch)
tree05904623ffaaf7ef6b415a1290159b71fc979e80 /drivers/net/wireless/realtek/rtw89/debug.c
parente45a9e6265d2591efb745c9ffa46f4e9cceb5c65 (diff)
rtw89: fix incorrect channel info during scan
We used to fill in rx skbs' frequency field by mac80211's current channel value. In some cases, mac80211 switches channel before all rx packets have been processed. This results in incorrect bss info. We fix this by filling in frequency field with channel index obtained from hardware, then fix potential cck missing issue by skb's original hw rate. After all fix is done, convert hw rate back to the supported band rate index. Signed-off-by: Po Hao Huang <phhuang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20211111023706.14154-3-pkshih@realtek.com
Diffstat (limited to 'drivers/net/wireless/realtek/rtw89/debug.c')
-rw-r--r--drivers/net/wireless/realtek/rtw89/debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/realtek/rtw89/debug.c b/drivers/net/wireless/realtek/rtw89/debug.c
index 1e85808aaf4b..9756d75ef24e 100644
--- a/drivers/net/wireless/realtek/rtw89/debug.c
+++ b/drivers/net/wireless/realtek/rtw89/debug.c
@@ -2285,7 +2285,7 @@ static void rtw89_sta_info_get_iter(void *data, struct ieee80211_sta *sta)
switch (status->encoding) {
case RX_ENC_LEGACY:
seq_printf(m, "Legacy %d", status->rate_idx +
- (status->band == NL80211_BAND_5GHZ ? 4 : 0));
+ (status->band != NL80211_BAND_2GHZ ? 4 : 0));
break;
case RX_ENC_HT:
seq_printf(m, "HT MCS-%d%s", status->rate_idx,