summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f7920a7)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
struct device;
struct device_user;
struct device_hotplug_ops;
struct device;
struct device_user;
struct device_hotplug_ops;
typedef int (*device_state_cb)(struct device *, bool up);
typedef int (*device_state_cb)(struct device *, bool up);
bool default_config;
bool wireless;
bool default_config;
bool wireless;
+ struct interface *config_iface;
+
/* set interface up or down */
device_state_cb set_state;
/* set interface up or down */
device_state_cb set_state;
if (!dev || !dev->default_config)
return;
if (!dev || !dev->default_config)
return;
- if (!iface->device_config && !dev->iface_config)
+ if (!iface->device_config &&
+ (!dev->iface_config || dev->config_iface != iface))
+ dev->config_iface = iface;
dev->iface_config = iface->device_config;
device_apply_config(dev, dev->type, iface->config);
}
dev->iface_config = iface->device_config;
device_apply_config(dev, dev->type, iface->config);
}