mgmt: Add controller suspend and resume events
authorAbhishek Pandit-Subedi <abhishekpandit@chromium.org>
Sat, 29 Aug 2020 01:02:08 +0000 (18:02 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 12 Apr 2021 09:00:50 +0000 (14:30 +0530)
Add the controller suspend and resume events.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
lib/mgmt.h

index 0e7d827..3bb3c0a 100644 (file)
@@ -782,6 +782,7 @@ struct mgmt_ev_device_connected {
 #define MGMT_DEV_DISCONN_TIMEOUT       0x01
 #define MGMT_DEV_DISCONN_LOCAL_HOST    0x02
 #define MGMT_DEV_DISCONN_REMOTE                0x03
+#define MGMT_DEV_DISCONN_LOCAL_HOST_SUSPEND    0x05
 
 #define MGMT_EV_DEVICE_DISCONNECTED    0x000C
 struct mgmt_ev_device_disconnected {
@@ -969,6 +970,17 @@ struct mgmt_ev_adv_monitor_removed {
        uint16_t monitor_handle;
 }  __packed;
 
+#define MGMT_EV_CONTROLLER_SUSPEND             0x002d
+struct mgmt_ev_controller_suspend {
+       uint8_t suspend_state;
+} __packed;
+
+#define MGMT_EV_CONTROLLER_RESUME              0x002e
+struct mgmt_ev_controller_resume {
+       struct mgmt_addr_info addr;
+       uint8_t wake_reason;
+} __packed;
+
 static const char *mgmt_op[] = {
        "<0x0000>",
        "Read Version",
@@ -1098,6 +1110,8 @@ static const char *mgmt_ev[] = {
        "Device Flags Changed",
        "Advertisement Monitor Added",                  /* 0x002b */
        "Advertisement Monitor Removed",
+       "Controller Suspend",
+       "Controller Resume",
 };
 
 static const char *mgmt_status[] = {