mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 23:09:34 +01:00
device/network: Use station_is_busy
This commit is contained in:
parent
f996bea880
commit
187ea7f5d1
11
src/device.c
11
src/device.c
@ -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 */
|
/* 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)
|
if (!device->powered || !device->station)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
state = station_get_state(device->station);
|
return station_is_busy(device->station);
|
||||||
if (state != STATION_STATE_DISCONNECTED &&
|
|
||||||
state != STATION_STATE_AUTOCONNECT)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void periodic_scan_trigger(int err, void *user_data)
|
static void periodic_scan_trigger(int err, void *user_data)
|
||||||
|
@ -28,8 +28,6 @@ struct netdev;
|
|||||||
struct network;
|
struct network;
|
||||||
struct device;
|
struct device;
|
||||||
|
|
||||||
bool device_is_busy(struct device *device);
|
|
||||||
|
|
||||||
void device_disassociated(struct device *device);
|
void device_disassociated(struct device *device);
|
||||||
void device_transition_start(struct device *device, struct scan_bss *bss);
|
void device_transition_start(struct device *device, struct scan_bss *bss);
|
||||||
void device_set_scan_results(struct device *device, struct l_queue *bss_list,
|
void device_set_scan_results(struct device *device, struct l_queue *bss_list,
|
||||||
|
@ -1008,7 +1008,7 @@ static struct l_dbus_message *network_connect(struct l_dbus *dbus,
|
|||||||
|
|
||||||
l_debug("");
|
l_debug("");
|
||||||
|
|
||||||
if (device_is_busy(device))
|
if (station_is_busy(station))
|
||||||
return dbus_error_busy(message);
|
return dbus_error_busy(message);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user