return cmd_dms_set_pin_protection_prepare(msg, arg);
}
+static enum qmi_cmd_result
+cmd_dms_change_pin_prepare(struct qmi_msg *msg, char *arg)
+{
+ if (!dms_req_data.pin || !dms_req_data.new_pin) {
+ uqmi_add_error("Missing argument");
+ return QMI_CMD_EXIT;
+ }
+
+ struct qmi_dms_uim_change_pin_request dms_change_pin_req = {
+ QMI_INIT_SEQUENCE(info,
+ .pin_id = dms_req_data.pin_id
+ ),
+ QMI_INIT_PTR(info.old_pin, dms_req_data.pin),
+ QMI_INIT_PTR(info.new_pin, dms_req_data.new_pin)
+ };
+
+ qmi_set_dms_uim_change_pin_request(msg, &dms_change_pin_req);
+ return QMI_CMD_REQUEST;
+}
+
+#define cmd_dms_change_pin1_cb no_cb
+static enum qmi_cmd_result
+cmd_dms_change_pin1_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ dms_req_data.pin_id = QMI_DMS_UIM_PIN_ID_PIN;
+ return cmd_dms_change_pin_prepare(msg, arg);
+}
+
+#define cmd_dms_change_pin2_cb no_cb
+static enum qmi_cmd_result
+cmd_dms_change_pin2_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ dms_req_data.pin_id = QMI_DMS_UIM_PIN_ID_PIN2;
+ return cmd_dms_change_pin_prepare(msg, arg);
+}
+
#define cmd_dms_set_new_pin_cb no_cb
static enum qmi_cmd_result
cmd_dms_set_new_pin_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
__uqmi_command(dms_set_pin1_protection, set-pin1-protection, required, QMI_SERVICE_DMS), \
__uqmi_command(dms_set_pin2_protection, set-pin2-protection, required, QMI_SERVICE_DMS), \
__uqmi_command(dms_set_pin, pin, required, CMD_TYPE_OPTION), \
+ __uqmi_command(dms_change_pin1, change-pin1, no, QMI_SERVICE_DMS), \
+ __uqmi_command(dms_change_pin2, change-pin2, no, QMI_SERVICE_DMS), \
__uqmi_command(dms_unblock_pin1, unblock-pin1, no, QMI_SERVICE_DMS), \
__uqmi_command(dms_unblock_pin2, unblock-pin2, no, QMI_SERVICE_DMS), \
__uqmi_command(dms_set_puk, puk, required, CMD_TYPE_OPTION), \
" --pin <pin>: PIN1 needed to change state\n" \
" --set-pin2-protection <state>: Set PIN2 protection state (disabled, enabled)\n" \
" --pin <pin2>: PIN2 needed to change state\n" \
+ " --change-pin1: Change PIN1\n" \
+ " --pin <old pin>: Current PIN1\n" \
+ " --new-pin <new pin>: New pin\n" \
+ " --change-pin2: Change PIN2\n" \
+ " --pin <old pin>: Current PIN2\n" \
+ " --new-pin <new pin>: New pin\n" \
" --unblock-pin1: Unblock PIN1\n" \
" --puk <puk>: PUK needed to unblock\n" \
" --new-pin <new pin>: New pin\n" \