return QMI_CMD_REQUEST;
}
+static struct qmi_dms_uim_unblock_pin_request dms_unlock_pin_req = {
+ QMI_INIT_SEQUENCE(info,
+ .pin_id = QMI_DMS_UIM_PIN_ID_PIN
+ )
+ };
+
+#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)
+{
+ qmi_set_ptr(&dms_unlock_pin_req, info.new_pin, arg);
+ return QMI_CMD_DONE;
+}
+
+#define cmd_dms_set_puk_cb no_cb
+static enum qmi_cmd_result
+cmd_dms_set_puk_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_ptr(&dms_unlock_pin_req, info.puk, arg);
+ return QMI_CMD_DONE;
+}
+
+#define cmd_dms_unblock_pin1_cb no_cb
+static enum qmi_cmd_result
+cmd_dms_unblock_pin1_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_ptr(&dms_unlock_pin_req, info.pin_id, QMI_DMS_UIM_PIN_ID_PIN);
+
+ if (!dms_unlock_pin_req.data.info.puk || !dms_unlock_pin_req.data.info.new_pin) {
+ uqmi_add_error("Missing argument");
+ return QMI_CMD_EXIT;
+ }
+
+ qmi_set_dms_uim_unblock_pin_request(msg, &dms_unlock_pin_req);
+ return QMI_CMD_REQUEST;
+}
+
+#define cmd_dms_unblock_pin2_cb no_cb
+static enum qmi_cmd_result
+cmd_dms_unblock_pin2_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ qmi_set_ptr(&dms_unlock_pin_req, info.pin_id, QMI_DMS_UIM_PIN_ID_PIN2);
+
+ if (!dms_unlock_pin_req.data.info.puk || !dms_unlock_pin_req.data.info.new_pin) {
+ uqmi_add_error("Missing argument");
+ return QMI_CMD_EXIT;
+ }
+
+ qmi_set_dms_uim_unblock_pin_request(msg, &dms_unlock_pin_req);
+ return QMI_CMD_REQUEST;
+}
+
static void cmd_dms_get_imsi_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
{
struct qmi_dms_uim_get_imsi_response res;
__uqmi_command(dms_get_pin_status, get-pin-status, no, QMI_SERVICE_DMS), \
__uqmi_command(dms_verify_pin1, verify-pin1, required, QMI_SERVICE_DMS), \
__uqmi_command(dms_verify_pin2, verify-pin2, required, 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), \
+ __uqmi_command(dms_set_new_pin, new-pin, required, CMD_TYPE_OPTION), \
__uqmi_command(dms_get_imsi, get-imsi, no, QMI_SERVICE_DMS), \
__uqmi_command(dms_set_operating_mode, set-device-operating-mode, required, QMI_SERVICE_DMS), \
__uqmi_command(dms_reset, reset-dms, no, QMI_SERVICE_DMS) \
" --get-pin-status: Get PIN verification status\n" \
" --verify-pin1 <pin>: Verify PIN1\n" \
" --verify-pin2 <pin>: Verify PIN2\n" \
+ " --unblock-pin1: Unblock PIN1\n" \
+ " --puk <puk>: PUK needed to unblock\n" \
+ " --new-pin <new pin>: New pin\n" \
+ " --unblock-pin2: Unblock PIN2\n" \
+ " --puk <puk>: PUK needed to unblock\n" \
+ " --new-pin <new pin>: New pin\n" \
" --get-imsi: Get International Mobile Subscriber ID\n" \
" --reset-dms: Reset the DMS service\n" \
" --set-device-operating-mode <m> Set the device operating mode\n" \