]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: rtw89: fw: load TX power track element according to AID
authorZong-Zhe Yang <kevin_yang@realtek.com>
Wed, 20 May 2026 12:38:17 +0000 (20:38 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Wed, 27 May 2026 08:26:37 +0000 (16:26 +0800)
RF parameters has different TX power track table for different AID.
FW elements may include multiple TX power track tables for different
AID. So, load the corresponding one.

Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260520123823.1792954-2-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/fw.c

index eb5683d644618aeb4e554dc1f0cc9d0656b87f83..3e6161743015803d470ce25ee7dc17ddff722959 100644 (file)
@@ -1209,12 +1209,17 @@ int rtw89_build_txpwr_trk_tbl_from_elm(struct rtw89_dev *rtwdev,
 {
        struct rtw89_fw_elm_info *elm_info = &rtwdev->fw.elm_info;
        const struct rtw89_chip_info *chip = rtwdev->chip;
+       struct rtw89_hal *hal = &rtwdev->hal;
+       u16 aid = le16_to_cpu(elm->aid);
        u32 needed_bitmap = 0;
        u32 offset = 0;
        int subband;
        u32 bitmap;
        int type;
 
+       if (aid && aid != hal->aid)
+               return 1;
+
        if (chip->support_bands & BIT(NL80211_BAND_6GHZ))
                needed_bitmap |= RTW89_DEFAULT_NEEDED_FW_TXPWR_TRK_6GHZ;
        if (chip->support_bands & BIT(NL80211_BAND_5GHZ))