rtw89: declare HE capabilities in 6G band
authorPing-Ke Shih <pkshih@realtek.com>
Mon, 7 Mar 2022 01:27:41 +0000 (09:27 +0800)
committerKalle Valo <kvalo@kernel.org>
Wed, 9 Mar 2022 11:39:53 +0000 (13:39 +0200)
To work properly in 6G band, declare HE 6G capabilities. Without this fix,
it can only TX/RX with OFDM rates.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220307012741.6371-1-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/core.c

index f9ebf34f9a6e1db0424a74bc231d6f49d4ef7739..a93555b0a2bfb3e6b814520849871519fb6e262b 100644 (file)
@@ -2434,6 +2434,18 @@ 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 = le16_encode_bits(IEEE80211_HT_MPDU_DENSITY_NONE,
+                                               IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START) |
+                              le16_encode_bits(IEEE80211_VHT_MAX_AMPDU_1024K,
+                                               IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP) |
+                              le16_encode_bits(IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454,
+                                               IEEE80211_HE_6GHZ_CAP_MAX_MPDU_LEN);
+                       iftype_data[idx].he_6ghz_capa.capa = capa;
+               }
+
                idx++;
        }