Skip to content

Commit 6f78fd4

Browse files
jhedbergholtmann
authored andcommitted
Bluetooth: Fix check for connected state when pairing
Both BT_CONNECTED and BT_CONFIG state mean that we have a baseband link available. We should therefore check for either of these when pairing and deciding whether to call hci_conn_security() directly. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
1 parent 233351b commit 6f78fd4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/bluetooth/mgmt.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3213,7 +3213,7 @@ static int pair_device(struct sock *sk, struct hci_dev *hdev, void *data,
32133213
conn->io_capability = cp->io_cap;
32143214
cmd->user_data = conn;
32153215

3216-
if (conn->state == BT_CONNECTED &&
3216+
if ((conn->state == BT_CONNECTED || conn->state == BT_CONFIG) &&
32173217
hci_conn_security(conn, sec_level, auth_type, true))
32183218
pairing_complete(cmd, 0);
32193219

0 commit comments

Comments
 (0)