From 66610f1248bde7db818e0d2a4c87f89645695ef6 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Mon, 16 May 2016 12:26:00 -0500 Subject: [PATCH] device: Add device_get_wiphy() --- src/device.h | 2 ++ src/wiphy.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/src/device.h b/src/device.h index 7ff51119..e82c4174 100644 --- a/src/device.h +++ b/src/device.h @@ -24,6 +24,7 @@ struct netdev; struct scan_bss; +struct wiphy; typedef void (*device_watch_func_t)(struct netdev *device, void *userdata); typedef void (*device_destroy_func_t)(void *userdata); @@ -39,6 +40,7 @@ void __device_watch_call_removed(struct netdev *device); struct network *device_get_connected_network(struct netdev *device); const char *device_get_path(struct netdev *device); bool device_is_busy(struct netdev *device); +struct wiphy *device_get_wiphy(struct netdev *device); void device_connect_network(struct netdev *device, struct network *network, struct scan_bss *bss, diff --git a/src/wiphy.c b/src/wiphy.c index e5e6919e..d6e8d0e2 100644 --- a/src/wiphy.c +++ b/src/wiphy.c @@ -193,6 +193,11 @@ bool device_is_busy(struct netdev *device) return false; } +struct wiphy *device_get_wiphy(struct netdev *device) +{ + return device->wiphy; +} + static void netdev_enter_state(struct netdev *netdev, enum device_state state) { l_debug("Old State: %s, new state: %s",