]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Extend state_change() call to report errors too
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>
Tue, 15 Oct 2013 22:24:45 +0000 (19:24 -0300)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 15 Oct 2013 23:42:44 +0000 (16:42 -0700)
commit8cc3ff5f77316491e0728e6989f970bf9838bcb3
tree3beab58217470ea83433cf8ba14c7e4a91d3a80c
parent2e8345af9dd5707c9905e5e3b4604c9e23cf6af4
Bluetooth: Extend state_change() call to report errors too

Instead of creating an new function pointer to report errors we are just
reusing state_change for that and there is a simple reason for this, one
place in the l2cap_core.c code needs, in a locked sk, set both the sk_state
and sk_err. If we create two different functions for this we would need to
release the lock between the two operation putting the socket in non
desired state.

The change is transparent to the l2cap_core.c code, user that only needs
to set the state won't need any modification.

This is another step of an ongoing work to make l2cap_core.c totally
independent from l2cap's struct sock.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
include/net/bluetooth/l2cap.h
net/bluetooth/a2mp.c
net/bluetooth/l2cap_core.c
net/bluetooth/l2cap_sock.c