aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2011-03-30 13:18:12 +0300
committerGustavo F. Padovan <padovan@profusion.mobi>2011-04-04 18:47:38 -0300
commita88a9652d25a63ce10b6a5fe680d0ad8f33b9c9b (patch)
tree57d8fed21320201e302eb40fafab35284b60409d /net/bluetooth/mgmt.c
parente17acd40f6006d0a0e0b1b3f7359ba4d543011c6 (diff)
downloadkernel_samsung_smdk4412-a88a9652d25a63ce10b6a5fe680d0ad8f33b9c9b.zip
kernel_samsung_smdk4412-a88a9652d25a63ce10b6a5fe680d0ad8f33b9c9b.tar.gz
kernel_samsung_smdk4412-a88a9652d25a63ce10b6a5fe680d0ad8f33b9c9b.tar.bz2
Bluetooth: Add mgmt_remote_name event
This patch adds a new remote_name event to the Management interface which is sent every time the name of a remote device is resolved (over BR/EDR). Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r--net/bluetooth/mgmt.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 86fb502..9a61320 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -2063,3 +2063,15 @@ int mgmt_device_found(u16 index, bdaddr_t *bdaddr, u8 *dev_class, s8 rssi,
return mgmt_event(MGMT_EV_DEVICE_FOUND, index, &ev, sizeof(ev), NULL);
}
+
+int mgmt_remote_name(u16 index, bdaddr_t *bdaddr, u8 *name)
+{
+ struct mgmt_ev_remote_name ev;
+
+ memset(&ev, 0, sizeof(ev));
+
+ bacpy(&ev.bdaddr, bdaddr);
+ memcpy(ev.name, name, HCI_MAX_NAME_LENGTH);
+
+ return mgmt_event(MGMT_EV_REMOTE_NAME, index, &ev, sizeof(ev), NULL);
+}