linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iwlwifi: fw: don't send GEO_TX_POWER_LIMIT command to FW version 29
@ 2019-10-08  6:05 You-Sheng Yang
  2019-10-08  7:17 ` Luciano Coelho
  0 siblings, 1 reply; 3+ messages in thread
From: You-Sheng Yang @ 2019-10-08  6:05 UTC (permalink / raw)
  To: Johannes Berg, Emmanuel Grumbach, Luca Coelho,
	Intel Linux Wireless, Kalle Valo, David S . Miller,
	Shahar S Matityahu, Sara Sharon, Gil Adam, Mordechay Goodstein,
	Haim Dreyfuss
  Cc: linux-wireless, netdev, linux-kernel

Follow-up for commit fddbfeece9c7 ("iwlwifi: fw: don't send
GEO_TX_POWER_LIMIT command to FW version 36"). There is no
GEO_TX_POWER_LIMIT command support for all revisions of FW version
29, either.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204151
Signed-off-by: You-Sheng Yang <vicamo.yang@canonical.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index 32a5e4e5461f..dbba616c19de 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -889,14 +889,14 @@ static bool iwl_mvm_sar_geo_support(struct iwl_mvm *mvm)
 	 * firmware versions.  Unfortunately, we don't have a TLV API
 	 * flag to rely on, so rely on the major version which is in
 	 * the first byte of ucode_ver.  This was implemented
-	 * initially on version 38 and then backported to29 and 17.
+	 * initially on version 38 and then backported to 29 and 17.
 	 * The intention was to have it in 36 as well, but not all
 	 * 8000 family got this feature enabled.  The 8000 family is
 	 * the only one using version 36, so skip this version
-	 * entirely.
+	 * entirely. All revisions of -29 fw still don't have
+	 * GEO_TX_POWER_LIMIT supported yet.
 	 */
 	return IWL_UCODE_SERIAL(mvm->fw->ucode_ver) >= 38 ||
-	       IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 29 ||
 	       IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 17;
 }
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] iwlwifi: fw: don't send GEO_TX_POWER_LIMIT command to FW version 29
  2019-10-08  6:05 [PATCH] iwlwifi: fw: don't send GEO_TX_POWER_LIMIT command to FW version 29 You-Sheng Yang
@ 2019-10-08  7:17 ` Luciano Coelho
  2019-10-09  3:01   ` You-Sheng Yang
  0 siblings, 1 reply; 3+ messages in thread
From: Luciano Coelho @ 2019-10-08  7:17 UTC (permalink / raw)
  To: You-Sheng Yang, Johannes Berg, Emmanuel Grumbach,
	Intel Linux Wireless, Kalle Valo, David S . Miller,
	Shahar S Matityahu, Sara Sharon, Gil Adam, Mordechay Goodstein,
	Haim Dreyfuss
  Cc: linux-wireless, netdev, linux-kernel

On Tue, 2019-10-08 at 14:05 +0800, You-Sheng Yang wrote:
> Follow-up for commit fddbfeece9c7 ("iwlwifi: fw: don't send
> GEO_TX_POWER_LIMIT command to FW version 36"). There is no
> GEO_TX_POWER_LIMIT command support for all revisions of FW version
> 29, either.
> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204151
> Signed-off-by: You-Sheng Yang <vicamo.yang@canonical.com>
> ---
>  drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> index 32a5e4e5461f..dbba616c19de 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> @@ -889,14 +889,14 @@ static bool iwl_mvm_sar_geo_support(struct iwl_mvm *mvm)
>  	 * firmware versions.  Unfortunately, we don't have a TLV API
>  	 * flag to rely on, so rely on the major version which is in
>  	 * the first byte of ucode_ver.  This was implemented
> -	 * initially on version 38 and then backported to29 and 17.
> +	 * initially on version 38 and then backported to 29 and 17.
>  	 * The intention was to have it in 36 as well, but not all
>  	 * 8000 family got this feature enabled.  The 8000 family is
>  	 * the only one using version 36, so skip this version
> -	 * entirely.
> +	 * entirely. All revisions of -29 fw still don't have
> +	 * GEO_TX_POWER_LIMIT supported yet.
>  	 */
>  	return IWL_UCODE_SERIAL(mvm->fw->ucode_ver) >= 38 ||
> -	       IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 29 ||
>  	       IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 17;
>  }

Thanks for the patch!

But I have investigated this (even) further and now I see that 3168
doesn't have this command, but 7265D does.  The latter also uses -29,
so we can't blindly disable all -29 versions.

Can you try this instead?

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index 0d2229319261..38d89ee9bd28 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -906,8 +906,10 @@ static bool iwl_mvm_sar_geo_support(struct iwl_mvm
*mvm)
         * entirely.
         */
        return IWL_UCODE_SERIAL(mvm->fw->ucode_ver) >= 38 ||
-              IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 29 ||
-              IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 17;
+              IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 17 ||
+              (IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 29 &&
+               (mvm->trans->hw_rev &
+                CSR_HW_REV_TYPE_MSK) == CSR_HW_REV_TYPE_7265D);
 }
 
 int iwl_mvm_get_sar_geo_profile(struct iwl_mvm *mvm)


--
Cheers,
Luca.


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] iwlwifi: fw: don't send GEO_TX_POWER_LIMIT command to FW version 29
  2019-10-08  7:17 ` Luciano Coelho
