Revert "wifi: iwlwifi: mvm: remove support for REDUCE_TX_POWER_CMD ver 6 and 7"
PATCH 1/1 Revert "wifi: iwlwifi: mvm: remove support for REDUCE_TX_POWER_CMD ver 6 and 7"
From: Bartosz Golaszewski <[email protected]>
This reverts commit e3fd06d1d8869747e02a022e3c9045a3187f3aa5 as it broke wifi on my Thinkpad P1 (Intel AX210) in v6.17. I don't have a better idea than reverting as - contrary to what the commit message claims - this chip seems to still be using the commands removed by this commit.
--- .../net/wireless/intel/iwlwifi/fw/api/power.h | 48 +++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 14 ++++-- .../net/wireless/intel/iwlwifi/mvm/mac80211.c | 4 ++ 3 files changed, 62 insertions(+), 4 deletions(-)
drivers/net/wireless/intel/iwlwifi/fw/api/power.h +48 -0
@@ -328,6 +328,50 @@ struct iwl_dev_tx_power_cmd_v5 {__le32 timer_period; } __packed;/* TX_REDUCED_POWER_API_S_VER_5 */ +/** +* struct iwl_dev_tx_power_cmd_v6 - TX power reduction command version 6 +* @per_chain: per chain restrictions +* @enable_ack_reduction: enable or disable close range ack TX power +* reduction. +* @per_chain_restriction_changed: is per_chain_restriction has changed +* from last command. used if set_mode is +* IWL_TX_POWER_MODE_SET_SAR_TIMER. +* note: if not changed, the command is used for keep alive only. +* @reserved: reserved (padding) +* @timer_period: timer in milliseconds. if expires FW will change to default +* BIOS values. relevant if setMode is IWL_TX_POWER_MODE_SET_SAR_TIMER +*/ +struct iwl_dev_tx_power_cmd_v6 { +__le16 per_chain[IWL_NUM_CHAIN_TABLES_V2 ][IWL_NUM_CHAIN_LIMITS ][IWL_NUM_SUB_BANDS_V2 ]; +u8 enable_ack_reduction; +u8 per_chain_restriction_changed; +u8 reserved[2 ]; +__le32 timer_period; +} __packed;/* TX_REDUCED_POWER_API_S_VER_6 */ + +/** +* struct iwl_dev_tx_power_cmd_v7 - TX power reduction command version 7 +* @per_chain: per chain restrictions +* @enable_ack_reduction: enable or disable close range ack TX power +* reduction. +* @per_chain_restriction_changed: is per_chain_restriction has changed +* from last command. used if set_mode is +* IWL_TX_POWER_MODE_SET_SAR_TIMER. +* note: if not changed, the command is used for keep alive only. +* @reserved: reserved (padding) +* @timer_period: timer in milliseconds. if expires FW will change to default +* BIOS values. relevant if setMode is IWL_TX_POWER_MODE_SET_SAR_TIMER +* @flags: reduce power flags. +*/ +struct iwl_dev_tx_power_cmd_v7 { +__le16 per_chain[IWL_NUM_CHAIN_TABLES_V2 ][IWL_NUM_CHAIN_LIMITS ][IWL_NUM_SUB_BANDS_V2 ]; +u8 enable_ack_reduction; +u8 per_chain_restriction_changed; +u8 reserved[2 ]; +__le32 timer_period; +__le32 flags; +} __packed;/* TX_REDUCED_POWER_API_S_VER_7 */ +/** * struct iwl_dev_tx_power_cmd_v8 - TX power reduction command version 8 * @per_chain: per chain restrictions
@@ -372,6 +416,8 @@ struct iwl_dev_tx_power_cmd_per_band {* @v3: version 3 part of the command * @v4: version 4 part of the command * @v5: version 5 part of the command +* @v6: version 6 part of the command +* @v7: version 7 part of the command * @v8: version 8 part of the command */ struct iwl_dev_tx_power_cmd_v3_v8 {
@@ -381,6 +427,8 @@ struct iwl_dev_tx_power_cmd_v3_v8 {struct iwl_dev_tx_power_cmd_v3 v3;struct iwl_dev_tx_power_cmd_v4 v4;struct iwl_dev_tx_power_cmd_v5 v5; +struct iwl_dev_tx_power_cmd_v6 v6; +struct iwl_dev_tx_power_cmd_v7 v7;struct iwl_dev_tx_power_cmd_v8 v8; }; };
drivers/net/wireless/intel/iwlwifi/mvm/fw.c +10 -4
@@ -870,11 +870,17 @@ int iwl_mvm_sar_select_profile(struct iwl_mvm *mvm, int prof_a, int prof_b) len =sizeof (cmd_v9_v10.v9); n_subbands =IWL_NUM_SUB_BANDS_V1 ; per_chain = &cmd_v9_v10.v9.per_chain[0 ][0 ]; - }else if (cmd_ver ==8 ) { - len =sizeof (cmd.v8); + }else if (cmd_ver >=7 ) { + len =sizeof (cmd.v7); n_subbands =IWL_NUM_SUB_BANDS_V2 ; - per_chain = cmd.v8.per_chain[0 ][0 ]; - cmd.v8.flags =cpu_to_le32 (mvm->fwrt.reduced_power_flags); + per_chain = cmd.v7.per_chain[0 ][0 ]; + cmd.v7.flags =cpu_to_le32 (mvm->fwrt.reduced_power_flags); +if (cmd_ver ==8 ) + len =sizeof (cmd.v8); + }else if (cmd_ver ==6 ) { + len =sizeof (cmd.v6); + n_subbands =IWL_NUM_SUB_BANDS_V2 ; + per_chain = cmd.v6.per_chain[0 ][0 ]; }else if (fw_has_api (&mvm->fw->ucode_capa,IWL_UCODE_TLV_API_REDUCE_TX_POWER )) { len =sizeof (cmd.v5);
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +4 -0
@@ -1517,6 +1517,10 @@ int iwl_mvm_set_tx_power(struct iwl_mvm *mvm, len =sizeof (cmd_v9_v10.v9); else if (cmd_ver == 8) len =sizeof (cmd.v8); + else if (cmd_ver == 7) + len =sizeof (cmd.v7); + else if (cmd_ver == 6) + len =sizeof (cmd.v6); else if (fw_has_api(&mvm->fw->ucode_capa, IWL_UCODE_TLV_API_REDUCE_TX_POWER)) len =sizeof (cmd.v5);
Signature · 1 line
2.48.1
Quoted 10 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
This reverts commit
e3fd06d1d8869747e02a022e3c9045a3187f3aa5as it broke wifi on my Thinkpad P1 (Intel AX210) in v6.17. I don't have a better idea than reverting as - contrary to what the commit message claims - this chip seems to still be using the commands removed by this commit.Signed-off-by Bartosz Golaszewski <[email protected]>---
And here's the kernel log: https://pastebin.com/zrTPbE0j
Bartosz
Korenblit, Miriam Rachel
maintainerQuoted 24 lines
-----Original Message-----
From: Bartosz Golaszewski <[email protected]>
Sent: Saturday, October 4, 2025 5:19 PM
To: Korenblit, Miriam Rachel <[email protected]>; Berg, Johannes <[email protected]>; Anjaneyulu, Pagadala Yesu <[email protected]>; Grumbach, Emmanuel <[email protected]>; Bhaskar Chowdhury <[email protected]>; Bartosz Golaszewski <[email protected]>; Peer, Ilan <[email protected]>; Gabay, Daniel <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [PATCH] Revert "wifi: iwlwifi: mvm: remove support forREDUCE_TX_POWER_CMDver 6 and 7"Quoted 7 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
This reverts commit
e3fd06d1d8869747e02a022e3c9045a3187f3aa5as it broke wifi on my Thinkpad P1 (Intel AX210) in v6.17. I don't have a better idea than reverting as - contrary to what the commit message claims - this chip seems to still be using the commands removed by this
Quoted 8 lines
commit.
Quoted 3 lines
Signed-off-by Bartosz Golaszewski <[email protected]>---
And here's the kernel log: https://pastebin.com/zrTPbE0j
Bartosz
Hi
I think you reverted the wrong commit?
Didn’t you meane3fd06d1d886 ("wifi: iwlwifi: mvm: remove support for REDUCE_TX_POWER_CMD ver 6 and 7") ?
Anyway, for fixing this issue, can I ask you to upgrade your FW? Then you should not see this error anymore.
Miri
Quoted 32 lines · Miriam Rachel
Quoted 32 lines
-----Original Message-----
From: Bartosz Golaszewski <[email protected]>
Sent: Saturday, October 4, 2025 5:19 PM
To: Korenblit, Miriam Rachel <[email protected]>; Berg, Johannes <[email protected]>; Anjaneyulu, Pagadala Yesu <[email protected]>; Grumbach, Emmanuel <[email protected]>; Bhaskar Chowdhury <[email protected]>; Bartosz Golaszewski <[email protected]>; Peer, Ilan <[email protected]>; Gabay, Daniel <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [PATCH] Revert "wifi: iwlwifi: mvm: remove support forREDUCE_TX_POWER_CMDver 6 and 7"Quoted 7 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
This reverts commit
e3fd06d1d8869747e02a022e3c9045a3187f3aa5as it broke wifi on my Thinkpad P1 (Intel AX210) in v6.17. I don't have a better idea than reverting as - contrary to what the commit message claims - this chip seems to still be using the commands removed by thiscommit.
Quoted 3 lines
Signed-off-by Bartosz Golaszewski <[email protected]>---
And here's the kernel log: https://pastebin.com/zrTPbE0j
Quoted 9 lines
Quoted 1 line
Bartosz
Hi
I think you reverted the wrong commit?
Didn’t you meane3fd06d1d886("wifi: iwlwifi: mvm: remove support forREDUCE_TX_POWER_CMDver 6 and 7") ?
This is the same commit though, right? Am I missing something?
Quoted 2 lines
Anyway, for fixing this issue, can I ask you to upgrade your FW? Then you should not see this error anymore.
To what? I'm already at iwlwifi-ty-a0-gf-a0-89 which seems to be the most recent firmware for this card.
Bartosz
Korenblit, Miriam Rachel
maintainerQuoted 4 lines
To what? I'm already at iwlwifi-ty-a0-gf-a0-89 which seems to be the most recent firmware for this card.
See https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=70fce2e71a3cbbf50cc57694b94dcb27eb9111f5
This is the latest update of the FW of your chip.
Miri
Quoted 10 lines · Miriam Rachel
Quoted 4 lines
To what? I'm already at iwlwifi-ty-a0-gf-a0-89 which seems to be the most recent firmware for this card.
See https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=70fce2e71a3cbbf50cc57694b94dcb27eb9111f5
This is the latest update of the FW of your chip.Miri
$ md5sum /lib/firmware/iwlwifi-ty-a0-gf-a0-89.ucode dd86d097615ee98b64d1b78b73697a6a /lib/firmware/iwlwifi-ty-a0-gf-a0-89.ucode $ md5sum linux-firmware/intel/iwlwifi/iwlwifi-ty-a0-gf-a0-89.ucode ae03ce5298a2280e3a22db16fbffb5db linux-firmware/intel/iwlwifi/iwlwifi-ty-a0-gf-a0-89.ucode
So the 89 at the end of the filename is not the version of the firmware? No the full version anyway? I wasn't aware of this. Where is the version information encoded other than the linux-firmware git log?
Bart
Korenblit, Miriam Rachel
maintainerQuoted 1 line
So the 89 at the end of the filename is not the version of the firmware?
It is. But not for "frozen devices" - like yours.
In such devices, the API number (89 in your case) doesn't increase anymore, but we still update the FW from time to time.
Quoted 2 lines
No the full version anyway? I wasn't aware of this. Where is the version information encoded other than the linux-firmware git log?
You can see the SHA-1 of the FW in the dmesg. For example, in the log you sent:
Loaded firmware version: 89.e9cec78e.0 ty-a0-gf-a0-89.ucode
The SHA-1 is e9cec78e.
Miri
Quoted 6 lines · Miriam Rachel
Quoted 2 lines
So the 89 at the end of the filename is not the version of the firmware?
It is. But not for "frozen devices" - like yours.
In such devices, the API number (89 in your case) doesn't increase anymore, but we still update the FW from time to time.
Quoted 7 lines
Quoted 2 lines
No the full version anyway? I wasn't aware of this. Where is the version information encoded other than the linux-firmware git log?
You can see the SHA-1 of the FW in the dmesg. For example, in the log you sent:
Loaded firmware version: 89.e9cec78e.0 ty-a0-gf-a0-89.ucode
The SHA-1 ise9cec78e.
Ok, got it. Will keep it in mind in the future.
Bart