On Thu, Nov 01, 2018 at 06:29:01PM +0100, Felix Fietkau wrote:
> On 2018-10-26 14:00, Stanislaw Gruszka wrote:
> > We always wait for CMD_CALIBRATION_OP mcu message, but wait argument is used
> > for do additioanl MT_MCU_COM_REG0 register operations, which are needed
> > for MMIO devices and we can use mt76_is_mmio() check instead of wait 
> > argument.
> > 
> > Signed-off-by: Stanislaw Gruszka <sgrus...@redhat.com>
> With this commit, I hit the WARN_ON on polling the MT_MCU_COM_REG0
> register on mt76x0e. It seems to me that this register polling should be
> moved out of mt76x02 and into a mt76x2 wrapper function.

I think it would be better to just do mt76x2e check like this:

        bool is_mt76x2e = mt76_is_mmio(dev) && is_mt76x2(dev);

        if (is_mt76x2e)
                mt76_rmw(dev, MT_MCU_COM_REG0, BIT(31), 0);

Then we will not have sparate calibration functions for mt76x2e and
mt76x2u, so code could be easier shared between those.

Thanks
Stanislaw



Reply via email to