transport: Retain knowledge of setting and clearing of events

The protocol layer now just filters the events based on the version of
the protocol in use, and leaves it to the transport layer to manage how
the resulting state is represented. For the moment this simply moves
manipulation of bmc_events in struct mbox_context down in to the
transport layer.

Change-Id: Iff1df934505dc9c769be3d376396d425fb4e8264
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/protocol.c b/protocol.c
index 58dad98..82c1ca7 100644
--- a/protocol.c
+++ b/protocol.c
@@ -33,10 +33,7 @@
 		break;
 	}
 
-	context->bmc_events |= (bmc_event & mask);
-	MSG_DBG("BMC Events set to: 0x%.2x\n", context->bmc_events);
-
-	return context->transport->flush_events(context);
+	return context->transport->set_events(context, (bmc_event & mask));
 }
 
 /*
@@ -48,10 +45,7 @@
  */
 int protocol_events_clear(struct mbox_context *context, uint8_t bmc_event)
 {
-	context->bmc_events &= ~bmc_event;
-	MSG_DBG("BMC Events clear to: 0x%.2x\n", context->bmc_events);
-
-	return context->transport->flush_events(context);
+	return context->transport->clear_events(context, bmc_event);
 }
 
 int protocol_v1_reset(struct mbox_context *context)