All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: Felix Fietkau <nbd@nbd.name>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: pull request: mt76 2021-01-29
Date: Mon, 8 Feb 2021 12:09:31 +0100	[thread overview]
Message-ID: <20210208110931.GC2593@lore-desk> (raw)
In-Reply-To: <20210208102728.BBBE3C433CA@smtp.codeaurora.org>

[-- Attachment #1: Type: text/plain, Size: 2547 bytes --]

[...]
> b8135057988e mt76: mt7915: simplify mt7915_mcu_send_message routine
> c203dd621780 mt76: mt7915: rework mcu API
> 
> This was not easy to fix. Felix & Lorenzo, please carefully check my resolution
> in the pending branch:

Hi Kalle,

it is not easy to check a patch of a patch :) one comment inline.

Regards,
Lorenzo

> 
> https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git/commit/?h=pending&id=dfe85c17c7c7183e1d409b948fae9d8e545cb25d
> 
> This is the diff output of my resolution:
> 
> diff --cc drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> index e211a2bd4d3c,0296f2aa7997..000000000000
> --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> @@@ -255,10 -248,10 +248,10 @@@ mt7915_mcu_send_message(struct mt76_de
>   {
>         struct mt7915_dev *dev = container_of(mdev, struct mt7915_dev, mt76);
>         struct mt7915_mcu_txd *mcu_txd;
> -       u8 seq, pkt_fmt, qidx;
>  -      enum mt76_txq_id txq;
>  +      enum mt76_mcuq_id qid;
>         __le32 *txd;
>         u32 val;
> +       u8 seq;
>   
>         /* TODO: make dynamic based on msg type */
>         mdev->mcu.timeout = 20 * HZ;
> @@@ -267,22 -260,16 +260,16 @@@
>         if (!seq)
>                 seq = ++dev->mt76.mcu.msg_seq & 0xf;
>   
> -       if (cmd == -MCU_CMD_FW_SCATTER) {
>  -      if (cmd == MCU_CMD(FW_SCATTER)) {
>  -              txq = MT_MCUQ_FWDL;
> ++      if (cmd == MCU_CMD_FW_SCATTER) {

I think it should be MCU_CMD(FW_SCATTER) here instead of MCU_CMD_FW_SCATTER.

>  +              qid = MT_MCUQ_FWDL;
>                 goto exit;
>         }
>   
>         mcu_txd = (struct mt7915_mcu_txd *)skb_push(skb, sizeof(*mcu_txd));
> - 
> -       if (test_bit(MT76_STATE_MCU_RUNNING, &dev->mphy.state)) {
> +       if (test_bit(MT76_STATE_MCU_RUNNING, &dev->mphy.state))
>  -              txq = MT_MCUQ_WA;
>  +              qid = MT_MCUQ_WA;
> -               qidx = MT_TX_MCU_PORT_RX_Q0;
> -               pkt_fmt = MT_TX_TYPE_CMD;
> -       } else {
> +       else
>  -              txq = MT_MCUQ_WM;
>  +              qid = MT_MCUQ_WM;
> -               qidx = MT_TX_MCU_PORT_RX_Q0;
> -               pkt_fmt = MT_TX_TYPE_CMD;
> -       }
>   
>         txd = mcu_txd->txd;
> 
> -- 
> https://patchwork.kernel.org/project/linux-wireless/patch/3eba5570-7cff-f51e-4050-aa0054f98f81@nbd.name/
> 
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2021-02-08 11:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-29 17:31 pull request: mt76 2021-01-29 Felix Fietkau
2021-02-08 10:27 ` Kalle Valo
2021-02-08 11:09   ` Lorenzo Bianconi [this message]
2021-02-08 17:13     ` Kalle Valo
     [not found] ` <20210208102728.F3395C43461@smtp.codeaurora.org>
2021-02-08 11:40   ` Felix Fietkau
2021-02-08 17:10     ` Kalle Valo

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=20210208110931.GC2593@lore-desk \
    --to=lorenzo@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --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.