transport: Fix event handling

Events were not quite being handled as per the intent of the recent
refactor: The protocol layer was meant to record the raw set of events
and provide the protocol-version-specific mask to the transport layer,
which the transport layer would then use to flush out the state in
accordance with its implementation-specific requirements.

What was going wrong was that the transport implementations were
overwriting the raw set of events with the protocol-specific masked set
of events, meaning that we'd lose the raw state and provide an
incomplete BMC state value on protocol upgrade.

Rework the event handling to make sure the responsibilities are properly
split between the layers.

Change-Id: Iace6615a121e4ce7dcca690d9adf62e5ab9ccee2
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/protocol.c b/protocol.c
index 2c97f92..616af3d 100644
--- a/protocol.c
+++ b/protocol.c
@@ -40,7 +40,7 @@
 	 */
 	context->bmc_events |= bmc_event;
 
-	return context->transport->set_events(context, (bmc_event & mask));
+	return context->transport->set_events(context, bmc_event, mask);
 }
 
 /*
@@ -56,7 +56,7 @@
 
 	context->bmc_events &= ~bmc_event;
 
-	return context->transport->clear_events(context, (bmc_event & mask));
+	return context->transport->clear_events(context, bmc_event, mask);
 }
 
 int protocol_v1_reset(struct mbox_context *context)