# \[PATCH AUTOSEL 5.13 152/189\] iwlwifi: mvm: support LONG\_GROUP for WOWLAN\_GET\_STATUSES version

- Subsystems: INTEL WIRELESS WIFI LINK (iwlwifi), THE REST
- Maintainers: Miri Korenblit, Linus Torvalds
- List: netdev
- 3 messages, 2 authors
- Page: https://ratatoskr.run/netdev/2021/07/1434006/t

## \[PATCH AUTOSEL 5.13 152/189\] iwlwifi: mvm: support LONG\_GROUP for WOWLAN\_GET\_STATUSES version

- From: Sasha Levin \<sashal@kernel.org\>
- Date: 2021-07-06 11:25:46 
- Message: https://ratatoskr.run/netdev/2021/07/1434006.md

```text
From: Emmanuel Grumbach <redacted>

[ Upstream commit d65ab7c0e0b92056754185d3f6925d7318730e94 ]

It's been a while that the firmware uses LONG_GROUP by default
and not LEGACY_GROUP.
Until now the firmware wrongly advertise the WOWLAN_GET_STATUS
command's version with LEGACY_GROUP, but it is now being fixed.
In order to support both firmwares, first try to get the version
number of the command with the LONG_GROUP and if the firmware
didn't advertise the command version with LONG_GROUP, try to get
the command version with LEGACY_GROUP.

Signed-off-by: Emmanuel Grumbach <redacted>
Signed-off-by: Luca Coelho <redacted>
Link: https://lore.kernel.org/r/iwlwifi.20210618105614.cd6f4e421430.Iec07c746c8e65bc267e4750f38e4f74f2010ca45@changeid
Signed-off-by: Luca Coelho <redacted>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
index 2e28cf299ef4..9c16303e58a9 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
@@ -1608,8 +1608,11 @@ struct iwl_wowlan_status *iwl_mvm_send_wowlan_get_status(struct iwl_mvm *mvm)
 	len = iwl_rx_packet_payload_len(cmd.resp_pkt);
 
 	/* default to 7 (when we have IWL_UCODE_TLV_API_WOWLAN_KEY_MATERIAL) */
-	notif_ver = iwl_fw_lookup_notif_ver(mvm->fw, LEGACY_GROUP,
-					    WOWLAN_GET_STATUSES, 7);
+	notif_ver = iwl_fw_lookup_notif_ver(mvm->fw, LONG_GROUP,
+					    WOWLAN_GET_STATUSES, 0);
+	if (!notif_ver)
+		notif_ver = iwl_fw_lookup_notif_ver(mvm->fw, LEGACY_GROUP,
+						    WOWLAN_GET_STATUSES, 7);
 
 	if (!fw_has_api(&mvm->fw->ucode_capa,
 			IWL_UCODE_TLV_API_WOWLAN_KEY_MATERIAL)) {
-- 
2.30.2

```

## Re: \[PATCH AUTOSEL 5.13 152/189\] iwlwifi: mvm: support LONG\_GROUP for WOWLAN\_GET\_STATUSES version

- From: Johannes Berg \<johannes@sipsolutions.net\>
- Date: 2021-07-06 14:39:52 
- Message: https://ratatoskr.run/netdev/2021/07/1434739.md

```text
On Tue, 2021-07-06 at 07:13 -0400, Sasha Levin wrote:
> From: Emmanuel Grumbach <redacted>
> 
> [ Upstream commit d65ab7c0e0b92056754185d3f6925d7318730e94 ]
> 
> It's been a while that the firmware uses LONG_GROUP by default
> and not LEGACY_GROUP.
> Until now the firmware wrongly advertise the WOWLAN_GET_STATUS
> command's version with LEGACY_GROUP, but it is now being fixed.

"Being fixed" here is the key - this will affect only firmware versions
that the older drivers in stable won't load. No need to backport this.

johannes

```

## Re: \[PATCH AUTOSEL 5.13 152/189\] iwlwifi: mvm: support LONG\_GROUP for WOWLAN\_GET\_STATUSES version

- From: Sasha Levin \<sashal@kernel.org\>
- Date: 2021-07-07 10:46:16 
- Message: https://ratatoskr.run/netdev/2021/07/1435438.md

```text
On Tue, Jul 06, 2021 at 04:09:10PM +0200, Johannes Berg wrote:
>On Tue, 2021-07-06 at 07:13 -0400, Sasha Levin wrote:
>> From: Emmanuel Grumbach <redacted>
>>
>> [ Upstream commit d65ab7c0e0b92056754185d3f6925d7318730e94 ]
>>
>> It's been a while that the firmware uses LONG_GROUP by default
>> and not LEGACY_GROUP.
>> Until now the firmware wrongly advertise the WOWLAN_GET_STATUS
>> command's version with LEGACY_GROUP, but it is now being fixed.
>
>"Being fixed" here is the key - this will affect only firmware versions
>that the older drivers in stable won't load. No need to backport this.

I'll drop it, thanks!

-- 
Thanks,
Sasha
```
