Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3371296pxu; Tue, 15 Dec 2020 05:37:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJzcGgMtwIycksNGTVia4Yy4BChZXjdEqohJDjJmqovsKFeDbMQyZa2C+T9I+1XReKa+pwfU X-Received: by 2002:a17:906:d784:: with SMTP id pj4mr26215112ejb.360.1608039444308; Tue, 15 Dec 2020 05:37:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608039444; cv=none; d=google.com; s=arc-20160816; b=AsPCafuwKnmZz2QyEjiYUehMHzEZDLRjn9nMHa1zjHXhfVXnpANXBCpgJ9lbDwP5hP oOGn3MmwMoJqXQFbTrN8bIDsw2heb5n7kxCjTeoJ9cja/wut7RHea01vUkoW7M6I4RUo z7Ym323pF+dETN8A99cqlc72A/PLAja7P2KLd+Zc5sYxcPhbmGKXi0tjYcxU+TNhLhmj htu/XPTlHi+A3CrSYpW/lmP4ikf0sCp/xWlxjX76h9qn+9tM99KxGTb7woxl76ZYnGcg rjPKuMCxW8Inm3+gRYoCPw/tB74MaIPTmh3e3wWiSEujzCu6GleGhhN8yFXhW+BrOlcP RA1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=vYQFcjO12POmFT9wrNS5181eSUUQqTJsINR7W3CKPig=; b=EEQ1L1dnvBwSYDKcfRfSK2A1thu060H7uMaVvjl1iWDXIAWQdF2gKFfPJoSK6brg9D fuSltNgVvrHPpEWQLNYJ47BGziw85IKkHVf+Xm7bIQocjAhrMaWnvarqib4iq5hkWwwZ nzKtWm0yK0l0q1Rk4eM8kQ/3/6+zn2A+x084NFyBcju2WNOS2gNYrv64qxSS8i6T8Jk3 mRm8e+cdv9f9ksscCRcIcYgbVd8tcRTpm7HpvTG3dD8xhuI+5h9j0BjelulReD21D+uR tBRsLSEqC/2JntdIJs4UZd+WI+jkriYrlQh0K3WptxukxI1O/ir8GUJwwOmHT6UaCuL0 6HhQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ck9si818785edb.586.2020.12.15.05.36.45; Tue, 15 Dec 2020 05:37:24 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726844AbgLONdg (ORCPT + 99 others); Tue, 15 Dec 2020 08:33:36 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:37146 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726266AbgLONd0 (ORCPT ); Tue, 15 Dec 2020 08:33:26 -0500 X-UUID: 9b17ef357ac04b6e84b5f4d5ba5043f8-20201215 X-UUID: 9b17ef357ac04b6e84b5f4d5ba5043f8-20201215 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1249573677; Tue, 15 Dec 2020 21:32:39 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 15 Dec 2020 21:32:37 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 15 Dec 2020 21:32:38 +0800 From: To: CC: , , , , , , , , , , Subject: Re: [PATCH -next v2] mt76: mt7921: introduce mt7921e support Date: Tue, 15 Dec 2020 21:32:35 +0800 Message-ID: <1608039155-29313-1-git-send-email-sean.wang@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: E16242EE3AAC3FA2620671A2FC26BB456ECD5CE05658212073630134F05869002000:8 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Sean Wang 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? > 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 > >> + } >> +} >> + >