wireless: dynamically enable/disable virtual interfaces base on network interface...
[project/netifd.git] / extdev.c
index 9eea0c0b3147086e84f2062a83bd6f6c4c897bc2..8d06228170e1c02e6c95e2f4b8bfc245ff96776c 100644 (file)
--- a/extdev.c
+++ b/extdev.c
@@ -134,13 +134,6 @@ netifd_extdev_create(struct extdev_device *edev, struct blob_attr *msg)
                                     NULL, NULL);
 }
 
-static inline int
-netifd_extdev_config_init(struct extdev_device *edev, struct blob_attr *msg)
-{
-       return netifd_extdev_invoke(edev->etype->peer_id, __extdev_methods[METHOD_CONFIG_INIT],
-                                    msg, NULL, NULL);
-}
-
 static inline int
 netifd_extdev_reload(struct extdev_device *edev, struct blob_attr *msg)
 {
@@ -650,7 +643,7 @@ extdev_hotplug_add(struct device *ebr_dev, struct device *ebm_dev, struct blob_a
 }
 
 static int
-extdev_hotplug_remove(struct device *dev, struct device *member)
+extdev_hotplug_remove(struct device *dev, struct device *member, struct blob_attr *vlan)
 {
        struct extdev_bridge *ebr;
        struct extdev_bridge_member *ubm;
@@ -761,7 +754,7 @@ static void
 __buf_add_all(struct blob_attr *attr)
 {
        struct blob_attr *cur;
-       int rem;
+       size_t rem;
 
        blobmsg_for_each_attr(cur, attr, rem)
                blobmsg_add_field(&b, blobmsg_type(cur), blobmsg_name(cur), blobmsg_data(cur),
@@ -949,11 +942,9 @@ __create(const char *name, struct device_type *type, struct blob_attr *config)
 inv_error:
        extdev_invocation_error(ret, __extdev_methods[METHOD_CREATE], name);
 error:
-       device_lock();
        free(edev->dev.config);
        device_cleanup(&edev->dev);
        free(edev);
-       device_unlock();
        netifd_log_message(L_WARNING, "Failed to create %s %s\n", type->name, name);
        return NULL;
 }
@@ -1064,7 +1055,8 @@ error:
 static void
 __bridge_config_init(struct extdev_bridge *ebr)
 {
-       int rem, ret;
+       int ret;
+       size_t rem;
        struct blob_attr *cur;
 
        if (ebr->empty) {
@@ -1109,7 +1101,7 @@ extdev_config_init(struct device *dev)
 }
 
 static void
-extdev_buf_add_list(struct blob_attr *attr, int len, const char *name,
+extdev_buf_add_list(struct blob_attr *attr, size_t len, const char *name,
                     struct blob_buf *buf, bool array)
 {
        struct blob_attr *cur;