Rename struct member mode to io_mode

Signed-off-by: David Horstmann <david.horstmann@arm.com>
diff --git a/include/psa/crypto_extra.h b/include/psa/crypto_extra.h
index eea9ef8..87ab4d6 100644
--- a/include/psa/crypto_extra.h
+++ b/include/psa/crypto_extra.h
@@ -2043,7 +2043,7 @@
     /* The J-PAKE round we are currently on */
     psa_jpake_round_t MBEDTLS_PRIVATE(round);
     /* The 'mode' we are currently in (inputting or outputting) */
-    psa_jpake_io_mode_t MBEDTLS_PRIVATE(mode);
+    psa_jpake_io_mode_t MBEDTLS_PRIVATE(io_mode);
     /* The number of inputs so far this round */
     uint8_t MBEDTLS_PRIVATE(inputs);
     /* The number of outputs so far this round */
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index 801d35f..9deddde 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -7768,7 +7768,7 @@
             &operation->computation_stage.jpake;
 
         computation_stage->round = PSA_JPAKE_FIRST;
-        computation_stage->mode = PSA_JPAKE_INPUT;
+        computation_stage->io_mode = PSA_JPAKE_INPUT;
         computation_stage->inputs = 0;
         computation_stage->outputs = 0;
         computation_stage->step = PSA_PAKE_STEP_KEY_SHARE;
@@ -7947,7 +7947,7 @@
 {
     if (stage->round == PSA_JPAKE_FIRST) {
         int is_x1;
-        if (stage->mode == PSA_JPAKE_OUTPUT) {
+        if (stage->io_mode == PSA_JPAKE_OUTPUT) {
             is_x1 = (stage->outputs < 1);
         } else {
             is_x1 = (stage->inputs < 1);
@@ -7977,7 +7977,7 @@
             }
         }
     } else if (stage->round == PSA_JPAKE_SECOND) {
-        if (stage->mode == PSA_JPAKE_OUTPUT) {
+        if (stage->io_mode == PSA_JPAKE_OUTPUT) {
             switch (stage->step) {
                 case PSA_PAKE_STEP_KEY_SHARE:
                     return PSA_JPAKE_X2S_STEP_KEY_SHARE;
@@ -8043,7 +8043,7 @@
             psa_jpake_computation_stage_t *computation_stage =
                 &operation->computation_stage.jpake;
             computation_stage->round = PSA_JPAKE_FIRST;
-            computation_stage->mode = PSA_JPAKE_INPUT;
+            computation_stage->io_mode = PSA_JPAKE_INPUT;
             computation_stage->inputs = 0;
             computation_stage->outputs = 0;
             computation_stage->step = PSA_PAKE_STEP_KEY_SHARE;
@@ -8086,8 +8086,8 @@
         computation_stage->outputs == 0) {
         /* Start of the round, so function decides whether we are inputting
          * or outputting */
-        computation_stage->mode = io_mode;
-    } else if (computation_stage->mode != io_mode) {
+        computation_stage->io_mode = io_mode;
+    } else if (computation_stage->io_mode != io_mode) {
         /* Middle of the round so the mode we are in must match the function
          * called by the user */
         return PSA_ERROR_BAD_STATE;
@@ -8121,13 +8121,13 @@
         if (io_mode == PSA_JPAKE_INPUT) {
             stage->inputs++;
             if (stage->inputs >= PSA_JPAKE_EXPECTED_INPUTS(stage->round)) {
-                stage->mode = PSA_JPAKE_OUTPUT;
+                stage->io_mode = PSA_JPAKE_OUTPUT;
             }
         }
         if (io_mode == PSA_JPAKE_OUTPUT) {
             stage->outputs++;
             if (stage->outputs >= PSA_JPAKE_EXPECTED_OUTPUTS(stage->round)) {
-                stage->mode = PSA_JPAKE_INPUT;
+                stage->io_mode = PSA_JPAKE_INPUT;
             }
         }
         if (stage->inputs >= PSA_JPAKE_EXPECTED_INPUTS(stage->round) &&