From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Edward Vear <edwardvear@gmail.com>,
Marcel Holtmann <marcel@holtmann.org>,
Johan Hedberg <johan.hedberg@intel.com>,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: [PATCH 5.10 07/20] Bluetooth: Fix attempting to set RPA timeout when unsupported
Date: Thu, 7 Jan 2021 15:34:02 +0100 [thread overview]
Message-ID: <20210107143053.441330544@linuxfoundation.org> (raw)
In-Reply-To: <20210107143052.392839477@linuxfoundation.org>
From: Edward Vear <edwardvear@gmail.com>
commit a31489d2a368d2f9225ed6a6f595c63bc7d10de8 upstream.
During controller initialization, an LE Set RPA Timeout command is sent
to the controller if supported. However, the value checked to determine
if the command is supported is incorrect. Page 1921 of the Bluetooth
Core Spec v5.2 shows that bit 2 of octet 35 of the Supported_Commands
field corresponds to the LE Set RPA Timeout command, but currently
bit 6 of octet 35 is checked. This patch checks the correct value
instead.
This issue led to the error seen in the following btmon output during
initialization of an adapter (rtl8761b) and prevented initialization
from completing.
< HCI Command: LE Set Resolvable Private Address Timeout (0x08|0x002e) plen 2
Timeout: 900 seconds
> HCI Event: Command Complete (0x0e) plen 4
LE Set Resolvable Private Address Timeout (0x08|0x002e) ncmd 2
Status: Unsupported Remote Feature / Unsupported LMP Feature (0x1a)
= Close Index: 00:E0:4C:6B:E5:03
The error did not appear when running with this patch.
Signed-off-by: Edward Vear <edwardvear@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/bluetooth/hci_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -763,7 +763,7 @@ static int hci_init3_req(struct hci_requ
hci_req_add(req, HCI_OP_LE_CLEAR_RESOLV_LIST, 0, NULL);
}
- if (hdev->commands[35] & 0x40) {
+ if (hdev->commands[35] & 0x04) {
__le16 rpa_timeout = cpu_to_le16(hdev->rpa_timeout);
/* Set RPA timeout */
next prev parent reply other threads:[~2021-01-07 14:34 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-07 14:33 [PATCH 5.10 00/20] 5.10.6-rc1 review Greg Kroah-Hartman
2021-01-07 14:33 ` [PATCH 5.10 01/20] Revert "drm/amd/display: Fix memory leaks in S3 resume" Greg Kroah-Hartman
2021-01-07 14:33 ` [PATCH 5.10 02/20] Revert "mtd: spinand: Fix OOB read" Greg Kroah-Hartman
2021-01-07 14:33 ` [PATCH 5.10 03/20] rtc: pcf2127: move watchdog initialisation to a separate function Greg Kroah-Hartman
2021-01-07 14:33 ` [PATCH 5.10 04/20] rtc: pcf2127: only use watchdog when explicitly available Greg Kroah-Hartman
2021-01-07 14:34 ` [PATCH 5.10 05/20] dt-bindings: rtc: add reset-source property Greg Kroah-Hartman
2021-01-07 14:34 ` [PATCH 5.10 06/20] kdev_t: always inline major/minor helper functions Greg Kroah-Hartman
2021-01-07 14:34 ` Greg Kroah-Hartman [this message]
2021-01-07 14:34 ` [PATCH 5.10 08/20] ALSA: hda/realtek - Modify Dell platform name Greg Kroah-Hartman
2021-01-07 14:34 ` [PATCH 5.10 09/20] ALSA: hda/hdmi: Fix incorrect mutex unlock in silent_stream_disable() Greg Kroah-Hartman
2021-01-07 14:34 ` [PATCH 5.10 10/20] drm/i915/tgl: Fix Combo PHY DPLL fractional divider for 38.4MHz ref clock Greg Kroah-Hartman
2021-01-07 14:34 ` [PATCH 5.10 11/20] scsi: ufs: Allow an error return value from ->device_reset() Greg Kroah-Hartman
2021-01-07 14:34 ` [PATCH 5.10 12/20] scsi: ufs: Re-enable WriteBooster after device reset Greg Kroah-Hartman
2021-01-07 14:34 ` [PATCH 5.10 13/20] RDMA/core: remove use of dma_virt_ops Greg Kroah-Hartman
2021-01-07 14:34 ` [PATCH 5.10 14/20] RDMA/siw,rxe: Make emulated devices virtual in the device tree Greg Kroah-Hartman
2021-01-07 14:34 ` [PATCH 5.10 15/20] fuse: fix bad inode Greg Kroah-Hartman
2021-01-07 14:34 ` [PATCH 5.10 16/20] perf: Break deadlock involving exec_update_mutex Greg Kroah-Hartman
2021-01-07 14:34 ` [PATCH 5.10 17/20] rwsem: Implement down_read_killable_nested Greg Kroah-Hartman
2021-01-07 14:34 ` [PATCH 5.10 18/20] rwsem: Implement down_read_interruptible Greg Kroah-Hartman
2021-01-07 14:34 ` [PATCH 5.10 19/20] exec: Transform exec_update_mutex into a rw_semaphore Greg Kroah-Hartman
2021-01-07 14:34 ` [PATCH 5.10 20/20] mwifiex: Fix possible buffer overflows in mwifiex_cmd_802_11_ad_hoc_start Greg Kroah-Hartman
2021-01-08 1:10 ` [PATCH 5.10 00/20] 5.10.6-rc1 review Shuah Khan
2021-01-10 11:30 ` Greg Kroah-Hartman
2021-01-08 2:02 ` Naresh Kamboju
2021-01-10 11:30 ` Greg Kroah-Hartman
2021-01-08 17:41 ` Guenter Roeck
2021-01-10 11:31 ` Greg Kroah-Hartman
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=20210107143053.441330544@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=edwardvear@gmail.com \
--cc=johan.hedberg@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=stable@vger.kernel.org \
--cc=sudipm.mukherjee@gmail.com \
/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