]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: rtw89: set pre-calculated antenna matrices for HE trigger frame
authorKuan-Chung Chen <damon.chen@realtek.com>
Wed, 16 Apr 2025 08:12:41 +0000 (16:12 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Sat, 26 Apr 2025 07:27:32 +0000 (15:27 +0800)
Pre-calculated antenna matrices can improve 160MHz uplink OFDMA
performance, but they are only needed for the HE trigger frame.

Signed-off-by: Kuan-Chung Chen <damon.chen@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250416081241.36138-5-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/core.c

index 869728922defc710ed66e5a46d67f9cd90b2a35a..25510946251781f013243b60d9ae9650677fbd83 100644 (file)
@@ -2060,10 +2060,21 @@ static void rtw89_stats_trigger_frame(struct rtw89_dev *rtwdev,
                        break;
 
                if (aid == vif->cfg.aid) {
-                       enum nl80211_he_ru_alloc rua = rtw89_he_rua_to_ru_alloc(tf_rua >> 1);
+                       enum nl80211_he_ru_alloc rua;
 
                        rtwvif->stats.rx_tf_acc++;
                        rtwdev->stats.rx_tf_acc++;
+
+                       /* The following only required for HE trigger frame, but we
+                        * cannot use UL HE-SIG-A2 reserved subfield to identify it
+                        * since some 11ax APs will fill it with all 0s, which will
+                        * be misunderstood as EHT trigger frame.
+                        */
+                       if (bss_conf->eht_support)
+                               break;
+
+                       rua = rtw89_he_rua_to_ru_alloc(tf_rua >> 1);
+
                        if (tf_bw == IEEE80211_TRIGGER_ULBW_160_80P80MHZ &&
                            rua <= NL80211_RATE_INFO_HE_RU_ALLOC_106)
                                rtwvif_link->pwr_diff_en = true;