@ 2019-10-09  3:01   ` You-Sheng Yang
  0 siblings, 0 replies; 3+ messages in thread
From: You-Sheng Yang @ 2019-10-09  3:01 UTC (permalink / raw)
  To: Luciano Coelho
  Cc: Johannes Berg, Emmanuel Grumbach, Intel Linux Wireless,
	Kalle Valo, David S . Miller, Shahar S Matityahu, Sara Sharon,
	Gil Adam, Mordechay Goodstein, Haim Dreyfuss, linux-wireless,
	netdev, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 3035 bytes --]

Tested and commented on the issue page. Thank you for the correction.

--
Cheers,
You-Sheng Yang

On 2019-10-08 15:17, Luciano Coelho wrote:
> On Tue, 2019-10-08 at 14:05 +0800, You-Sheng Yang wrote:
>> Follow-up for commit fddbfeece9c7 ("iwlwifi: fw: don't send
>> GEO_TX_POWER_LIMIT command to FW version 36"). There is no
>> GEO_TX_POWER_LIMIT command support for all revisions of FW version
>> 29, either.
>>
>> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204151
>> Signed-off-by: You-Sheng Yang <vicamo.yang@canonical.com>
>> ---
>>  drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
>> index 32a5e4e5461f..dbba616c19de 100644
>> --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
>> +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
>> @@ -889,14 +889,14 @@ static bool iwl_mvm_sar_geo_support(struct iwl_mvm *mvm)
>>  	 * firmware versions.  Unfortunately, we don't have a TLV API
>>  	 * flag to rely on, so rely on the major version which is in
>>  	 * the first byte of ucode_ver.  This was implemented
>> -	 * initially on version 38 and then backported to29 and 17.
>> +	 * initially on version 38 and then backported to 29 and 17.
>>  	 * The intention was to have it in 36 as well, but not all
>>  	 * 8000 family got this feature enabled.  The 8000 family is
>>  	 * the only one using version 36, so skip this version
>> -	 * entirely.
>> +	 * entirely. All revisions of -29 fw still don't have
>> +	 * GEO_TX_POWER_LIMIT supported yet.
>>  	 */
>>  	return IWL_UCODE_SERIAL(mvm->fw->ucode_ver) >= 38 ||
>> -	       IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 29 ||
>>  	       IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 17;
>>  }
> 
> Thanks for the patch!
> 
> But I have investigated this (even) further and now I see that 3168
> doesn't have this command, but 7265D does.  The latter also uses -29,
> so we can't blindly disable all -29 versions.
> 
> Can you try this instead?
> 
> diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> index 0d2229319261..38d89ee9bd28 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
> @@ -906,8 +906,10 @@ static bool iwl_mvm_sar_geo_support(struct iwl_mvm
> *mvm)
>          * entirely.
>          */
>         return IWL_UCODE_SERIAL(mvm->fw->ucode_ver) >= 38 ||
> -              IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 29 ||
> -              IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 17;
> +              IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 17 ||
> +              (IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 29 &&
> +               (mvm->trans->hw_rev &
> +                CSR_HW_REV_TYPE_MSK) == CSR_HW_REV_TYPE_7265D);
>  }
>  
>  int iwl_mvm_get_sar_geo_profile(struct iwl_mvm *mvm)
> 
> 
> --
> Cheers,
> Luca.
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-09  3:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-08  6:05 [PATCH] iwlwifi: fw: don't send GEO_TX_POWER_LIMIT command to FW version 29 You-Sheng Yang
2019-10-08  7:17 ` Luciano Coelho
2019-10-09  3:01   ` You-Sheng Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).