mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-02 09:22:32 +01:00
netdev: Add netdev attribute getters
This commit is contained in:
parent
8a68ebd65b
commit
14e40f27e3
@ -49,5 +49,8 @@ bool netdev_watch_remove(uint32_t id);
|
|||||||
void __netdev_watch_call_added(struct netdev *netdev);
|
void __netdev_watch_call_added(struct netdev *netdev);
|
||||||
void __netdev_watch_call_removed(struct netdev *netdev);
|
void __netdev_watch_call_removed(struct netdev *netdev);
|
||||||
|
|
||||||
|
uint32_t netdev_get_ifindex(struct netdev *netdev);
|
||||||
|
const uint8_t *netdev_get_address(struct netdev *netdev);
|
||||||
|
|
||||||
bool netdev_init(void);
|
bool netdev_init(void);
|
||||||
bool netdev_exit(void);
|
bool netdev_exit(void);
|
||||||
|
10
src/wiphy.c
10
src/wiphy.c
@ -218,6 +218,16 @@ static const char *netdev_state_to_string(enum netdev_state state)
|
|||||||
return "invalid";
|
return "invalid";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t netdev_get_ifindex(struct netdev *netdev)
|
||||||
|
{
|
||||||
|
return netdev->index;
|
||||||
|
}
|
||||||
|
|
||||||
|
const uint8_t *netdev_get_address(struct netdev *netdev)
|
||||||
|
{
|
||||||
|
return netdev->addr;
|
||||||
|
}
|
||||||
|
|
||||||
static void netdev_enter_state(struct netdev *netdev, enum netdev_state state)
|
static void netdev_enter_state(struct netdev *netdev, enum netdev_state state)
|
||||||
{
|
{
|
||||||
l_debug("Old State: %s, new state: %s",
|
l_debug("Old State: %s, new state: %s",
|
||||||
|
Loading…
Reference in New Issue
Block a user