diff options
author | Archie Pusaka <apusaka@chromium.org> | 2024-04-04 13:50:23 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-04-17 12:23:32 +0300 |
commit | 441dadfca1112873d395dcc15b953c805eae81bf (patch) | |
tree | 34c800388177ce658ba993095ec3780455efa517 | |
parent | 50173882bb187e70e37bac01385b9b114019bee2 (diff) | |
download | linux-441dadfca1112873d395dcc15b953c805eae81bf.tar.xz |
Bluetooth: l2cap: Don't double set the HCI_CONN_MGMT_CONNECTED bit
[ Upstream commit 600b0bbe73d3a9a264694da0e4c2c0800309141e ]
The bit is set and tested inside mgmt_device_connected(), therefore we
must not set it just outside the function.
Fixes: eeda1bf97bb5 ("Bluetooth: hci_event: Fix not indicating new connection for BIG Sync")
Signed-off-by: Archie Pusaka <apusaka@chromium.org>
Reviewed-by: Manish Mandlik <mmandlik@chromium.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | net/bluetooth/l2cap_core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index ab5a9d42fae7..706d2478ddb3 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -4054,8 +4054,7 @@ static int l2cap_connect_req(struct l2cap_conn *conn, return -EPROTO; hci_dev_lock(hdev); - if (hci_dev_test_flag(hdev, HCI_MGMT) && - !test_and_set_bit(HCI_CONN_MGMT_CONNECTED, &hcon->flags)) + if (hci_dev_test_flag(hdev, HCI_MGMT)) mgmt_device_connected(hdev, hcon, NULL, 0); hci_dev_unlock(hdev); |