mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-20 08:47:59 -05:00
wifi: rtw89: refine rtw89_correct_cck_chan() by rtw89_hw_to_nl80211_band()
In rtw89_correct_cck_chan(), we turn to use rtw89_hw_to_nl80211_band(). The difference between rtw89_hw_to_nl80211_band() and the original raw judgement is the case on 6 GHz. Since rtw89_correct_cck_chan() is common code independent on chip, if runtime chip doesn't support 6 GHz, it is probably safe. Otherwise, it might not. Signed-off-by: Zong-Zhe Yang <kevin_yang@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/20230816082133.57474-3-pkshih@realtek.com
This commit is contained in:
committed by
Kalle Valo
parent
64a24cb63a
commit
b05fdc46c5
@@ -1659,8 +1659,7 @@ static void rtw89_correct_cck_chan(struct rtw89_dev *rtwdev,
|
||||
const struct rtw89_chan_rcd *rcd =
|
||||
rtw89_chan_rcd_get(rtwdev, RTW89_SUB_ENTITY_0);
|
||||
u16 chan = rcd->prev_primary_channel;
|
||||
u8 band = rcd->prev_band_type == RTW89_BAND_2G ?
|
||||
NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
|
||||
u8 band = rtw89_hw_to_nl80211_band(rcd->prev_band_type);
|
||||
|
||||
if (status->band != NL80211_BAND_2GHZ &&
|
||||
status->encoding == RX_ENC_LEGACY &&
|
||||
|
||||
Reference in New Issue
Block a user