config_fixup_bridge_vlan_filtering(s, name);
uci_to_blob(&b, s, devtype->config_params);
if (!device_create(name, devtype, b.head)) {
- D(INTERFACE, "Failed to create '%s' device for interface '%s'\n",
+ D(INTERFACE, "Failed to create '%s' device for interface '%s'",
devtype->name, s->e.name);
}
const char *dev_name;
if (!uci_wireless) {
- DPRINTF("No wireless configuration found\n");
+ D(WIRELESS, "No wireless configuration found");
return;
}
wdev = vlist_find(&wireless_devices, dev_name, wdev, node);
if (!wdev) {
- DPRINTF("device %s not found!\n", dev_name);
+ D(WIRELESS, "device %s not found!", dev_name);
continue;
}
return ether_aton(blobmsg_get_string(cur));
}
+int config_get_default_gro(const char *ifname)
+{
+ struct blob_attr *cur;
+
+ if (!board_netdevs)
+ return -1;
+
+ cur = config_find_blobmsg_attr(board_netdevs, ifname, BLOBMSG_TYPE_TABLE);
+ if (!cur)
+ return -1;
+
+ cur = config_find_blobmsg_attr(cur, "gro", BLOBMSG_TYPE_BOOL);
+ if (!cur)
+ return -1;
+
+ return blobmsg_get_bool(cur);
+}
+
+const char *config_get_default_conduit(const char *ifname)
+{
+ struct blob_attr *cur;
+
+ if (!board_netdevs)
+ return NULL;
+
+ cur = config_find_blobmsg_attr(board_netdevs, ifname, BLOBMSG_TYPE_TABLE);
+ if (!cur)
+ return NULL;
+
+ cur = config_find_blobmsg_attr(cur, "conduit", BLOBMSG_TYPE_STRING);
+ if (!cur)
+ return NULL;
+
+ return blobmsg_get_string(cur);
+}
+
static void
config_init_board(void)
{
free(board_netdevs);
board_netdevs = NULL;
- cur = config_find_blobmsg_attr(b.head, "network-device",
+ cur = config_find_blobmsg_attr(b.head, "network_device",
BLOBMSG_TYPE_TABLE);
if (!cur)
return;