Bluetooth: Allow change security level on ATT_CID in slave role

Kernel supports SMP Security Request so don't block increasing security
when we are slave.

Signed-off-by: Marcin Kraglak <marcin.kraglak@tieto.com>
Acked-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org
This commit is contained in:
Marcin Kraglak 2014-06-13 14:08:22 +02:00 committed by Marcel Holtmann
parent c73f94b8c0
commit 92d1372e1a

View File

@ -787,11 +787,6 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname,
/*change security for LE channels */
if (chan->scid == L2CAP_CID_ATT) {
if (!conn->hcon->out) {
err = -EINVAL;
break;
}
if (smp_conn_security(conn->hcon, sec.level))
break;
sk->sk_state = BT_CONFIG;