smp-tester: Fix not registering for MGMT_EV_USER_CONFIRM_REQUEST
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 10 Nov 2020 23:10:09 +0000 (15:10 -0800)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:33 +0000 (19:08 +0530)
For client test MGMT_EV_USER_CONFIRM_REQUEST shall be resgistered as
well as the kernel has been updated to request user confirmation even
when acting as initiator.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
tools/smp-tester.c

index 7823b6b..644c451 100755 (executable)
@@ -501,6 +501,10 @@ static void setup_powered_client(const void *test_data)
        const struct smp_data *smp = data->test_data;
        unsigned char param[] = { 0x01 };
 
+       mgmt_register(data->mgmt, MGMT_EV_USER_CONFIRM_REQUEST,
+                       data->mgmt_index, user_confirm_request_callback,
+                       data, NULL);
+
        tester_print("Powering on controller");
 
        mgmt_send(data->mgmt, MGMT_OP_SET_LE, data->mgmt_index,