diff mbox

[2/4] adapter: Add call indicating whether constant poll is enabled

Message ID 20170616035728.19415-3-mgreer@animalcreek.com (mailing list archive)
State Accepted
Delegated to: Samuel Ortiz
Headers show

Commit Message

Mark Greer June 16, 2017, 3:57 a.m. UTC
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>
---
 src/adapter.c | 5 +++++
 src/near.h    | 1 +
 2 files changed, 6 insertions(+)
diff mbox

Patch

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);