Diff between e3a6442ae901ce5f5c25f5ad614a7d2461a4fcf7 and 1500f1f67191534ea695702bf167650fae2cd84c
Changed Files
| File | Additions | Deletions | Status |
| src/adapter.c | +10 | -0 | modified |
Full Patch
diff --git a/src/adapter.c b/src/adapter.c
index 7bf5bca..179c8cd 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -297,6 +297,16 @@ static int set_dev_class(struct btd_adapter *adapter, uint8_t major,
{
struct mgmt_cp_set_dev_class cp;
+ /*
+ * If the controller does not support BR/EDR operation,
+ * there is no point in trying to set a major and minor
+ * class value.
+ *
+ * This is an optimization for Low Energy only controllers.
+ */
+ if (!(adapter->supported_settings & MGMT_SETTING_BREDR))
+ return -ENOTSUP;
+
memset(&cp, 0, sizeof(cp));
/*