aboot: mdtp: Update deactivation pin length requirements.

This change includes updated deactivation pin requirements.

Change-Id: Id2f94542697044a54627690efa409e5812506b5e
CRs-Fixed: 980412
diff --git a/app/aboot/mdtp.c b/app/aboot/mdtp.c
index a2d52bf..1e2ee09 100644
--- a/app/aboot/mdtp.c
+++ b/app/aboot/mdtp.c
@@ -400,7 +400,7 @@
 static void display_recovery_ui(mdtp_cfg_t *mdtp_cfg)
 {
 	uint32_t pin_length = 0;
-	char entered_pin[MDTP_MAX_PIN_LEN+1] = {0};
+	char entered_pin[MDTP_PIN_LEN+1] = {0};
 	uint32_t i;
 	char pin_mismatch = 0;
 
@@ -410,7 +410,7 @@
 
 		pin_length = strlen(mdtp_cfg->mdtp_pin.mdtp_pin);
 
-		if (pin_length > MDTP_MAX_PIN_LEN || pin_length < MDTP_MIN_PIN_LEN)
+		if (pin_length != MDTP_PIN_LEN)
 		{
 			dprintf(CRITICAL, "mdtp: display_recovery_ui: Error, invalid PIN length\n");
 			display_error_msg(); /* This will never return */
diff --git a/app/aboot/mdtp.h b/app/aboot/mdtp.h
index 88eff44..86f5343 100644
--- a/app/aboot/mdtp.h
+++ b/app/aboot/mdtp.h
@@ -34,8 +34,7 @@
 #define MAX_PARTITIONS         (3)
 #define MAX_PARTITION_NAME_LEN (100)
 #define HASH_LEN               (32)
-#define MDTP_MAX_PIN_LEN       (8)
-#define MDTP_MIN_PIN_LEN       (5)
+#define MDTP_PIN_LEN           (8)
 #define DIP_PADDING            (15)
 
 #define INITIAL_DELAY_MSECONDS      5000
@@ -84,14 +83,14 @@
 } DIP_partition_cfg_t;
 
 typedef struct mdtp_pin {
-	char mdtp_pin[MDTP_MAX_PIN_LEN+1];              /* A null terminated PIN. */
+	char mdtp_pin[MDTP_PIN_LEN+1];              /* A null terminated PIN. */
 } mdtp_pin_t;
 
 /** MDTP configuration. */
 typedef struct mdtp_cfg {
 	uint8_t enable_local_pin_authentication;/* Allow local authentication using a PIN. */
 	mdtp_pin_t mdtp_pin;                    /* Null terminated PIN provided by the user for local deactivation.
-                                               PIN length should be from MDTP_MIN_PIN_LEN to MDTP_MAX_PIN_LEN digits. */
+                                               PIN length should be MDTP_PIN_LEN digits. */
 } mdtp_cfg_t;
 
 typedef struct DIP {
diff --git a/app/aboot/mdtp_ui.c b/app/aboot/mdtp_ui.c
index f03b818..fafb787 100644
--- a/app/aboot/mdtp_ui.c
+++ b/app/aboot/mdtp_ui.c
@@ -69,7 +69,7 @@
  * Global Variables
  * -------------------------------------------------------------------------*/
 
-static uint32_t g_pin_frames_x_location[MDTP_MAX_PIN_LEN] = {0};
+static uint32_t g_pin_frames_x_location[MDTP_PIN_LEN] = {0};
 static uint32_t g_pin_frames_y_location = 0;
 
 static bool g_initial_screen_displayed = false;