device/network: Use station_is_busy

This commit is contained in:
Denis Kenzior 2018-09-04 16:26:33 -05:00
parent f996bea880
commit 187ea7f5d1
3 changed files with 3 additions and 12 deletions

View File

@ -115,19 +115,12 @@ static bool new_scan_results(uint32_t wiphy_id, uint32_t ifindex, int err,
}
/* TODO: Remove when Station/Device is split */
bool device_is_busy(struct device *device)
static bool device_is_busy(struct device *device)
{
enum station_state state;
if (!device->powered || !device->station)
return false;
state = station_get_state(device->station);
if (state != STATION_STATE_DISCONNECTED &&
state != STATION_STATE_AUTOCONNECT)
return true;
return false;
return station_is_busy(device->station);
}
static void periodic_scan_trigger(int err, void *user_data)

View File

@ -28,8 +28,6 @@ struct netdev;
struct network;
struct device;
bool device_is_busy(struct device *device);
void device_disassociated(struct device *device);
void device_transition_start(struct device *device, struct scan_bss *bss);
void device_set_scan_results(struct device *device, struct l_queue *bss_list,

View File

@ -1008,7 +1008,7 @@ static struct l_dbus_message *network_connect(struct l_dbus *dbus,
l_debug("");
if (device_is_busy(device))
if (station_is_busy(station))
return dbus_error_busy(message);
/*