rtw89: fix HE PHY bandwidth capability
Ping-Ke Shih
maintainerPATCH v3 1/1 rtw89: fix HE PHY bandwidth capability
From: Johannes Berg <[email protected]>
Bit 2 and 3 are reserved on 5/6 GHz and bit 1 is reserved on 2.4 GHz, so the driver should only set the non-reserved bits according to band.
Signed-off-by Johannes Berg <[email protected]>
Signed-off-by Ping-Ke Shih <[email protected]>
---
v3: not only bit 2, but also bit 3 is also reserved on 5/6 GHz.
v2: do rebase onto the latest tree
--- drivers/net/wireless/realtek/rtw89/core.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
drivers/net/wireless/realtek/rtw89/core.c +9 -4
@@ -2333,10 +2333,15 @@ static void rtw89_init_he_cap(struct rtw89_dev *rtwdev,IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU ;if (i ==NL80211_IFTYPE_STATION ) mac_cap_info[5 ] =IEEE80211_HE_MAC_CAP5_HT_VHT_TRIG_FRAME_RX ; - phy_cap_info[0 ] =IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G | -IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G ; -if (chip->support_bw160) - phy_cap_info[0 ] |=IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G ; +if (band ==NL80211_BAND_2GHZ ) { + phy_cap_info[0 ] = +IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G ; + }else { + phy_cap_info[0 ] = +IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G ; +if (chip->support_bw160) + phy_cap_info[0 ] |=IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G ; + } phy_cap_info[1 ] =IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A |IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD |IEEE80211_HE_PHY_CAP1_HE_LTF_AND_GI_FOR_HE_PPDUS_0_8US ;
Signature · 1 line
2.25.1
Quoted 8 lines · Ping-Ke Shih
From: Johannes Berg <[email protected]>
Bit 2 and 3 are reserved on 5/6 GHz and bit 1 is reserved on 2.4 GHz, so the driver should only set the non-reserved bits according to band.
Signed-off-by Johannes Berg <[email protected]>Signed-off-by Ping-Ke Shih <[email protected]>
Patch applied to wireless-next.git, thanks.
517eed92bca2 rtw89: fix HE PHY bandwidth capability
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches