Thread (6 messages) flat view 6 messages, 2 authors, 2021-12-22
STALE1729d

[RFC BlueZ PATCH] Bluetooth: Use driver status and experiment value for central-peripheral support.

From: Jesse Melhuish <hidden>
Date: 2021-12-20 22:20:06
Subsystem: the rest · Maintainer: Linus Torvalds

---
The observed behavior without any change is that support for the
central-peripheral role can be enabled through an experiment flag in
BlueZ regardless of whether the controller can actually support it.
Additionally, if the controller has enabled this feature but the
experiment flag has not been set the central-peripheral role is not
listed as supported. I'm not certain what the expected behavior should
be, but enabling if either source says to enable (this patch) or only
when both enable the feature both seem like reasonable options to start
with.

 src/adapter.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/adapter.c b/src/adapter.c
index 9fc6853c9..60325015b 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -10434,7 +10434,8 @@ static void read_exp_features_complete(uint8_t status, uint16_t length,
 			}
 
 			if (feat->func)
-				feat->func(adapter, action);
+				feat->func(adapter, action ||
+					(rp->features[i].flags & BIT(0)));
 		}
 	}
 }
-- 
2.31.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help