if (bst->dev.active)
bridge_enable_member(bm);
else if (bst->n_present == 1)
- set_device_present(&bst->dev, true);
+ device_set_present(&bst->dev, true);
break;
case DEV_EVENT_REMOVE:
bm->present = false;
bm->bst->n_present--;
if (bst->n_present == 0)
- set_device_present(&bst->dev, false);
+ device_set_present(&bst->dev, false);
break;
default:
if (!bst->n_present) {
/* initialization of all member interfaces failed */
system_bridge_delbr(&bst->dev);
- set_device_present(&bst->dev, false);
+ device_set_present(&bst->dev, false);
return -ENOENT;
}
avl_delete(&devices, &dev->avl);
}
-void set_device_present(struct device *dev, bool state)
+void device_set_present(struct device *dev, bool state)
{
if (dev->present == state)
return;
void device_add_user(struct device_user *dep, struct device *iface);
void device_remove_user(struct device_user *dep);
-void set_device_present(struct device *dev, bool state);
+void device_set_present(struct device *dev, bool state);
int claim_device(struct device *dev);
void release_device(struct device *dev);
int check_device_state(struct device *dev);
dev->ifindex = 0;
if (!strcmp(dev->ifname, "eth0"))
- set_device_present(dev, true);
+ device_set_present(dev, true);
return 0;
}
return UBUS_STATUS_NOT_FOUND;
if (!add || (tb[DEV_FORCE] && blobmsg_get_u8(tb[DEV_FORCE])))
- set_device_present(dev, add);
+ device_set_present(dev, add);
else
check_device_state(dev);
vldev = container_of(dep, struct vlan_device, dep);
switch(ev) {
case DEV_EVENT_ADD:
- set_device_present(&vldev->dev, true);
+ device_set_present(&vldev->dev, true);
break;
case DEV_EVENT_REMOVE:
- set_device_present(&vldev->dev, false);
+ device_set_present(&vldev->dev, false);
break;
default:
break;