linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 05/11] iwlwifi: acpi: evaluate dsm to enable 5.2 bands in Indonesia
Date: Mon, 11 May 2020 15:28:20 +0300	[thread overview]
Message-ID: <c7db63b14f4950e2719b37f5f17cf45020f33f89.camel@coelho.fi> (raw)
In-Reply-To: <6ce59a07ac639402685303b0954f0dfd6faa3876.camel@coelho.fi>

On Mon, 2020-05-11 at 15:08 +0300, Luca Coelho wrote:
> On Mon, 2020-05-11 at 14:47 +0300, Kalle Valo wrote:
> > Luca Coelho <luca@coelho.fi> writes:
> > 
> > > From: Gil Adam <gil.adam@intel.com>
> > > 
> > > Evaluate the appropriate DSM from ACPI to enable 5.15,5.35 GHz
> > > bands in Indonesia. If enabled send LARI_CONFIG_CHANGE cmd to fw.
> > > 
> > > Signed-off-by: Gil Adam <gil.adam@intel.com>
> > > Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
> > 
> > [...]
> > 
> > > +static int iwl_mvm_eval_dsm_indonesia_5g2(struct iwl_mvm *mvm)
> > > +{
> > > +	int ret = iwl_acpi_get_dsm_u8((&mvm->fwrt)->dev, 0,
> > > +				      DSM_FUNC_ENABLE_INDONESIA_5G2);
> > > +
> > > +	IWL_DEBUG_RADIO(mvm,
> > > +			"Evaluated DSM function ENABLE_INDONESIA_5G2, ret=%d\n",
> > > +			ret);
> > > +
> > > +	return ret == 1 ? 1 : 0;
> > 
> > Ugh. If it's _really_ important not to return anything bigger than 1
> > maybe "!!ret"? Or maybe even just change the function to return boolean?
> 
> Ugh, indeed.  Guess who was not paying attention? Sorry.

Actually the idea was to turn errors (negative numbers) into 0.  But in
any case, a boolean would be better here.  This function was changed in
a later patch snf handles more values, though.

--
Luca.


  reply	other threads:[~2020-05-11 12:28 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08 14:07 [PATCH 00/11] iwlwifi: updates intended for v5.8 2020-05-08 Luca Coelho
2020-05-08 14:07 ` [PATCH 01/11] iwlwifi: set NO_HE if the regulatory domain forbids it Luca Coelho
2020-05-08 16:41   ` Кирилл Луконин
2020-05-08 17:18     ` Luca Coelho
2020-05-08 20:10       ` Кирилл Луконин
2020-05-08 21:13         ` Luca Coelho
2020-05-08 21:21           ` Кирилл Луконин
2020-05-13 10:01           ` Кирилл Луконин
2020-05-08 14:07 ` [PATCH 02/11] iwlwifi: pcie: don't count on the FW to set persistence mode Luca Coelho
2020-05-08 14:07 ` [PATCH 03/11] iwlwifi: pcie: keep trans instead of trans_pcie in iwl_txq Luca Coelho
2020-05-08 14:07 ` [PATCH 04/11] iwlwifi: acpi: support device specific method (DSM) Luca Coelho
2020-05-11 11:43   ` Kalle Valo
2020-05-11 12:05     ` Luca Coelho
2020-05-08 14:07 ` [PATCH 05/11] iwlwifi: acpi: evaluate dsm to enable 5.2 bands in Indonesia Luca Coelho
2020-05-11 11:47   ` Kalle Valo
2020-05-11 12:08     ` Luca Coelho
2020-05-11 12:28       ` Luca Coelho [this message]
2020-05-08 14:07 ` [PATCH 06/11] iwlwifi: pcie: gen3: indicate 8k/12k RB size to device Luca Coelho
2020-05-08 14:07 ` [PATCH 07/11] iwlwifi: move iwl_txq and substructures to a common trans header Luca Coelho
2020-05-08 14:07 ` [PATCH 08/11] iwlwifi: move txq-specific from trans_pcie to common trans Luca Coelho
2020-05-08 14:08 ` [PATCH 09/11] iwlwifi: mvm: fix aux station leak Luca Coelho
2020-05-08 14:08 ` [PATCH 10/11] iwlwifi: mvm: add support for range request version 10 Luca Coelho
2020-05-08 14:08 ` [PATCH 11/11] iwlwifi: bump FW API to 56 for AX devices Luca Coelho
2020-05-29  6:39 [PATCH 00/11] iwlwifi: updates intended for v5.8 2020-05-08-2 Luca Coelho
2020-05-29  6:39 ` [PATCH 05/11] iwlwifi: acpi: evaluate dsm to enable 5.2 bands in Indonesia Luca Coelho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c7db63b14f4950e2719b37f5f17cf45020f33f89.camel@coelho.fi \
    --to=luca@coelho.fi \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).