system-linux: set pending to 0 on ifindex found or error for if_get_master
[project/netifd.git] / wireless.h
index 4539bbc442f0516f5929d47f49de56ebd55d31c8..705972392caec786fedd6c6ac31c09fedb365871 100644 (file)
@@ -44,8 +44,6 @@ struct wireless_device {
 
        struct wireless_driver *drv;
        struct vlist_tree interfaces;
-       struct vlist_tree vlans;
-       struct vlist_tree stations;
        char *name;
 
        struct netifd_process script_task;
@@ -73,8 +71,6 @@ struct wireless_device {
        int retry;
 
        int vif_idx;
-       int vlan_idx;
-       int sta_idx;
 };
 
 struct wireless_interface {
@@ -82,6 +78,8 @@ struct wireless_interface {
        const char *section;
        char *name;
 
+       struct vlist_tree vlans;
+       struct vlist_tree stations;
        struct wireless_device *wdev;
 
        struct blob_attr *config;
@@ -92,8 +90,12 @@ struct wireless_interface {
        struct blob_attr *network_vlan;
        bool proxyarp;
        bool isolate;
+       bool bridge_isolate;
        bool ap_mode;
        int multicast_to_unicast;
+       int vlan_idx;
+       int sta_idx;
+       bool disabled;
 };
 
 struct wireless_vlan {
@@ -101,9 +103,6 @@ struct wireless_vlan {
        const char *section;
        char *name;
 
-       struct wireless_device *wdev;
-       char *vif;
-
        struct blob_attr *config;
        struct blob_attr *data;
 
@@ -112,6 +111,7 @@ struct wireless_vlan {
        struct blob_attr *network_vlan;
        int multicast_to_unicast;
        bool isolate;
+       bool bridge_isolate;
 };
 
 struct wireless_station {
@@ -119,9 +119,6 @@ struct wireless_station {
        const char *section;
        char *name;
 
-       struct wireless_device *wdev;
-       char *vif;
-
        struct blob_attr *config;
        struct blob_attr *data;
 };
@@ -143,12 +140,13 @@ void wireless_device_reconf(struct wireless_device *wdev);
 void wireless_device_status(struct wireless_device *wdev, struct blob_buf *b);
 void wireless_device_get_validate(struct wireless_device *wdev, struct blob_buf *b);
 struct wireless_interface* wireless_interface_create(struct wireless_device *wdev, struct blob_attr *data, const char *section);
-void wireless_vlan_create(struct wireless_device *wdev, char *vif, struct blob_attr *data, const char *section);
-void wireless_station_create(struct wireless_device *wdev, char *vif, struct blob_attr *data, const char *section);
+void wireless_vlan_create(struct wireless_interface *vif, struct blob_attr *data, const char *section);
+void wireless_station_create(struct wireless_interface *vif, struct blob_attr *data, const char *section);
 int wireless_device_notify(struct wireless_device *wdev, struct blob_attr *data,
                           struct ubus_request_data *req);
 
-void wireless_start_pending(void);
+void wireless_check_network_enabled(void);
+void wireless_start_pending(int timeout);
 void wireless_init(void);
 void wireless_device_hotplug_event(const char *name, bool add);