• source navigation  • diff markup  • identifier search  • freetext search  • 

Sources/uqmi/commands-uim.c

  1 /*
  2  * uqmi -- tiny QMI support implementation
  3  *
  4  * Copyright (C) 2016 Felix Fietkau <nbd@nbd.name>
  5  *
  6  * This library is free software; you can redistribute it and/or
  7  * modify it under the terms of the GNU Lesser General Public
  8  * License as published by the Free Software Foundation; either
  9  * version 2 of the License, or (at your option) any later version.
 10  *
 11  * This library is distributed in the hope that it will be useful,
 12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 14  * Lesser General Public License for more details.
 15  *
 16  * You should have received a copy of the GNU Lesser General Public
 17  * License along with this library; if not, write to the
 18  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 19  * Boston, MA 02110-1301 USA.
 20  */
 21 
 22 #define cmd_uim_verify_pin1_cb no_cb
 23 static enum qmi_cmd_result
 24 cmd_uim_verify_pin1_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
 25 {
 26         struct qmi_uim_verify_pin_request data = {
 27                 QMI_INIT_SEQUENCE(session_information,
 28                         .session_type = QMI_UIM_SESSION_TYPE_CARD_SLOT_1,
 29                         ""
 30                 ),
 31                 QMI_INIT_SEQUENCE(info,
 32                         .pin_id = QMI_UIM_PIN_ID_PIN1,
 33                         .pin_value = arg
 34                 )
 35         };
 36         qmi_set_uim_verify_pin_request(msg, &data);
 37         return QMI_CMD_REQUEST;
 38 }
 39 
 40 #define cmd_uim_verify_pin2_cb no_cb
 41 static enum qmi_cmd_result
 42 cmd_uim_verify_pin2_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
 43 {
 44         struct qmi_uim_verify_pin_request data = {
 45                 QMI_INIT_SEQUENCE(session_information,
 46                         .session_type = QMI_UIM_SESSION_TYPE_CARD_SLOT_1,
 47                         ""
 48                 ),
 49                 QMI_INIT_SEQUENCE(info,
 50                         .pin_id = QMI_UIM_PIN_ID_PIN2,
 51                         .pin_value = arg
 52                 )
 53         };
 54         qmi_set_uim_verify_pin_request(msg, &data);
 55         return QMI_CMD_REQUEST;
 56 }
 57 

This page was automatically generated by LXR 0.3.1.  •  OpenWrt