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

Fix detection of 'ae_wan' WAN-interface.

parent 6e7216e6
Branches
No related tags found
1 merge request!25Fix detection of 'ae_wan' WAN-interface.
Pipeline #190599 passed
...@@ -67,15 +67,11 @@ int econet_eth_get_stats(const char *ifname, struct eth_stats *stats) ...@@ -67,15 +67,11 @@ int econet_eth_get_stats(const char *ifname, struct eth_stats *stats)
/* Check and fetch stats if the Interface belongs to hsgmii_lan driver */ /* Check and fetch stats if the Interface belongs to hsgmii_lan driver */
if (!hsgmii_lan_prvt_get_port_statistics(ifname, stats, NULL)) { if (!hsgmii_lan_prvt_get_port_statistics(ifname, stats, NULL)) {
return 0; return 0;
} } else if (!strcmp(ifname, "ae_wan")) {
libethernet_err("invalid port name: %s\n", ifname); /* Check and fetch rstats if the Interface belongs to ae_wan driver */
return -1; if (!ae_wan_prvt_get_port_statistics(stats, NULL)) {
} return 0;
}
if (!strcmp(ifname, "ae_wan")) {
/* Check and fetch rstats if the Interface belongs to ae_wan driver */
if (!ae_wan_prvt_get_port_statistics(stats, NULL)) {
return 0;
} }
libethernet_err("error reading stats for interface %s\n", ifname); libethernet_err("error reading stats for interface %s\n", ifname);
...@@ -100,16 +96,11 @@ int econet_eth_get_rmon_stats(const char *ifname, struct eth_rmon_stats *rstats) ...@@ -100,16 +96,11 @@ int econet_eth_get_rmon_stats(const char *ifname, struct eth_rmon_stats *rstats)
/* Check and fetch rstats if the Interface belongs to hsgmii_lan driver */ /* Check and fetch rstats if the Interface belongs to hsgmii_lan driver */
if (!hsgmii_lan_prvt_get_port_statistics(ifname, NULL, rstats)) { if (!hsgmii_lan_prvt_get_port_statistics(ifname, NULL, rstats)) {
return 0; return 0;
} } else if (!strcmp(ifname, "ae_wan")) {
/* Check and fetch rstats if the Interface belongs to ae_wan driver */
libethernet_err("invalid port name: %s\n", ifname); if (!ae_wan_prvt_get_port_statistics(NULL, rstats)) {
return -1; return 0;
} }
if (!strcmp(ifname, "ae_wan")) {
/* Check and fetch rstats if the Interface belongs to ae_wan driver */
if (!ae_wan_prvt_get_port_statistics(NULL, rstats)) {
return 0;
} }
libethernet_err("error reading rmon stats for interface %s\n", ifname); libethernet_err("error reading rmon stats for interface %s\n", ifname);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment