diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2013-10-12 10:19:32 -0400 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-10-12 10:30:42 -0400 |
commit | 3124b84309a0699c98bdc0ef1fc8cd5e058ad5fa (patch) | |
tree | fe889b835af2faa61b461ca4b292f54d26563179 /net/bluetooth/l2cap_sock.c | |
parent | 6a974b50a1b0909803faac3c3228f7c1339d9971 (diff) |
Bluetooth: Allow 3D profile to use security mode 4 level 0
The PSM 0x0021 is dedicated to the 3D profile and has permission to
use security mode 4 level 0 for L2CAP connectionless unicast data
transfers.
When establishing a L2CAP connectionless channel on PSM 0x0021, it
will no longer force Secure Simple Pairing.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/l2cap_sock.c')
-rw-r--r-- | net/bluetooth/l2cap_sock.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c index bee98ebfae4d..bd6fe7fd2737 100644 --- a/net/bluetooth/l2cap_sock.c +++ b/net/bluetooth/l2cap_sock.c | |||
@@ -101,6 +101,10 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int alen) | |||
101 | goto done; | 101 | goto done; |
102 | 102 | ||
103 | switch (chan->chan_type) { | 103 | switch (chan->chan_type) { |
104 | case L2CAP_CHAN_CONN_LESS: | ||
105 | if (__le16_to_cpu(la.l2_psm) == L2CAP_PSM_3DSP) | ||
106 | chan->sec_level = BT_SECURITY_SDP; | ||
107 | break; | ||
104 | case L2CAP_CHAN_CONN_ORIENTED: | 108 | case L2CAP_CHAN_CONN_ORIENTED: |
105 | if (__le16_to_cpu(la.l2_psm) == L2CAP_PSM_SDP || | 109 | if (__le16_to_cpu(la.l2_psm) == L2CAP_PSM_SDP || |
106 | __le16_to_cpu(la.l2_psm) == L2CAP_PSM_RFCOMM) | 110 | __le16_to_cpu(la.l2_psm) == L2CAP_PSM_RFCOMM) |