Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1dbb2413 authored by David S. Miller's avatar David S. Miller
Browse files


Johan Hedberg says:

====================
pull request: bluetooth 2015-09-17

Here's one important patch for the 4.3-rc series that fixes an issue
with Bluetooth LE encryption failing because of a too early check for
the SMP context.

Please let me know if there are any issues pulling. Thanks.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 34f5b006 d8949aad
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -2311,12 +2311,6 @@ int smp_conn_security(struct hci_conn *hcon, __u8 sec_level)
	if (!conn)
		return 1;

	chan = conn->smp;
	if (!chan) {
		BT_ERR("SMP security requested but not available");
		return 1;
	}

	if (!hci_dev_test_flag(hcon->hdev, HCI_LE_ENABLED))
		return 1;

@@ -2330,6 +2324,12 @@ int smp_conn_security(struct hci_conn *hcon, __u8 sec_level)
		if (smp_ltk_encrypt(conn, hcon->pending_sec_level))
			return 0;

	chan = conn->smp;
	if (!chan) {
		BT_ERR("SMP security requested but not available");
		return 1;
	}

	l2cap_chan_lock(chan);

	/* If SMP is already in progress ignore this request */