]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - net/bluetooth/hci_core.c
Bluetooth: Add mgmt events for blacklisting
authorAntti Julku <antti.julku@nokia.com>
Thu, 25 Aug 2011 13:48:02 +0000 (16:48 +0300)
committerGustavo F. Padovan <padovan@profusion.mobi>
Wed, 21 Sep 2011 15:59:15 +0000 (12:59 -0300)
commit5e762444b0d3e56bbd66f5092434c4a1ba698313
treead54379252e2fa923a3001a1c194ef541a87a686
parentc908df362c20be0eeef506fe62e13d835a4633f9
Bluetooth: Add mgmt events for blacklisting

Add management interface events for blocking/unblocking a device.
Sender of the block device command gets cmd complete and other
mgmt sockets get the event. Event is also sent to mgmt sockets when
blocking is done with ioctl, e.g when blocking a device with
hciconfig. This makes it possible for bluetoothd to track status
of blocked devices when a third party block or unblocks a device.

Event sending is handled in mgmt_device_blocked function which gets
called from hci_blacklist_add in hci_core.c. A pending command is
added in mgmt_block_device, so that it can found when sending the
event - the event is not sent to the socket from which the pending
command came. Locks were moved out from hci_core.c to hci_sock.c
and mgmt.c, because locking is needed also for mgmt_pending_add in
mgmt.c.

Signed-off-by: Antti Julku <antti.julku@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
include/net/bluetooth/hci_core.h
include/net/bluetooth/mgmt.h
net/bluetooth/hci_core.c
net/bluetooth/hci_sock.c
net/bluetooth/mgmt.c