Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2975157pxu; Mon, 14 Dec 2020 16:36:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/DcH4afXUVjWbLMTgggFvm/HILVzfa3VrdASgn1rCHMWWnWB9CmL4mVX5+jlkMLxQezAq X-Received: by 2002:a17:906:f894:: with SMTP id lg20mr24539875ejb.348.1607992568987; Mon, 14 Dec 2020 16:36:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607992568; cv=none; d=google.com; s=arc-20160816; b=TVhCqydEroMhL6oPmiaMj/cJkZpSk+PttiN3iXWL7Gze+dpk3y2R+JtXa6aQA2v22q G+gMCUZvoguIuf1otC6MR4O+jyTmvcQOpxtYomADiIgdi42xpjpE6reVoFo3Z+iwm6+M CdrzuDmvMKVKI37CbFeFhKKpNz7WeITFuquA3pSBd02tocKY+rA2KBrgPhkzM747Bye4 +b3ftJKiOlTjFbghooDdho/m4ThzmEIHpgfdK4GABYn53VnfZy5jvINFjarYn/202fq7 bI1IuX1F0KkyezRVPPsikkFsszz0gxH1xrhO51cB1DmPxW+Fy69UR7P2WGK0ksFLFPYv mDjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=2ttijJTfODj0Zw+PUd0CH6vbnNY+xpMxFmKzapopdOo=; b=lLWnq7RgcbglGPSKW+qQfm/XPj52OwBkdCipEM9wsRVXJtQAp3MyGwMYxLybEOBdBE I0QJ+dBv/n6cB694DGu4Mxf7seDysWZDi/Wnrc0nJtawAxRmj1IrB6urZ6ixbGcCYRw0 G6R7H9ix6rvRc1WpfWngN587t78RRx04hv/jOR3lb8VOx2kfDUtdanL6Tc/xfvFJdrkw GZt20jRsjKy2C2dj748p/YB6eRJY+La4LnUgOw09B/R79iOgiO6XwtztkaM8csWSM+60 3kox+Hl+tqI99nz1r5VyvOPNfvg8a6KLEEJrzQNLY1ZnbHmgDQ0OxSIHgut8kGl4VuQD uw8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LhdygB6+; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 97si20201edr.112.2020.12.14.16.35.45; Mon, 14 Dec 2020 16:36:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LhdygB6+; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728753AbgLOAJh (ORCPT + 99 others); Mon, 14 Dec 2020 19:09:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728736AbgLOAJg (ORCPT ); Mon, 14 Dec 2020 19:09:36 -0500 Received: from mail-vk1-xa2e.google.com (mail-vk1-xa2e.google.com [IPv6:2607:f8b0:4864:20::a2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8896FC061793 for ; Mon, 14 Dec 2020 16:08:56 -0800 (PST) Received: by mail-vk1-xa2e.google.com with SMTP id f71so4369259vka.12 for ; Mon, 14 Dec 2020 16:08:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2ttijJTfODj0Zw+PUd0CH6vbnNY+xpMxFmKzapopdOo=; b=LhdygB6+PBVsoDGFWC8aF15Je+KPpnI6r+Rt5Sz9g43Zpp0Xs2L2fC5GSgzqBlXg+S vq8JK7fV829mSoDKbXrHdXTSi+nic/z16m6KRLSEFk2bRFeBQhdFzKNApWYzUoMj6rBt rMViZEL6bvs9tRj0RLKx90ABvNFCjAPqS7G0Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2ttijJTfODj0Zw+PUd0CH6vbnNY+xpMxFmKzapopdOo=; b=bFMh43usBZ5RsG3XmTHnAe6cLJs38OBV5yCzVUv1La1RjOnuAwMrZuDijQZDNlQQM/ oaEF9d96JqmU49+EdWqqxcrbJGLdtkvh+6QPkfIaAnksV80E0UE68IKAhZmCGEvA8xBJ wRRXcxA3EoGWHRqNWuL2WVLfDTFYQCk+gfe5iia8WFAUuYZmodj99a5344dYZ5Ayzu76 qwEIm2nyIdK2sSBZpDwkklrrQqPWUQTP2/55/Oo0FyhQLLSoOTEAYHj5OJvx4HmjWNUZ BJcewW+6h0LZO+BS4vv73wMa5XDKjSBLK4CEo24dV3V2JK9r3OHmCT9T3EsYbGZUtMOU WIoQ== X-Gm-Message-State: AOAM531jRXrVZct6PQieLYZK1MdT4rt8LcUJVgHVpXR1/mYxY043E8l7 sbdZNXPzAbJSiVAD/h6jgOUQf3dEzRysMGJZGgEdSA== X-Received: by 2002:ac5:c5b5:: with SMTP id f21mr26908136vkl.13.1607990935654; Mon, 14 Dec 2020 16:08:55 -0800 (PST) MIME-Version: 1.0 References: <4f0b3800cd92e1a45a1a47598174e3ff8e944204.1607949735.git.objelf@gmail.com> In-Reply-To: <4f0b3800cd92e1a45a1a47598174e3ff8e944204.1607949735.git.objelf@gmail.com> From: Nicolas Boichat Date: Tue, 15 Dec 2020 08:08:44 +0800 Message-ID: Subject: Re: [PATCH -next v2] mt76: mt7921: introduce mt7921e support To: Sean Wang Cc: nbd@nbd.name, lorenzo.bianconi@redhat.com, Ryder Lee , robin.chiu@mediatek.com, ch.yeh@mediatek.com, Eric.Liang@mediatek.com, "open list:NETWORKING DRIVERS (WIRELESS)" , YN.Chen@mediatek.com, "moderated list:ARM/Mediatek SoC support" , Soul.Huang@mediatek.com, Lorenzo Bianconi , Steven Rostedt Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Mon, Dec 14, 2020 at 8:56 PM wrote: > > From: Sean Wang > > Introduce support for mt7921e 802.11ax (Wi-Fi 6) 2x2:2SS chipset. > > Co-developed-by: Lorenzo Bianconi > Signed-off-by: Lorenzo Bianconi > Co-developed-by: Soul Huang > Signed-off-by: Soul Huang > Signed-off-by: Sean Wang > --- > 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? [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. [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 > + } > +} > + > -- > 2.25.1 > _______________________________________________ > Linux-mediatek mailing list > Linux-mediatek@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-mediatek