[PATCH -next v2] mt76: mt7921: introduce mt7921e support

sean.wang at mediatek.com sean.wang at mediatek.com
Tue Dec 15 08:32:35 EST 2020


From: Sean Wang <sean.wang at mediatek.com>

On Mon, Dec 14, 2020 at 8:56 PM <sean.wang at mediatek.com> wrote:
>>
>> From: Sean Wang <sean.wang at mediatek.com>
>>
>> Introduce support for mt7921e 802.11ax (Wi-Fi 6) 2x2:2SS chipset.
>>
>> Co-developed-by: Lorenzo Bianconi <lorenzo at kernel.org>
>> Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
>> Co-developed-by: Soul Huang <Soul.Huang at mediatek.com>
>> Signed-off-by: Soul Huang <Soul.Huang at mediatek.com>
>> Signed-off-by: Sean Wang <sean.wang at mediatek.com>
>> ---
>> v2:
>>  - Mark the patch as -next
>> ---
>>  drivers/net/wireless/mediatek/mt76/Kconfig    |    1 +
>>  drivers/net/wireless/mediatek/mt76/Makefile   |    1 +
>>  .../net/wireless/mediatek/mt76/mt7921/Kconfig |   10 +
>>  .../wireless/mediatek/mt76/mt7921/Makefile    |    6 +
>>  .../wireless/mediatek/mt76/mt7921/debugfs.c   |  180 ++
>>  .../net/wireless/mediatek/mt76/mt7921/dma.c   |  356 +++
>>  .../wireless/mediatek/mt76/mt7921/eeprom.c    |  247 ++
>>  .../wireless/mediatek/mt76/mt7921/eeprom.h    |  126 +
>>  .../net/wireless/mediatek/mt76/mt7921/init.c  |  482 +++
>>  .../net/wireless/mediatek/mt76/mt7921/mac.c   | 1387 +++++++++
>>  .../net/wireless/mediatek/mt76/mt7921/mac.h   |  367 +++
>>  .../net/wireless/mediatek/mt76/mt7921/main.c  |  854 ++++++
>>  .../net/wireless/mediatek/mt76/mt7921/mcu.c   | 2588 +++++++++++++++++
>>  .../net/wireless/mediatek/mt76/mt7921/mcu.h   |  991 +++++++
>>  .../wireless/mediatek/mt76/mt7921/mt7921.h    |  379 +++
>>  .../net/wireless/mediatek/mt76/mt7921/pci.c   |  209 ++
>>  .../net/wireless/mediatek/mt76/mt7921/regs.h  |  455 +++
>>  17 files changed, 8639 insertions(+)
>
>I'm not likely to review this, but, this is a _huge_ patch, is there a way to split it in easier to digest parts?
>

we will split the series for areas (e.g: dma, mcu, ..) and make sure each patch compile properly.

>[snip]
>
>> +static void
>> +mt7921_mcu_debug_msg_event(struct mt7921_dev *dev, struct sk_buff
>> +*skb) {
>> +       struct mt7921_mcu_rxd *rxd = (struct mt7921_mcu_rxd *)skb->data;
>> +       struct debug_msg {
>> +               __le16 id;
>> +               u8 type;
>> +               u8 flag;
>> +               __le32 value;
>> +               __le16 len;
>> +               u8 content[512];
>> +       } __packed * debug_msg;
>> +       u16 cur_len;
>> +       int i;
>> +
>> +       skb_pull(skb, sizeof(*rxd));
>> +       debug_msg = (struct debug_msg *)skb->data;
>> +
>> +       cur_len = min_t(u16, le16_to_cpu(debug_msg->len), 512);
>> +
>> +       if (debug_msg->type == 0x3) {
>> +               for (i = 0 ; i < cur_len; i++)
>> +                       if (!debug_msg->content[i])
>> +                               debug_msg->content[i] = ' ';
>> +
>> +               trace_printk("%s", debug_msg->content);
>
>Please do not use trace_printk in production code [1,2], it is only meant for debug use. Consider using trace events, or dev_dbg.

ack, we will use dev_dbg instead.

>
>[1] https://elixir.bootlin.com/linux/v5.8/source/kernel/trace/trace.c#L3158
>[2] https://elixir.bootlin.com/linux/v5.8/source/include/linux/kernel.h#L766
>
>> +       }
>> +}
>> +
>


More information about the Linux-mediatek mailing list