summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-rw-r--r--board/cr50/wp.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/board/cr50/wp.c b/board/cr50/wp.c
index 55c7edcdc4..d8d8f760b9 100644
--- a/board/cr50/wp.c
+++ b/board/cr50/wp.c
@@ -129,9 +129,18 @@ static enum vendor_cmd_rc vc_set_wp(enum vendor_cmd_cc code,
*response_size = 0;
/* There shouldn't be any args */
- if (input_size)
+ if (input_size > 1)
return VENDOR_RC_BOGUS_ARGS;
+ if (input_size == 1) {
+ uint8_t *cmd = buf;
+
+ if (*cmd != WP_ENABLE)
+ return VENDOR_RC_BOGUS_ARGS;
+
+ set_wp_state(1);
+ }
+
/* Get current wp settings */
if (board_forcing_wp())
response |= WPV_FORCE;