mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 00:41:17 +00:00
b357564463
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.57 Manually rebased: generic/pending-6.1/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch Removed upstreamed: qualcommax/patches-6.1/0134-PCI-qcom-Fixing-broken-pcie-enumeration-for-2_3_3-co.patch[1] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.57&id=2dfb5f324d799f4545e17631415aba6d302a8e2b Build system: x86/64 Build-tested: x86/64/AMD Cezanne Run-tested: x86/64/AMD Cezanne Reviewed-by: Robert Marko <robimarko@gmail.com> Signed-off-by: John Audia <therealgraysky@proton.me>
42 lines
1.5 KiB
Diff
42 lines
1.5 KiB
Diff
From dffb648dffeab7246040a30b7d1669387d1e767e Mon Sep 17 00:00:00 2001
|
|
From: Phil Elwell <phil@raspberrypi.com>
|
|
Date: Tue, 25 Apr 2023 11:49:41 +0100
|
|
Subject: [PATCH] Bluetooth: hci_sync: Add fallback-bd-address prop
|
|
|
|
The kernel Bluetooth framework understands that devices may not
|
|
be programmed with valid Bluetooth addresses. It also has the ability
|
|
to override a Bluetooth address with the value of the local-bd-address
|
|
DT property, but it ignores the validity of the existing address when
|
|
doing so.
|
|
|
|
Add a new boolean property, fallback-bd-address, which indicates that
|
|
the given local-bd-address property should only be used if the device
|
|
does not already have a valid BDADDR.
|
|
|
|
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
|
---
|
|
net/bluetooth/hci_sync.c | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
--- a/net/bluetooth/hci_sync.c
|
|
+++ b/net/bluetooth/hci_sync.c
|
|
@@ -4630,6 +4630,7 @@ static const struct {
|
|
*/
|
|
static int hci_dev_setup_sync(struct hci_dev *hdev)
|
|
{
|
|
+ struct fwnode_handle *fwnode = dev_fwnode(hdev->dev.parent);
|
|
int ret = 0;
|
|
bool invalid_bdaddr;
|
|
size_t i;
|
|
@@ -4658,7 +4659,9 @@ static int hci_dev_setup_sync(struct hci
|
|
|
|
if (!ret) {
|
|
if (test_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks) &&
|
|
- !bacmp(&hdev->public_addr, BDADDR_ANY))
|
|
+ !bacmp(&hdev->public_addr, BDADDR_ANY) &&
|
|
+ (invalid_bdaddr ||
|
|
+ !fwnode_property_present(fwnode, "fallback-bd-address")))
|
|
hci_dev_get_bd_addr_from_property(hdev);
|
|
|
|
if ((invalid_bdaddr ||
|