vboot: Set VB2_SD_STATUS_EC_SYNC_COMPLETE in shared data status

CL:1877066 introduced shared data status VB2_SD_STATUS_EC_SYNC_COMPLETE,
but incorrectly saved it in shared data flags.

BRANCH=hatch
BUG=chromium:1057517
TEST=make runtests

Change-Id: Idc993304760c419f80c6b160b30763142cf47234
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2082756
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2090580
Reviewed-by: Shelley Chen <shchen@chromium.org>
Commit-Queue: Shelley Chen <shchen@chromium.org>
Tested-by: Shelley Chen <shchen@chromium.org>
diff --git a/firmware/2lib/2ec_sync.c b/firmware/2lib/2ec_sync.c
index aa06303..24de0e2 100644
--- a/firmware/2lib/2ec_sync.c
+++ b/firmware/2lib/2ec_sync.c
@@ -453,10 +453,10 @@
 	vb2_error_t rv;
 
 	/*
-	 * If the flags indicate that the EC has already gone through
+	 * If the status indicates that the EC has already gone through
 	 * software sync this boot, then don't do it again.
 	 */
-	if (sd->flags & VB2_SD_STATUS_EC_SYNC_COMPLETE) {
+	if (sd->status & VB2_SD_STATUS_EC_SYNC_COMPLETE) {
 		VB2_DEBUG("EC software sync already performed this boot, skipping\n");
 		return VB2_SUCCESS;
 	}
@@ -494,7 +494,7 @@
 		return rv;
 
 	/* Establish that EC software sync is complete and successful */
-	sd->flags |= VB2_SD_STATUS_EC_SYNC_COMPLETE;
+	sd->status |= VB2_SD_STATUS_EC_SYNC_COMPLETE;
 
 	return VB2_SUCCESS;
 }