Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp11662000ybl; Fri, 27 Dec 2019 19:09:55 -0800 (PST) X-Google-Smtp-Source: APXvYqxd7Wv0W49EqHcTj+Y061hJxsRnUcelJHyNmLbcPiK1h02X+VcAhtmElu/gZIgFOPc2rJEC X-Received: by 2002:a05:6830:1755:: with SMTP id 21mr60162265otz.323.1577502595670; Fri, 27 Dec 2019 19:09:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577502595; cv=none; d=google.com; s=arc-20160816; b=PkxtV89G5bCsjM2/sAPV1ak3/wP8v5/E/X3N4Vwzc/DXAeqZssZnwvB1PTiB6ixclC DqKcag04M5yklf5pVUNQJ/+rKtRXPnnz7/mKrhq2F63Wej1wwDhq7MoXdgEcNBkzAWjC f/txDGuSkoc8PHaQRFjTDigXWG0knrhwXex8NEiFdI9HBGJHJRtDVGNNOKTFCt8JrApF a/eKtuTqxCeHr97FbYDwi9TfnPCCWUbmSazB5glG/b+T8jbMIQ4B7CG1/wQkqUQqqGh1 FW+bqYuOvZWbC/a6fFf92+nawwijp6vqF4oj1NpQcm4i5yXN1Gqn/BuYu1S+s+WJKPEt J89Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=59pqvoAaU68tyt/+uUeT/9cG7cvBamrg76YhqKNa9Pk=; b=X0HYMpIrIyEUSF/uzTGoczgaRkca+EnEgnrrJUu2j2gOvLaqouXGO4f+DpHIrbcY2U sW6pRMnDNVrGNTiv/8hHEteZkM68rSsJvGVTP4VbJKu4vnMBSTkCH4LV9p6P7PJkmQwZ uVdljRlcLBNC7XkV+IZXnZgT5+g1LNpOp9TYT/WA+ypM/cWTNup31HD4PeGXte1ZqaAT ViTJ+Dzf/akGpkSE7gks8glKste3pdIc0vrA9jX4FHfVwDnybPzkuHOp9lQaf7inLGNw q0iI+vXXREUTDcDMk+/gI5rKy8VQ5Lt0mblTEKoSDj2Vog1qZqJRFb2FxZUjJv1AEVBx zNFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=hKYZLPZ0; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a10si17170621oia.232.2019.12.27.19.09.45; Fri, 27 Dec 2019 19:09:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=hKYZLPZ0; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726189AbfL1DGe (ORCPT + 99 others); Fri, 27 Dec 2019 22:06:34 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:7642 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726044AbfL1DGe (ORCPT ); Fri, 27 Dec 2019 22:06:34 -0500 X-UUID: 151799096d1f4dd88a029efcc2fa0a77-20191228 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=59pqvoAaU68tyt/+uUeT/9cG7cvBamrg76YhqKNa9Pk=; b=hKYZLPZ05IiBvbdU58ITmdL0+bPNqlclAToDaQCyFAgAjUv67n8H2+vk/fk8K0+1oKGhzZNXE9POA05im4m2kx+paxsZZdsRJlgXLeJBrtNVUIwY2tH2u+PwrLMl6CKjLCZNEYaNyw8+G6e2PoRIH7D8jvCD+wlOfssWVW5fTEg=; X-UUID: 151799096d1f4dd88a029efcc2fa0a77-20191228 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 945095895; Sat, 28 Dec 2019 11:06:30 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sat, 28 Dec 2019 11:06:27 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Sat, 28 Dec 2019 11:05:51 +0800 From: Ryder Lee To: Felix Fietkau , Lorenzo Bianconi CC: Shayne Chen , Roy Luo , Sean Wang , , , Ryder Lee Subject: [PATCH v1 2/3] mt76: mt7615: add per-phy mib statistics Date: Sat, 28 Dec 2019 11:05:11 +0800 Message-ID: X-Mailer: git-send-email 2.18.0 In-Reply-To: <769aba6e014b8e7650c3909d6adb8427c1d5c5ae.1577501739.git.ryder.lee@mediatek.com> References: <769aba6e014b8e7650c3909d6adb8427c1d5c5ae.1577501739.git.ryder.lee@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 2DCC9F50CED6423EB6868D28408D639660D286A3AC266B14C66630E41025135D2000:8 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org VXBkYXRlIHBlci1waHkgbWliIGNvdW50ZXJzIGV2ZXJ5IDUwMG1zLg0KDQpTaWduZWQtb2ZmLWJ5 OiBSeWRl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