linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jonas Dreßler" <verdre@v0yd.nl>
To: Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: "Jonas Dreßler" <verdre@v0yd.nl>,
	linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: [PATCH 0/5] Bluetooth: Improve retrying of connection attempts
Date: Tue,  2 Jan 2024 19:59:27 +0100	[thread overview]
Message-ID: <20240102185933.64179-1-verdre@v0yd.nl> (raw)

Since commit 4c67bc74f016b0d360b8573e18969c0ff7926974, the kernel supports
trying to connect again in case the bluetooth card is busy and fails
to connect.

The logic that should handle this became a bit spotty over time, and also
cards these days appear to fail with more errors than just "Command
Disallowed".

This series tries to improve the logic for retrying "HCI Create
Connection" and adds support for two more errors that can indicate the
hardware being busy.

Jonas Dreßler (5):
  Bluetooth: Remove superfluous call to hci_conn_check_pending()
  Bluetooth: hci_event: Use HCI error defines instead of magic values
  Bluetooth: hci_event: Remove limit of 2 reconnection attempts
  Bluetooth: hci_event: Do sanity checks before retrying to connect
  Bluetooth: hci_event: Try reconnecting on more kinds of errors

 include/net/bluetooth/hci.h |  3 ++
 net/bluetooth/hci_event.c   | 57 +++++++++++++++++++++++++++++++------
 2 files changed, 51 insertions(+), 9 deletions(-)

-- 
2.43.0


             reply	other threads:[~2024-01-02 18:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-02 18:59 Jonas Dreßler [this message]
2024-01-02 18:59 ` [PATCH 1/5] Bluetooth: Remove superfluous call to hci_conn_check_pending() Jonas Dreßler
2024-01-02 19:32   ` Bluetooth: Improve retrying of connection attempts bluez.test.bot
2024-01-04 20:52   ` [PATCH 1/5] Bluetooth: Remove superfluous call to hci_conn_check_pending() Simon Horman
2024-01-02 18:59 ` [PATCH 2/5] Bluetooth: hci_event: Use HCI error defines instead of magic values Jonas Dreßler
2024-01-02 18:59 ` [PATCH 3/5] Bluetooth: hci_event: Remove limit of 2 reconnection attempts Jonas Dreßler
2024-01-03 16:05   ` Luiz Augusto von Dentz
2024-01-05 15:54     ` Jonas Dreßler
2024-01-05 16:05       ` Luiz Augusto von Dentz
2024-01-07 22:20         ` Jonas Dreßler
2024-01-07 23:53           ` Luiz Augusto von Dentz
2024-01-02 18:59 ` [PATCH 4/5] Bluetooth: hci_event: Do sanity checks before retrying to connect Jonas Dreßler
2024-01-02 18:59 ` [PATCH 5/5] Bluetooth: hci_event: Try reconnecting on more kinds of errors Jonas Dreßler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240102185933.64179-1-verdre@v0yd.nl \
    --to=verdre@v0yd.nl \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).