Search Linux Wireless

Re: pull request: mt76 2021-01-29

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

 



[...]
> 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@xxxxxxxx/
> 
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
> 

Attachment: signature.asc
Description: PGP signature


[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