Skip to contentSkip to conversation

rtw89: declare HE capabilities in 6G band

PATCH Superseded Ping-Ke Shih 2 participants 3 messages Mar 4, 2022 – Mar 7, 2022 Realtek wireless driver (rtw89)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Ping-Ke Shih

author maintainer
#0 lore raw

PATCH 1/1 rtw89: declare HE capabilities in 6G band

To work properly in 6G band, declare HE 6G capabilities. Without this fix, it can only TX/RX with OFDM rates.

---
 drivers/net/wireless/realtek/rtw89/core.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/net/wireless/realtek/rtw89/core.c +9 -0
index a0086b14550a8..81c1c28e6e92c 100644
@@ -2383,6 +2383,15 @@ static void rtw89_init_he_cap(struct rtw89_dev *rtwdev,
 			he_cap->he_mcs_nss_supp.tx_mcs_160 = cpu_to_le16(mcs_map);
 		}
 
+		if (band == NL80211_BAND_6GHZ) {
+			__le16 capa;
+
+			capa = u16_encode_bits(0, IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START) |
+			       u16_encode_bits(7, IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP) |
+			       u16_encode_bits(1, IEEE80211_HE_6GHZ_CAP_MAX_MPDU_LEN);
+			iftype_data[idx].he_6ghz_capa.capa = capa;
+		}
+
 		idx++;
 	}
 
Signature · 1 line
2.25.1
#1 lore raw
Quoted 13 lines · Ping-Ke Shih

To work properly in 6G band, declare HE 6G capabilities. Without this fix, it can only TX/RX with OFDM rates.

---
 drivers/net/wireless/realtek/rtw89/core.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/net/wireless/realtek/rtw89/core.c +0 -0
index a0086b14550a8..81c1c28e6e92c 100644

drivers/net/wireless/realtek/rtw89/core.c static void rtw89_init_he_cap(struct rtw89_dev *rtwdev, · line 2390

Quoted 8 lines
drivers/net/wireless/realtek/rtw89/core.c +4 -0
@@ -2383,6 +2383,15 @@ static void rtw89_init_he_cap(struct rtw89_dev *rtwdev,
 			he_cap->he_mcs_nss_supp.tx_mcs_160 = cpu_to_le16(mcs_map);
 		}
 
+		if (band == NL80211_BAND_6GHZ) {
+			__le16 capa;
+
+			capa = u16_encode_bits(0, IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START) |
 

le16_encode_bits()? I guess sparse would tell.

But it looks weird with the constants, I guess you mean

le16_encode_bits(IEEE80211_HT_MPDU_DENSITY_NONE,

		 IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START) |

le16_encode_bits(IEEE80211_VHT_MAX_AMPDU_1024K, ...) |
...

(there's documentation in ieee80211.h which value enums should be used)

johannes

author maintainer
#2 lore raw
Quoted 33 lines

-----Original Message-----
From: Johannes Berg <[email protected]>
Sent: Friday, March 4, 2022 5:20 PM
To: Pkshih <[email protected]>; [email protected]
Cc: [email protected]
Subject: Re: [PATCH] rtw89: declare HE capabilities in 6G band

Quoted 13 lines · Ping-Ke Shih

To work properly in 6G band, declare HE 6G capabilities. Without this fix, it can only TX/RX with OFDM rates.

---
 drivers/net/wireless/realtek/rtw89/core.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/net/wireless/realtek/rtw89/core.c +0 -0
index a0086b14550a8..81c1c28e6e92c 100644

drivers/net/wireless/realtek/rtw89/core.c static void rtw89_init_he_cap(struct rtw89_dev *rtwdev, · line 2390

Quoted 8 lines
drivers/net/wireless/realtek/rtw89/core.c +4 -0
@@ -2383,6 +2383,15 @@ static void rtw89_init_he_cap(struct rtw89_dev *rtwdev,
 			he_cap->he_mcs_nss_supp.tx_mcs_160 = cpu_to_le16(mcs_map);
 		}
 
+		if (band == NL80211_BAND_6GHZ) {
+			__le16 capa;
+
+			capa = u16_encode_bits(0, IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START) |
 

le16_encode_bits()? I guess sparse would tell.

Quoted 9 lines

But it looks weird with the constants, I guess you mean

le16_encode_bits(IEEE80211_HT_MPDU_DENSITY_NONE,

		 IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START) |

le16_encode_bits(IEEE80211_VHT_MAX_AMPDU_1024K, ...) |
...

(there's documentation in ieee80211.h which value enums should be used)

Thanks for pointing out these.
I have fixed them and sent v2.

--
Ping-Ke