Bluetooth: Create a unified auth_type evaluation function
authorJohan Hedberg <johan.hedberg@nokia.com>
Wed, 19 Jan 2011 06:36:50 +0000 (12:06 +0530)
committerGustavo F. Padovan <padovan@profusion.mobi>
Wed, 19 Jan 2011 16:40:43 +0000 (14:40 -0200)
commit8556edd32f01c50a3c99e44dc2c3b1252ea59605
treeb0e9d426b7a17ad201c782d4e0c09fbddfe81730
parent65cf686ee102b7eb0477a4bab82ff227071a0258
Bluetooth: Create a unified auth_type evaluation function

The logic for determining the needed auth_type for an L2CAP socket is
rather complicated and has so far been duplicated in
l2cap_check_security as well as l2cap_do_connect. Additionally the
l2cap_check_security code was completely missing the handling of
SOCK_RAW type sockets. This patch creates a unified function for the
evaluation and makes l2cap_do_connect and l2cap_check_security use that
function.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
net/bluetooth/l2cap.c