diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2011-03-16 08:29:37 -0400 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-03-31 13:22:54 -0400 |
commit | b312b161ecb833b1bce5c4a97853f4a4f40c7901 (patch) | |
tree | 7700417fc16114030316a3a2ba2fcd58ea37a25d /include | |
parent | dc4fe30b8675033e538e2dea50be8af9c75f1b6a (diff) |
Bluetooth: mgmt: Add support for setting the local name
This patch adds a new set_local_name management command as well as a
local_name_changed management event. With these user space can both
change the local name as well as monitor changes to it by others.
Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/bluetooth/hci_core.h | 1 | ||||
-rw-r--r-- | include/net/bluetooth/mgmt.h | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 9aabb14982dd..3912c7ab717c 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -767,6 +767,7 @@ int mgmt_user_confirm_reply_complete(u16 index, bdaddr_t *bdaddr, u8 status); | |||
767 | int mgmt_user_confirm_neg_reply_complete(u16 index, bdaddr_t *bdaddr, | 767 | int mgmt_user_confirm_neg_reply_complete(u16 index, bdaddr_t *bdaddr, |
768 | u8 status); | 768 | u8 status); |
769 | int mgmt_auth_failed(u16 index, bdaddr_t *bdaddr, u8 status); | 769 | int mgmt_auth_failed(u16 index, bdaddr_t *bdaddr, u8 status); |
770 | int mgmt_set_local_name_complete(u16 index, u8 *name, u8 status); | ||
770 | 771 | ||
771 | /* HCI info for socket */ | 772 | /* HCI info for socket */ |
772 | #define hci_pi(sk) ((struct hci_pinfo *) sk) | 773 | #define hci_pi(sk) ((struct hci_pinfo *) sk) |
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h index 7d0749bed090..89e7c82c4784 100644 --- a/include/net/bluetooth/mgmt.h +++ b/include/net/bluetooth/mgmt.h | |||
@@ -172,6 +172,11 @@ struct mgmt_rp_user_confirm_reply { | |||
172 | 172 | ||
173 | #define MGMT_OP_USER_CONFIRM_NEG_REPLY 0x0016 | 173 | #define MGMT_OP_USER_CONFIRM_NEG_REPLY 0x0016 |
174 | 174 | ||
175 | #define MGMT_OP_SET_LOCAL_NAME 0x0017 | ||
176 | struct mgmt_cp_set_local_name { | ||
177 | __u8 name[MGMT_MAX_NAME_LENGTH]; | ||
178 | } __packed; | ||
179 | |||
175 | #define MGMT_EV_CMD_COMPLETE 0x0001 | 180 | #define MGMT_EV_CMD_COMPLETE 0x0001 |
176 | struct mgmt_ev_cmd_complete { | 181 | struct mgmt_ev_cmd_complete { |
177 | __le16 opcode; | 182 | __le16 opcode; |
@@ -239,3 +244,8 @@ struct mgmt_ev_auth_failed { | |||
239 | bdaddr_t bdaddr; | 244 | bdaddr_t bdaddr; |
240 | __u8 status; | 245 | __u8 status; |
241 | } __packed; | 246 | } __packed; |
247 | |||
248 | #define MGMT_EV_LOCAL_NAME_CHANGED 0x0011 | ||
249 | struct mgmt_ev_local_name_changed { | ||
250 | __u8 name[MGMT_MAX_NAME_LENGTH]; | ||
251 | } __packed; | ||