mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
T#8940: Device.Ethernet.Link. doesn't show correct MAC Address and Status when...
This commit is contained in:
parent
2d1be22c3c
commit
4ef5f49dda
2 changed files with 9 additions and 2 deletions
|
|
@ -1081,6 +1081,7 @@ static int get_EthernetLink_Status(char *refparam, struct dmctx *ctx, void *data
|
|||
dmuci_get_value_by_section_string((struct uci_section *)data, "section_name", &interface_name);
|
||||
s = get_origin_section_from_config("network", "interface", interface_name);
|
||||
dmuci_get_value_by_section_string(s, "device", &dev_name);
|
||||
get_net_iface_sysfs(interface_name, "address", value);
|
||||
return get_net_device_status(dev_name, value);
|
||||
}
|
||||
|
||||
|
|
@ -1313,8 +1314,10 @@ static int set_EthernetLink_LowerLayers(char *refparam, struct dmctx *ctx, void
|
|||
|
||||
static int get_EthernetLink_MACAddress(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "mac", value);
|
||||
return 0;
|
||||
char *interface_name = NULL;
|
||||
|
||||
dmuci_get_value_by_section_string((struct uci_section *)data, "section_name", &interface_name);
|
||||
return get_net_iface_sysfs(interface_name, "address", value);
|
||||
}
|
||||
|
||||
static int get_EthernetLinkStats_BytesSent(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
|
|
|
|||
|
|
@ -1441,6 +1441,10 @@ static int set_IPInterface_LowerLayers(char *refparam, struct dmctx *ctx, void *
|
|||
uci_foreach_option_eq_safe("network", "interface", "device", dev_buf, stmp, s) {
|
||||
dmuci_delete_by_section(s, NULL, NULL);
|
||||
}
|
||||
|
||||
// Check if there is an dmmap link section that has the same device ==> if yes, update section name
|
||||
get_dmmap_section_of_config_section_eq("dmmap", "link", "device", dev_buf, &s);
|
||||
dmuci_set_value_by_section_bbfdm(s, "section_name", section_name((struct uci_section *)data));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue