On Fri, Oct 12, 2018 at 12:16:20PM +0200, Lorenzo Bianconi wrote:
> Add mt76x0_phy_calirate routine in order to perform
> phy calibration for mt76x0e devices.
<snip>
> @@ -671,9 +713,14 @@ int mt76x0_phy_set_channel(struct mt76x02_dev *dev,
>       /* Vendor driver don't do it */
>       /* mt76x0_phy_set_tx_power(dev, channel, rf_bw_band); */
>  
> -     mt76x0_vco_cal(dev, channel);
> -     if (scan)
> -             mt76x02_mcu_calibrate(dev, MCU_CAL_RXDCOC, 1, false);
> +     if (mt76_is_usb(dev)) {
> +             mt76x0_vco_cal(dev, channel);
> +             if (scan)
> +                     mt76x02_mcu_calibrate(dev, MCU_CAL_RXDCOC, 1,
> +                                           false);
> +     } else {
> +             mt76x0_phy_calibrate(dev, false);
> +     }

Why this should be diffrent for USB and PCI ? RF calibration seems
not to be realted to bus type, so perhaps this should be based on
mt76xx_rev() check?

Thanks
Stanislaw 

Reply via email to