All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Cc: nbd@nbd.name, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 2/2] mt76x0: phy: fix mt76x0_temp_sensor routine
Date: Wed, 10 Oct 2018 11:56:43 +0200	[thread overview]
Message-ID: <20181010095642.GB2856@redhat.com> (raw)
In-Reply-To: <81232baeddb434362a3474842890ee9f316bfd67.1539162246.git.lorenzo.bianconi@redhat.com>

On Wed, Oct 10, 2018 at 11:14:22AM +0200, Lorenzo Bianconi wrote:
> Fix configuration of register 67 on bank0 during temperature
> reading and use mt76_poll utility routine to poll core34
> register. Moreover temperature compensation need to be disabled
> if the device supports tssi compensation.
> This issue has never been hit since temperature reading is not
> actually used by usb code.
> 
> Fixes: 10de7a8b4ab9 ("mt76x0: phy files")
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
> ---
>  .../net/wireless/mediatek/mt76/mt76x0/phy.c   | 43 +++++++++----------
>  1 file changed, 20 insertions(+), 23 deletions(-)
> 
> diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c
> index 29bc4e4623cd..e9254452c7f5 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c
> @@ -763,48 +763,41 @@ void mt76x0_agc_restore(struct mt76x02_dev *dev)
>  	mt76_rmw_field(dev, MT_BBP(AGC, 8), MT_BBP_AGC_GAIN, dev->agc_save);
>  }
>  
> -static void mt76x0_temp_sensor(struct mt76x02_dev *dev)
> +static int mt76x0_temp_sensor(struct mt76x02_dev *dev, int *temp)
<snip>

>  static void mt76x0_dynamic_vga_tuning(struct mt76x02_dev *dev)
> @@ -832,7 +825,11 @@ static void mt76x0_phy_calibrate(struct work_struct *work)
>  					       cal_work.work);
>  
>  	mt76x0_dynamic_vga_tuning(dev);
> -	mt76x0_temp_sensor(dev);
> +	if (!mt76x0_tssi_enabled(dev)) {
> +		int temp;
> +
> +		mt76x0_temp_sensor(dev, &temp);

Why this &temp is needed ? Preasumble it will be used in the future,
but maybe you could at least add dev_dbg() to print it's value?

Thanks
Stanislaw

  reply	other threads:[~2018-10-10  9:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10  9:14 [PATCH 0/2] fix temperature compensation for mt76x0 Lorenzo Bianconi
2018-10-10  9:14 ` [PATCH 1/2] mt76x0: eeprom: introduce mt76x0_tssi_enabled routine Lorenzo Bianconi
2018-10-10  9:14 ` [PATCH 2/2] mt76x0: phy: fix mt76x0_temp_sensor routine Lorenzo Bianconi
2018-10-10  9:56   ` Stanislaw Gruszka [this message]
2018-10-10 10:09     ` Lorenzo Bianconi

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=20181010095642.GB2856@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=nbd@nbd.name \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.