From patchwork Thu Dec 14 00:09:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 13492143 X-Patchwork-Delegate: kuba@kernel.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="cU/jUGvY" Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2073.outbound.protection.outlook.com [40.107.21.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D1B985 for ; Wed, 13 Dec 2023 16:09:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=flr3GtGgo5jXUGmxtOmUSuzBfxjAh+XqPab5bZZrM4jWhks59CNhrw4WBUzLNN8hXrscLJLVnNFth7vPUWyp55g7kgnUqYix5vbLgyBd+9c+hUeUJ8g6s3xblT0RGArW44D/WO21tuwXBE/N7NOLAW6XrdAyUkJFm9od7PZgY9a6SA0xeRYBRUK+X+g/0d6IZmxcOHtWUmkwy86HpKhle2sktsgD++86XEg3uSAY/X+Pf7SteR9apwsGqwhiklNLIp0ZXuMRAjKXTuJVgKKvWP7aSDiDMjt+rKtdh6vwN2sU+YLXIRlNP7hFBazNChcqz3VfP68QY3zmL3mXBjK/ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iPNaKI1iLaGBP+ogX5L1GcnJkb9nfi99C1f5jXkLVm4=; b=kz6h82wYZ2NPhCnT1bDo3eqFMcCuW4pRy5kN26HrrNu1wkD2bEpB1T/cS7HFRQiJSAOnBnzII/U+oNYavBlUdNakHoTOEkOHb66BTUEKKeRz/vIeYvXhTpQ7K9eetNZlFKyfXbmZhu7TqRNbqGRzfmNCPsd5SN4izYM5dB5iJfUfQh/Zocep4kefY8CL3wvvE2DExi9BTYikXUs6grk95zem+1Iggl4SBN1QpC418pVmmfuy+zWHtHwXDVlaHty+0m8N8o0XtdO8bmBkRUHgLRbgVmFuIilA4feSfpQZwPKFsvO0HR/F5GB+pCmuJ43+9J8DaeaKyXvzACx13RBCtQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iPNaKI1iLaGBP+ogX5L1GcnJkb9nfi99C1f5jXkLVm4=; b=cU/jUGvYLn9eIQDhjKNEQd+NA2xiHPSknLpBwbQMVlyv0RE8naRTUr5Ix1v/OG5JKLqrmUJPGKZvi6ZICZtsKM3uDd9lS/jrHJ1fVuM/uauwXPrdLssNtPG7BMketi7b6EpJG6vwK8CGqvmrM1NLd4zT+xycksKTzTtmNYk9XXs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) by DB9PR04MB8169.eurprd04.prod.outlook.com (2603:10a6:10:25d::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.28; Thu, 14 Dec 2023 00:09:35 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::dd33:f07:7cfd:afa4]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::dd33:f07:7cfd:afa4%7]) with mapi id 15.20.7091.028; Thu, 14 Dec 2023 00:09:35 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Andrew Lunn , Florian Fainelli Subject: [PATCH net 1/2] net: mscc: ocelot: fix eMAC TX RMON stats for bucket 256-511 and above Date: Thu, 14 Dec 2023 02:09:01 +0200 Message-Id: <20231214000902.545625-1-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: VI1PR06CA0135.eurprd06.prod.outlook.com (2603:10a6:803:a0::28) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|DB9PR04MB8169:EE_ X-MS-Office365-Filtering-Correlation-Id: 9ece0a8c-1d4d-400f-d5a8-08dbfc38f418 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sel6OBx7VxNpgyE4O+lFoymgvYwkRkyb7qwl3oYvN5SciJdBsHbWnNkjy9l8iZ8i/UszIoxclnpFEAhQemo8HJwJUWDbTc2qKCyGLcmj9Fe4x0f8FV5q5ozX8OF7G6HJ+0cXKHlE+h+Vg6DCbPQyii71+3pqnQvBarw9j5RDOqovD1HirhvH85ynY7rB+AmRO3VjdyHH9L894ZYovfXjPWMp0fw1tCIXOrg0ge9Hjk3XU3s3IGPq/wtdq+7fmwn55dI8WQkemOGvwNGXd5V/QE4N46KaHHqFb4v2SV9QKQXDMWkbdkvC7J2MyuIj+okKNcfZ0W966Zd7GlyNZOH9MkUiUnYI8j96oEsOzxhLzPH7ivxQ1uA6kbXrwJTSg30N82u7tJznbwHAVNXchNMXSVM564UDkLsgnR1+8KtQJKvqa5Hl1NZjEKOQtSNdco+LieL6F0uViFccdWTSVel7bj8U0t68PLwERJb8Uwwcdc7KaMI6lQdge7xVeFwRBt/Drs2QUINjA6hy3eeNymwPXKjUocw1H4C5t2U+MDNQk4+UfF1Gd9tC7ulb+vQJKCdtPvwN64poJBX8NGZmz/+YD5fhEkLGRt2FgYEetNWngF8= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB6452.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(346002)(366004)(396003)(39860400002)(376002)(230922051799003)(186009)(64100799003)(451199024)(1800799012)(83380400001)(2616005)(6512007)(1076003)(26005)(38100700002)(8676002)(8936002)(4326008)(316002)(2906002)(44832011)(5660300002)(966005)(6486002)(478600001)(41300700001)(6506007)(6666004)(52116002)(6916009)(54906003)(66476007)(66946007)(66556008)(38350700005)(36756003)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: DSo1y+G39wSkeXz9fpjzuRUoFm3ffX+hENWO9uNpNuAyLf2R/STe0XIkSbleAT4vWXkhHcZ1UY7GKpryjliK3kSXWfNxGMa2ChkP1BEApMyu2AWvMvAsESef/KZxIEaL5GjCLErU7EHpLVdYwhgfYhdmmTG2LYZ/JEaDfeQwXSK55JHLIyVBQWGEY6U60mHy18hKuHbg+EBYNP23R99bNjm0UiPXuK4ytpKU8p1RpqmfNBnTmAXotg4PCgVFk3D/OXffvWLnN42Lp5VABw+e7Up5MDtq/8+fGkjB9A/Y6rqcas0DqAVy6OIAA38TXh09GWVoSQXkXgPBZ2ZBu/aY7/HH9VrQbqE4IiX2mKQZ1y1VeLcFBBI4lgPNfErbgLdIsN1JGDIf8NIEPWO4pe5l0QxovUzQkkOrmgzbcI536UExvkShqhGWMF/32Vq2tadZGwIyqv8iKLmG2M5zJVYurIfz9CoICJIaeS3RIU8YULkmIL1I4u+x/N0ndkSupBFrj7U9P8dDGDcVgeyWjd37jQ52WStf5ETWv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orOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9ece0a8c-1d4d-400f-d5a8-08dbfc38f418 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2023 00:09:34.9600 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: DiCqDzjs+UovBQXKQ5/aYFl6zKElxfJ6pCBPwDJWclADI3aikszrIQ0RkFFqolkWJHU4VbBRaN+3/ZLHB6reCA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8169 X-Patchwork-Delegate: kuba@kernel.org There is a typo in the driver due to which we report incorrect TX RMON counters for the 256-511 octet bucket and all the other buckets larger than that. Bug found with the selftest at https://patchwork.kernel.org/project/netdevbpf/patch/20231211223346.2497157-9-tobias@waldekranz.com/ Fixes: e32036e1ae7b ("net: mscc: ocelot: add support for all sorts of standardized counters present in DSA") Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli --- drivers/net/ethernet/mscc/ocelot_stats.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mscc/ocelot_stats.c b/drivers/net/ethernet/mscc/ocelot_stats.c index 5c55197c7327..f29fa37263da 100644 --- a/drivers/net/ethernet/mscc/ocelot_stats.c +++ b/drivers/net/ethernet/mscc/ocelot_stats.c @@ -582,10 +582,10 @@ static void ocelot_port_rmon_stats_cb(struct ocelot *ocelot, int port, void *pri rmon_stats->hist_tx[0] = s[OCELOT_STAT_TX_64]; rmon_stats->hist_tx[1] = s[OCELOT_STAT_TX_65_127]; rmon_stats->hist_tx[2] = s[OCELOT_STAT_TX_128_255]; - rmon_stats->hist_tx[3] = s[OCELOT_STAT_TX_128_255]; - rmon_stats->hist_tx[4] = s[OCELOT_STAT_TX_256_511]; - rmon_stats->hist_tx[5] = s[OCELOT_STAT_TX_512_1023]; - rmon_stats->hist_tx[6] = s[OCELOT_STAT_TX_1024_1526]; + rmon_stats->hist_tx[3] = s[OCELOT_STAT_TX_256_511]; + rmon_stats->hist_tx[4] = s[OCELOT_STAT_TX_512_1023]; + rmon_stats->hist_tx[5] = s[OCELOT_STAT_TX_1024_1526]; + rmon_stats->hist_tx[6] = s[OCELOT_STAT_TX_1527_MAX]; } static void ocelot_port_pmac_rmon_stats_cb(struct ocelot *ocelot, int port, From patchwork Thu Dec 14 00:09:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 13492144 X-Patchwork-Delegate: kuba@kernel.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="bC+UwS7z" Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2073.outbound.protection.outlook.com [40.107.21.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F392C9 for ; Wed, 13 Dec 2023 16:09:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AJe0ghVN9a4NyVLd+g0TzO1ArPkY0yAEOiqRyLnG9hmheuEnZVWd5lscBd0tFzDWEzlbv13lWa7ldr2KSJ27+p9cb6egPWn3wCBoAM1awl7QWogTscEsWyFMe/QuMSOrig4/xm2/5aOmGtnWfXUjQs4YzFPcNZVu+UwTorEm/zWBm4gjXdHO4GkmGO+4aLGoTOqJhpmle3hTONIM03oihw0vkLIXqHyAKw3zcrypLXJSdeuEvBCrwE/5nZAsx/Cw9MLRCBEltA+LLCiGfabN7zYOPQfWR9EtoWuXY8QIghJPpWg692Ddg0s3ocIHUmluOzOO0jx2bQKTUg/kVBSm3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DoEThFXlLX3HzWVvNO7YKv5/Q90o0N0Kk0CUhC+DbdU=; b=R6/wXiVgbMyVKY11EILg2+8v9VanEYw4c0fSrMvph/rTu7wXfBB5UoJ0/7xeBhqQAc1MHnMLZ3rvw5wIx6OQrmsnROPehaWNNZwmSnWcKvIF9Q8e2kGoKPexqcSj+ezEIZZdBDcIKZG15hdwmHk3kS3IKhCt2PNGk225x5Ak4sA6RlZHnJQh5vfRVDW5K827liNIvsaAm+Rle0Bb1QCBXexyP6uKacz9h/6U76QQ1hTgS//cGpK4xyfMyrH8fdzgEvr92/gaS1P49UqisrGFkto3GWgqlxHmdm1mO4H4sCl8pq75XiwsaXvbmMWO545HMxJILxTt+LwxVZEgAhbGeg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DoEThFXlLX3HzWVvNO7YKv5/Q90o0N0Kk0CUhC+DbdU=; b=bC+UwS7z0G7fYLaqmvS79vSwNro2KcJQbBuU3KeNUwfdS/JS+jV+f+7IcmSMjkVRvAkZgh4e4ruOAkfglY66t3TNyFpuGI5OfDC4dFEUo34713FgptINJQmAeW+7h8A2ztPkdkMDpL3vCW979RTgPU3ntkheoH4q7b4KQIKO3bQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) by DB9PR04MB8169.eurprd04.prod.outlook.com (2603:10a6:10:25d::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.28; Thu, 14 Dec 2023 00:09:36 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::dd33:f07:7cfd:afa4]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::dd33:f07:7cfd:afa4%7]) with mapi id 15.20.7091.028; Thu, 14 Dec 2023 00:09:36 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Andrew Lunn , Florian Fainelli Subject: [PATCH net 2/2] net: mscc: ocelot: fix pMAC TX RMON stats for bucket 256-511 and above Date: Thu, 14 Dec 2023 02:09:02 +0200 Message-Id: <20231214000902.545625-2-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231214000902.545625-1-vladimir.oltean@nxp.com> References: <20231214000902.545625-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: VI1PR06CA0135.eurprd06.prod.outlook.com (2603:10a6:803:a0::28) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|DB9PR04MB8169:EE_ X-MS-Office365-Filtering-Correlation-Id: 3e4133bb-8e8c-4603-44f1-08dbfc38f4c9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: m4Eqjay61RO2u0NOShMnBcruym/mHG74svh20CXcPyGbKiQpp3q9tnO2HyzMvi1wYyYhF+8m1eTLArgC1lpW16hTpsG65DTjy7sEJbcYV/KOMf66oYpPFcHgMYwqKdPOCsOXO9JHO5jzNhMZP1lH1u9xyOmRBpc2VdVbIIUZnfp8CLGlqRbYUb70EANQCf+ahc4iPROA/MRa8NMVje8zXKAoEtlYjbdvY9S/WceO20t+/YDE4UnrGgC3ySS4OdzPZQcMothMWG11b8V9LzDKvggIOye9nzSfgjLBFOpqu95oaxlg7zOIBdN4tVSLvtfkFTc42NQ/JsF65ts/DlEaGIg4rLwYmbFAEhQNPpI3Ckdp3gVqLcgc0348AF0lvGFV/Qk1Le8xZbgfzy3MBr++kBYYnwRk1NHDsblswagGjephSKCeMqpsfaYV/YwQETiX2MZtEWOoZwNDEHy1E8DaBe83OdZwHuoKB53VFdPHHDOI4cVjE+D5/sAkiyIWzg7BLzGdmdlEYO3E4D97UTWhFv+bs0a+Ir+CHIY7ud7go1HnMZ6h2CmAvHeH5QNwdPltAwey02MK6TMI5QXXSP4oCGDqUA0zkSifW/G31ED64U73SteXCiHxSnVhKidj08dZ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB6452.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(346002)(366004)(396003)(39860400002)(376002)(230922051799003)(186009)(64100799003)(451199024)(1800799012)(83380400001)(2616005)(6512007)(1076003)(26005)(38100700002)(8676002)(8936002)(4326008)(316002)(2906002)(44832011)(5660300002)(6486002)(478600001)(41300700001)(6506007)(6666004)(52116002)(6916009)(54906003)(66476007)(66946007)(66556008)(38350700005)(36756003)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vw8+xCShIxrVPF2CrMxI2F9lE6cZ92uonjG8nQ+788mh7VqFmFdhWLFoUTx4wBKpqQZMxgaTdo8BhgyxoPM5PdLYE0lgHMDZ2B+yLdHh0RoF1arVZVnZ6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xBcap5wB4UJ6xmb93sN0+vP1o2TDlczheEZZ/GBWfK/wuyv5tPyz23SdCs+zowg6pv4QrkJj/qxsql4r5BPGZGVAye6t1jLev+NiVXC1eEx1XqF7Ma44pLrqiQFgaS8VuWo+HrQ455YPXd+QRm7EARrDqWm1Sbc2SAdwpFmAAt8Bp/kO/4HQpdR5PYM9JfVAkrDVb7qrP88TssZ8ypUXry3+3v0GxkmYfOAe0j0de2lxI4wdHwaqpyBxgmhmAN3w7XcOUVlOIxzehfhIjnJj5dV9jX5es0RGPqH2AgqYH303yNfpZwLKQXQenDqo0J8wgYZDDcaRSyOwkWNEmBuhEVmm1P6nacsU5uFCaEQ5X9yRq58LmG8gEWhRKPDh/l+V7rIiHd2ihf0OJ4Lo5x3pSfiYXOzuLKAIbbx+75ZKP2U+/MvNDnZeSmg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3e4133bb-8e8c-4603-44f1-08dbfc38f4c9 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2023 00:09:36.1319 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dlkQsw/o6G7PeZgLdhy2UWw4VL9eE6dvxkIANGw8Cx2MoU1UercoBKds8BGveqLkjRUDSiMIq2yWxPmti+Rn/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8169 X-Patchwork-Delegate: kuba@kernel.org The typo from ocelot_port_rmon_stats_cb() was also carried over to ocelot_port_pmac_rmon_stats_cb() as well, leading to incorrect TX RMON stats for the pMAC too. Fixes: ab3f97a9610a ("net: mscc: ocelot: export ethtool MAC Merge stats for Felix VSC9959") Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli --- drivers/net/ethernet/mscc/ocelot_stats.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mscc/ocelot_stats.c b/drivers/net/ethernet/mscc/ocelot_stats.c index f29fa37263da..c018783757fb 100644 --- a/drivers/net/ethernet/mscc/ocelot_stats.c +++ b/drivers/net/ethernet/mscc/ocelot_stats.c @@ -610,10 +610,10 @@ static void ocelot_port_pmac_rmon_stats_cb(struct ocelot *ocelot, int port, rmon_stats->hist_tx[0] = s[OCELOT_STAT_TX_PMAC_64]; rmon_stats->hist_tx[1] = s[OCELOT_STAT_TX_PMAC_65_127]; rmon_stats->hist_tx[2] = s[OCELOT_STAT_TX_PMAC_128_255]; - rmon_stats->hist_tx[3] = s[OCELOT_STAT_TX_PMAC_128_255]; - rmon_stats->hist_tx[4] = s[OCELOT_STAT_TX_PMAC_256_511]; - rmon_stats->hist_tx[5] = s[OCELOT_STAT_TX_PMAC_512_1023]; - rmon_stats->hist_tx[6] = s[OCELOT_STAT_TX_PMAC_1024_1526]; + rmon_stats->hist_tx[3] = s[OCELOT_STAT_TX_PMAC_256_511]; + rmon_stats->hist_tx[4] = s[OCELOT_STAT_TX_PMAC_512_1023]; + rmon_stats->hist_tx[5] = s[OCELOT_STAT_TX_PMAC_1024_1526]; + rmon_stats->hist_tx[6] = s[OCELOT_STAT_TX_PMAC_1527_MAX]; } void ocelot_port_get_rmon_stats(struct ocelot *ocelot, int port,