diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2011-11-07 15:16:02 -0500 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-11-08 09:54:09 -0500 |
commit | 16ab91ab48287aa4fc757f3618820f728ee4412f (patch) | |
tree | 9266bb78e7beedfbf08160a3309349d927b5ac7f /include | |
parent | 89352e7d3ab372ffad8efe2aa070e0b63df42b85 (diff) |
Bluetooth: Add timeout field to mgmt_set_discoverable
Based on the revised mgmt API set_discoverable has a timeout parameter
to specify how long the adapter will remain discoverable. A value of 0
means "indefinitively".
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/bluetooth/hci_core.h | 3 | ||||
-rw-r--r-- | include/net/bluetooth/mgmt.h | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 20db034390b7..5803c1ebcefa 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -196,6 +196,9 @@ struct hci_dev { | |||
196 | struct work_struct power_off; | 196 | struct work_struct power_off; |
197 | struct timer_list off_timer; | 197 | struct timer_list off_timer; |
198 | 198 | ||
199 | __u16 discov_timeout; | ||
200 | struct delayed_work discov_off; | ||
201 | |||
199 | struct timer_list cmd_timer; | 202 | struct timer_list cmd_timer; |
200 | struct tasklet_struct cmd_task; | 203 | struct tasklet_struct cmd_task; |
201 | struct tasklet_struct rx_task; | 204 | struct tasklet_struct rx_task; |
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h index 3062fd3a65d2..b5320aa9b085 100644 --- a/include/net/bluetooth/mgmt.h +++ b/include/net/bluetooth/mgmt.h | |||
@@ -69,6 +69,10 @@ struct mgmt_mode { | |||
69 | #define MGMT_OP_SET_POWERED 0x0005 | 69 | #define MGMT_OP_SET_POWERED 0x0005 |
70 | 70 | ||
71 | #define MGMT_OP_SET_DISCOVERABLE 0x0006 | 71 | #define MGMT_OP_SET_DISCOVERABLE 0x0006 |
72 | struct mgmt_cp_set_discoverable { | ||
73 | __u8 val; | ||
74 | __u16 timeout; | ||
75 | } __packed; | ||
72 | 76 | ||
73 | #define MGMT_OP_SET_CONNECTABLE 0x0007 | 77 | #define MGMT_OP_SET_CONNECTABLE 0x0007 |
74 | 78 | ||