Search Linux Wireless

Re: [PATCH 2/2] mt76x0: phy: fix mt76x0_temp_sensor routine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
>  .../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



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux