--- /dev/null
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * Copyright (C) 2016 Felix Fietkau <nbd@nbd.name>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#define cmd_uim_verify_pin1_cb no_cb
+static enum qmi_cmd_result
+cmd_uim_verify_pin1_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ struct qmi_uim_verify_pin_request data = {
+ QMI_INIT_SEQUENCE(info,
+ .pin_id = QMI_UIM_PIN_ID_PIN1,
+ .pin_value = arg
+ )
+ };
+ qmi_set_uim_verify_pin_request(msg, &data);
+ return QMI_CMD_REQUEST;
+}
+
+#define cmd_uim_verify_pin2_cb no_cb
+static enum qmi_cmd_result
+cmd_uim_verify_pin2_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+ struct qmi_uim_verify_pin_request data = {
+ QMI_INIT_SEQUENCE(info,
+ .pin_id = QMI_UIM_PIN_ID_PIN2,
+ .pin_value = arg
+ )
+ };
+ qmi_set_uim_verify_pin_request(msg, &data);
+ return QMI_CMD_REQUEST;
+}
--- /dev/null
+/*
+ * uqmi -- tiny QMI support implementation
+ *
+ * Copyright (C) 2016 Felix Fietkau <nbd@nbd.name>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ */
+
+#define __uqmi_uim_commands \
+ __uqmi_command(uim_verify_pin1, uim-verify-pin1, required, QMI_SERVICE_UIM), \
+ __uqmi_command(uim_verify_pin2, uim-verify-pin2, required, QMI_SERVICE_UIM) \
+
+
+#define uim_helptext \
+ " --uim-verify-pin1 <pin>: Verify PIN1 (new devices)\n" \
+ " --uim-verify-pin2 <pin>: Verify PIN2 (new devices)\n" \
+
#include "commands-nas.c"
#include "commands-wms.c"
#include "commands-wda.c"
+#include "commands-uim.c"
#define __uqmi_command(_name, _optname, _arg, _type) \
[__UQMI_COMMAND_##_name] = { \
#include "commands-nas.h"
#include "commands-wms.h"
#include "commands-wda.h"
+#include "commands-uim.h"
enum qmi_cmd_result {
QMI_CMD_DONE,
__uqmi_dms_commands, \
__uqmi_nas_commands, \
__uqmi_wms_commands, \
- __uqmi_wda_commands
+ __uqmi_wda_commands, \
+ __uqmi_uim_commands
#define __uqmi_command(_name, _optname, _arg, _option) __UQMI_COMMAND_##_name
enum uqmi_command {
{ "wds", QMI_SERVICE_WDS },
{ "wms", QMI_SERVICE_WMS },
{ "wda", QMI_SERVICE_WDA },
+ { "uim", QMI_SERVICE_UIM },
};
int i;
" (implies --keep-client-id)\n"
wds_helptext
dms_helptext
+ uim_helptext
nas_helptext
wms_helptext
wda_helptext