2022-03-22 17:49:13

by Luca Coelho

[permalink] [raw]
Subject: [PATCH] iwlwifi: mvm: Don't fail if PPAG isn't supported

From: Miri Korenblit <[email protected]>

When we're copying the PPAG table into the cmd structure we're failing
if the table doesn't exist in ACPI or is invalid, or if the FW doesn't
support PPAG setting etc.

This is wrong because those are valid scenarios. Fix this by not
failing in those cases.

Fixes: e8e10a37c51c ("iwlwifi: acpi: move ppag code from mvm to fw/acpi")
Tested-by: Oliver Hartkopp <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
---
drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index 4632d3ad1a2b..e842816134f1 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -1015,8 +1015,9 @@ int iwl_mvm_ppag_send_cmd(struct iwl_mvm *mvm)
int ret, cmd_size;

ret = iwl_read_ppag_table(&mvm->fwrt, &cmd, &cmd_size);
+ /* Not supporting PPAG table is a valid scenario */
if(ret < 0)
- return ret;
+ return 0;

IWL_DEBUG_RADIO(mvm, "Sending PER_PLATFORM_ANT_GAIN_CMD\n");
ret = iwl_mvm_send_cmd_pdu(mvm, WIDE_ID(PHY_OPS_GROUP,
--
2.35.1


2022-03-22 21:46:51

by Luca Coelho

[permalink] [raw]
Subject: Re: [PATCH] iwlwifi: mvm: Don't fail if PPAG isn't supported

On Tue, 2022-03-22 at 17:39 +0200, Luca Coelho wrote:
> From: Miri Korenblit <[email protected]>
>
> When we're copying the PPAG table into the cmd structure we're failing
> if the table doesn't exist in ACPI or is invalid, or if the FW doesn't
> support PPAG setting etc.
>
> This is wrong because those are valid scenarios. Fix this by not
> failing in those cases.
>
> Fixes: e8e10a37c51c ("iwlwifi: acpi: move ppag code from mvm to fw/acpi")
> Tested-by: Oliver Hartkopp <[email protected]>
> Signed-off-by: Miri Korenblit <[email protected]>
> Signed-off-by: Luca Coelho <[email protected]>
> ---
> drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> index 4632d3ad1a2b..e842816134f1 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> @@ -1015,8 +1015,9 @@ int iwl_mvm_ppag_send_cmd(struct iwl_mvm *mvm)
> int ret, cmd_size;
>
> ret = iwl_read_ppag_table(&mvm->fwrt, &cmd, &cmd_size);
> + /* Not supporting PPAG table is a valid scenario */
> if(ret < 0)
> - return ret;
> + return 0;
>
> IWL_DEBUG_RADIO(mvm, "Sending PER_PLATFORM_ANT_GAIN_CMD\n");
> ret = iwl_mvm_send_cmd_pdu(mvm, WIDE_ID(PHY_OPS_GROUP,

Hi,

Jakub, this is the fix for the PPAG regression that we talked about
earlier. If it's fine with Kalle, you can apply it directly to net-
next to expedite it.

Kalle can you ack?

Thanks!

--
Cheers,
Luca.

2022-03-22 22:16:44

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] iwlwifi: mvm: Don't fail if PPAG isn't supported

Luca Coelho <[email protected]> writes:

> On Tue, 2022-03-22 at 17:39 +0200, Luca Coelho wrote:
>> From: Miri Korenblit <[email protected]>
>>
>> When we're copying the PPAG table into the cmd structure we're failing
>> if the table doesn't exist in ACPI or is invalid, or if the FW doesn't
>> support PPAG setting etc.
>>
>> This is wrong because those are valid scenarios. Fix this by not
>> failing in those cases.
>>
>> Fixes: e8e10a37c51c ("iwlwifi: acpi: move ppag code from mvm to fw/acpi")
>> Tested-by: Oliver Hartkopp <[email protected]>
>> Signed-off-by: Miri Korenblit <[email protected]>
>> Signed-off-by: Luca Coelho <[email protected]>
>> ---
>> drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
>> index 4632d3ad1a2b..e842816134f1 100644
>> --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
>> +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
>> @@ -1015,8 +1015,9 @@ int iwl_mvm_ppag_send_cmd(struct iwl_mvm *mvm)
>> int ret, cmd_size;
>>
>> ret = iwl_read_ppag_table(&mvm->fwrt, &cmd, &cmd_size);
>> + /* Not supporting PPAG table is a valid scenario */
>> if(ret < 0)
>> - return ret;
>> + return 0;
>>
>> IWL_DEBUG_RADIO(mvm, "Sending PER_PLATFORM_ANT_GAIN_CMD\n");
>> ret = iwl_mvm_send_cmd_pdu(mvm, WIDE_ID(PHY_OPS_GROUP,
>
> Hi,
>
> Jakub, this is the fix for the PPAG regression that we talked about
> earlier. If it's fine with Kalle, you can apply it directly to net-
> next to expedite it.

You didn't CC netdev though so it's not visible on their patchwork.

> Kalle can you ack?

Acked-by: Kalle Valo <[email protected]>

--
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

2022-03-23 06:14:38

by Jakub Kicinski

[permalink] [raw]
Subject: Re: [PATCH] iwlwifi: mvm: Don't fail if PPAG isn't supported

On Tue, 22 Mar 2022 21:36:16 +0200 Kalle Valo wrote:
> > Jakub, this is the fix for the PPAG regression that we talked about
> > earlier. If it's fine with Kalle, you can apply it directly to net-
> > next to expedite it.
>
> You didn't CC netdev though so it's not visible on their patchwork.

I think we're in luck, looks like my scripts don't care which
pw instance the series is in. Applied to net-next.

> > Kalle can you ack?
>
> Acked-by: Kalle Valo <[email protected]>

Thanks everyone!