mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-21 11:52:34 +01:00
device: Move device_get_path out of wiphy.c
This commit is contained in:
parent
e0c27a2ca8
commit
6e57e4a00c
10
src/device.c
10
src/device.c
@ -24,6 +24,8 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <ell/ell.h>
|
||||
|
||||
#include "src/common.h"
|
||||
@ -121,6 +123,14 @@ struct network *device_get_connected_network(struct device *device)
|
||||
return device->connected_network;
|
||||
}
|
||||
|
||||
const char *device_get_path(struct device *device)
|
||||
{
|
||||
static char path[12];
|
||||
|
||||
snprintf(path, sizeof(path), "/%u", device->index);
|
||||
return path;
|
||||
}
|
||||
|
||||
void device_disassociated(struct device *device)
|
||||
{
|
||||
struct network *network = device->connected_network;
|
||||
|
@ -221,14 +221,6 @@ static void network_free(void *data)
|
||||
network_remove(network, -ESHUTDOWN);
|
||||
}
|
||||
|
||||
const char *device_get_path(struct device *device)
|
||||
{
|
||||
static char path[12];
|
||||
|
||||
snprintf(path, sizeof(path), "/%u", device->index);
|
||||
return path;
|
||||
}
|
||||
|
||||
const uint8_t *device_get_address(struct device *device)
|
||||
{
|
||||
return netdev_get_address(device->netdev);
|
||||
|
Loading…
Reference in New Issue
Block a user