linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Felix Fietkau <nbd@nbd.name>
Cc: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH 2/4] mt76: remove wait argument from mt76x02_mcu_calibrate
Date: Fri, 2 Nov 2018 13:56:18 +0100	[thread overview]
Message-ID: <20181102125613.GA5247@redhat.com> (raw)
In-Reply-To: <962e3461-a7cc-14df-bae5-0de2201e90b3@nbd.name>

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 <sgruszka@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	other threads:[~2018-11-02 12:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-26 12:00 [PATCH 0/4] mt76: mcu api clenups Stanislaw Gruszka
2018-10-26 12:00 ` [PATCH 1/4] mt76: remove mcu_msg_alloc Stanislaw Gruszka
2018-10-26 12:00 ` [PATCH 2/4] mt76: remove wait argument from mt76x02_mcu_calibrate Stanislaw Gruszka
2018-11-01 17:29   ` Felix Fietkau
2018-11-02 12:56     ` Stanislaw Gruszka [this message]
2018-11-02 16:07       ` Felix Fietkau
2018-10-26 12:00 ` [PATCH 3/4] mt76: remove wait argument from mt76x02_mcu_function_select Stanislaw Gruszka
2018-10-26 12:00 ` [PATCH 4/4] mt76: remove wait argument from mt76x02_mcu_set_radio_state Stanislaw Gruszka
2018-11-05 16:57 ` [PATCH 0/4] mt76: mcu api clenups Felix Fietkau

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=20181102125613.GA5247@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 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).