diff options
| author | Jonas Dreßler <[email protected]> | 2024-01-08 22:46:06 +0000 |
|---|---|---|
| committer | Luiz Augusto von Dentz <[email protected]> | 2024-03-06 22:22:37 +0000 |
| commit | 78e3639fc8031275010c3287ac548c0bc8de83b1 (patch) | |
| tree | 320e950ad16bf6a553d7177dea71f2a76e112a00 /net/bluetooth/hci_request.c | |
| parent | Bluetooth: Disconnect connected devices before rfkilling adapter (diff) | |
| download | kernel-78e3639fc8031275010c3287ac548c0bc8de83b1.tar.gz kernel-78e3639fc8031275010c3287ac548c0bc8de83b1.zip | |
Bluetooth: Remove superfluous call to hci_conn_check_pending()
The "pending connections" feature was originally introduced with commit
4c67bc74f016 ("[Bluetooth] Support concurrent connect requests") and
6bd57416127e ("[Bluetooth] Handling pending connect attempts after
inquiry") to handle controllers supporting only a single connection request
at a time. Later things were extended to also cancel ongoing inquiries on
connect() with commit 89e65975fea5 ("Bluetooth: Cancel Inquiry before
Create Connection").
With commit a9de9248064b ("[Bluetooth] Switch from OGF+OCF to using only
opcodes"), hci_conn_check_pending() was introduced as a helper to
consolidate a few places where we check for pending connections (indicated
by the BT_CONNECT2 flag) and then try to connect.
This refactoring commit also snuck in two more calls to
hci_conn_check_pending():
- One is in the failure callback of hci_cs_inquiry(), this one probably
makes sense: If we send an "HCI Inquiry" command and then immediately
after a "Create Connection" command, the "Create Connection" command might
fail before the "HCI Inquiry" command, and then we want to retry the
"Create Connection" on failure of the "HCI Inquiry".
- The other added call to hci_conn_check_pending() is in the event handler
for the "Remote Name" event, this seems unrelated and is possibly a
copy-paste error, so remove that one.
Fixes: a9de9248064b ("[Bluetooth] Switch from OGF+OCF to using only opcodes")
Signed-off-by: Jonas Dreßler <[email protected]>
Signed-off-by: Luiz Augusto von Dentz <[email protected]>
Diffstat (limited to 'net/bluetooth/hci_request.c')
0 files changed, 0 insertions, 0 deletions
