From 938752e3bd4c524aa518fc247d186ebdf282e1c0 Mon Sep 17 00:00:00 2001
From: Markus Gothe <markus.gothe@genexis.eu>
Date: Mon, 27 Jan 2025 14:59:32 +0100
Subject: [PATCH] econet: Fix ifstats for broadcast and multicast.

(cherry picked from commit 243de75f54baa44a7c1aec2460e07478c4479ed9)
---
 econet/ecnt_prvt.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/econet/ecnt_prvt.c b/econet/ecnt_prvt.c
index 2c42a03..3a263b4 100644
--- a/econet/ecnt_prvt.c
+++ b/econet/ecnt_prvt.c
@@ -147,8 +147,8 @@ static void fill_stats_tx_from_gdma(struct eth_stats *stats, struct eth_rmon_sta
 		stats->tx_packets = tx_stats->frame_cnt;
 		stats->tx_errors = 0;
 		stats->tx_ucast_packets = tx_stats->frame_cnt - (tx_stats->broadcast + tx_stats->multicast);
-		stats->tx_mcast_packets = tx_stats->broadcast;
-		stats->tx_bcast_packets = tx_stats->multicast;
+		stats->tx_bcast_packets = tx_stats->broadcast;
+		stats->tx_mcast_packets = tx_stats->multicast;
 		stats->tx_discard_packets = tx_stats->drop_cnt;
 	}
 
@@ -179,8 +179,8 @@ static void fill_stats_rx_from_gdma(struct eth_stats *stats, struct eth_rmon_sta
 		stats->rx_packets = rx_stats->frame_cnt;
 		stats->rx_errors = rx_stats->crc + rx_stats->jabber + rx_stats->fragment + rx_stats->undersize + rx_stats->oversize;
 		stats->rx_ucast_packets = rx_stats->frame_cnt - (rx_stats->broadcast + rx_stats->multicast);
-		stats->rx_mcast_packets = rx_stats->broadcast;
-		stats->rx_bcast_packets = rx_stats->multicast;
+		stats->rx_bcast_packets = rx_stats->broadcast;
+		stats->rx_mcast_packets = rx_stats->multicast;
 		stats->rx_discard_packets = rx_stats->drop_cnt;
 		stats->rx_unknown_packets = 0;
 	}
-- 
GitLab