]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: rtw89: fw: load TX power elements according to AID
authorZong-Zhe Yang <kevin_yang@realtek.com>
Wed, 25 Mar 2026 07:21:30 +0000 (15:21 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Mon, 30 Mar 2026 02:29:39 +0000 (10:29 +0800)
For different A-die, there will be different TX power parameters.
In FW element header, the corresponding A-die ID will be described.
So, compare runtime AID with that to load the target TX power
parameters.

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

index 13391ec9627cf3dd427ac945613b5b1e5f86e73b..52db41c672657c07ccb49c976c7c2f1295421ace 100644 (file)
@@ -1153,8 +1153,13 @@ int rtw89_fw_recognize_txpwr_from_elm(struct rtw89_dev *rtwdev,
        const struct __rtw89_fw_txpwr_element *txpwr_elm = &elm->u.txpwr;
        const unsigned long offset = arg.offset;
        struct rtw89_efuse *efuse = &rtwdev->efuse;
+       struct rtw89_hal *hal = &rtwdev->hal;
+       u16 aid = le16_to_cpu(elm->aid);
        struct rtw89_txpwr_conf *conf;
 
+       if (aid && aid != hal->aid)
+               return 1;
+
        if (!rtwdev->rfe_data) {
                rtwdev->rfe_data = kzalloc_obj(*rtwdev->rfe_data);
                if (!rtwdev->rfe_data)