Signed-off-by: Felix Fietkau <nbd@openwrt.org>
struct device;
struct device_user;
struct device_hotplug_ops;
+struct interface;
typedef int (*device_state_cb)(struct device *, bool up);
bool default_config;
bool wireless;
+ struct interface *config_iface;
+
/* set interface up or down */
device_state_cb set_state;
if (!dev || !dev->default_config)
return;
- if (!iface->device_config && !dev->iface_config)
+ if (!iface->device_config &&
+ (!dev->iface_config || dev->config_iface != iface))
return;
+ dev->config_iface = iface;
dev->iface_config = iface->device_config;
device_apply_config(dev, dev->type, iface->config);
}