mboxd: Mark the protocol as reset on shutdown

This is necessary for the host firmware to properly recover from a
daemon restart event, as it needs to re-perform the GET_INFO handshake
and re-establish any window it had active prior to the daemon
restarting.

While we're here, rename the symbol to align with the documentation.

Change-Id: I628d2ee5972177b7ad78392a86122d16104e7011
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/mboxd.c b/mboxd.c
index 745785e..f0deafe 100644
--- a/mboxd.c
+++ b/mboxd.c
@@ -439,6 +439,7 @@
 finish:
 	MSG_INFO("Daemon Exiting...\n");
 	context->bmc_events &= ~BMC_EVENT_DAEMON_READY;
+	context->bmc_events |= BMC_EVENT_PROTOCOL_RESET;
 
 	/* Alert on all supported transports */
 	protocol_events_put(context, mbox_ops);
diff --git a/mboxd.h b/mboxd.h
index 8fd3183..1047e46 100644
--- a/mboxd.h
+++ b/mboxd.h
@@ -30,14 +30,14 @@
 #define FLAGS_SHORT_LIFETIME		0x01
 
 /* BMC Event Notification */
-#define BMC_EVENT_REBOOT		0x01
+#define BMC_EVENT_PROTOCOL_RESET	0x01
 #define BMC_EVENT_WINDOW_RESET		0x02
-#define BMC_EVENT_ACK_MASK		(BMC_EVENT_REBOOT | \
+#define BMC_EVENT_ACK_MASK		(BMC_EVENT_PROTOCOL_RESET | \
 					BMC_EVENT_WINDOW_RESET)
 #define BMC_EVENT_FLASH_CTRL_LOST	0x40
 #define BMC_EVENT_DAEMON_READY		0x80
-#define BMC_EVENT_V1_MASK		BMC_EVENT_REBOOT
-#define BMC_EVENT_V2_MASK		(BMC_EVENT_REBOOT | \
+#define BMC_EVENT_V1_MASK		BMC_EVENT_PROTOCOL_RESET
+#define BMC_EVENT_V2_MASK		(BMC_EVENT_PROTOCOL_RESET | \
 					BMC_EVENT_WINDOW_RESET | \
 					BMC_EVENT_FLASH_CTRL_LOST | \
 					BMC_EVENT_DAEMON_READY)
diff --git a/transport_dbus.c b/transport_dbus.c
index d1ef4af..21e097b 100644
--- a/transport_dbus.c
+++ b/transport_dbus.c
@@ -65,7 +65,7 @@
 		}
 	}
 
-	if (events & BMC_EVENT_REBOOT) {
+	if (events & BMC_EVENT_PROTOCOL_RESET) {
 		sd_bus_message *m = NULL;
 
 		rc = sd_bus_message_new_signal(context->bus, &m,