From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> set_mode shall use opcode to identify what setting are being changed rather then the mode. --- src/adapter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/adapter.c b/src/adapter.c index 051c32753..f483cc827 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -631,7 +631,7 @@ static bool set_mode(struct btd_adapter *adapter, uint16_t opcode, memset(&cp, 0, sizeof(cp)); cp.val = mode; - switch (mode) { + switch (opcode) { case MGMT_OP_SET_POWERED: setting = MGMT_SETTING_POWERED; break; -- 2.29.2