Skip to content
Snippets Groups Projects
Commit be00aa9b authored by Markus Gothe's avatar Markus Gothe :ok_hand:
Browse files

econet: Handle unbound HSGMII LAN interfaces.

parent cc72f5ab
Branches
No related tags found
1 merge request!19econet: Handle unbound HSGMII LAN interfaces.
Pipeline #167488 passed
...@@ -212,6 +212,7 @@ int hsgmii_lan_prvt_get_port_statistics(char *ifname, struct eth_stats *stats, s ...@@ -212,6 +212,7 @@ int hsgmii_lan_prvt_get_port_statistics(char *ifname, struct eth_stats *stats, s
if (!strncmp(driver_name, DRIVER_NAME, DRIVER_NAME_LEN)) { if (!strncmp(driver_name, DRIVER_NAME, DRIVER_NAME_LEN)) {
int i = 0, hsgmii_index = -1; int i = 0, hsgmii_index = -1;
const char *hsgmii_iftype; const char *hsgmii_iftype;
char cmdbuf[512] = {0};
for (; i < ARRAY_SIZE(hsgmii_lookup_tbl); i++) { for (; i < ARRAY_SIZE(hsgmii_lookup_tbl); i++) {
int j = 0; int j = 0;
...@@ -235,6 +236,11 @@ int hsgmii_lan_prvt_get_port_statistics(char *ifname, struct eth_stats *stats, s ...@@ -235,6 +236,11 @@ int hsgmii_lan_prvt_get_port_statistics(char *ifname, struct eth_stats *stats, s
memset(&tx_stats, 0, sizeof(ECNT_FEMGR_GDMA2_TX_STATISTICS)); memset(&tx_stats, 0, sizeof(ECNT_FEMGR_GDMA2_TX_STATISTICS));
memset(&rx_stats, 0, sizeof(ECNT_FEMGR_GDMA2_RX_STATISTICS)); memset(&rx_stats, 0, sizeof(ECNT_FEMGR_GDMA2_RX_STATISTICS));
/* Handle unbound interface statistics */
chrCmd(cmdbuf, sizeof(cmdbuf), "cat /proc/tc3162/%s_rebind | awk '{ print $3 }'", ifname);
if (cmdbuf[0] != '\0' && strtoul(cmdbuf, NULL, 0) == 1)
return 0;
if (!fe_lib_get_hsgmii_tx_statistics(&tx_stats, hsgmii_index)) { if (!fe_lib_get_hsgmii_tx_statistics(&tx_stats, hsgmii_index)) {
fill_stats_tx_from_gdma(stats, rstats, &tx_stats); fill_stats_tx_from_gdma(stats, rstats, &tx_stats);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment