aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Greer <mgreer@animalcreek.com>2017-03-08 16:35:18 -0700
committerSamuel Ortiz <sameo@linux.intel.com>2017-11-10 00:43:43 +0100
commit13c6d8470df034d2bc6e2e5d797f7f82f703360f (patch)
tree660a4c6902a9d3a3d8a1f2ee21a946eed2687d04
parent9c9fb621ec968c0eb5bb642b77160550b3dcef71 (diff)
downloadneard-13c6d8470df034d2bc6e2e5d797f7f82f703360f.tar.gz
adapter: Add call indicating whether constant poll is enabled
Add a routine that returns a boolean indicating whether the adapter constant poll option is enabled or not. Signed-off-by: Mark Greer <mgreer@animalcreek.com>
-rw-r--r--src/adapter.c5
-rw-r--r--src/near.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/adapter.c b/src/adapter.c
index e8c7c61..9c483ca 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -578,6 +578,11 @@ void __near_adapter_destroy(struct near_adapter *adapter)
free_adapter(adapter);
}
+bool __near_adapter_is_constant_poll(struct near_adapter *adapter)
+{
+ return adapter->constant_poll;
+}
+
const char *__near_adapter_get_path(struct near_adapter *adapter)
{
return adapter->path;
diff --git a/src/near.h b/src/near.h
index 7795e61..50a4c8b 100644
--- a/src/near.h
+++ b/src/near.h
@@ -78,6 +78,7 @@ void __near_manager_cleanup(void);
struct near_adapter *__near_adapter_create(uint32_t idx,
const char *name, uint32_t protocols, bool powered);
void __near_adapter_destroy(struct near_adapter *adapter);
+bool __near_adapter_is_constant_poll(struct near_adapter *adapter);
const char *__near_adapter_get_path(struct near_adapter *adapter);
struct near_adapter *__near_adapter_get(uint32_t idx);
int __near_adapter_add(struct near_adapter *adapter);