123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- #ifndef _QMI_INTERFACE_PRIV_H_
- #define _QMI_INTERFACE_PRIV_H_
- #include <linux/types.h>
- #include <linux/errno.h>
- #include <linux/mm.h>
- #include <linux/list.h>
- #include <linux/socket.h>
- #include <linux/gfp.h>
- #include <linux/platform_device.h>
- #include <linux/qmi_encdec.h>
- #include <soc/qcom/msm_qmi_interface.h>
- enum txn_type {
- QMI_SYNC_TXN = 1,
- QMI_ASYNC_TXN,
- };
- enum handle_type {
- QMI_CLIENT_HANDLE = 1,
- QMI_SERVICE_HANDLE,
- };
- struct qmi_txn {
- struct list_head list;
- uint16_t txn_id;
- enum txn_type type;
- struct qmi_handle *handle;
- void *enc_data;
- unsigned int enc_data_len;
- struct msg_desc *resp_desc;
- void *resp;
- unsigned int resp_len;
- int resp_received;
- int send_stat;
- void (*resp_cb)(struct qmi_handle *handle, unsigned int msg_id,
- void *msg, void *resp_cb_data, int stat);
- void *resp_cb_data;
- wait_queue_head_t wait_q;
- };
- struct svc_addr {
- struct list_head list_node;
- struct msm_ipc_port_addr port_addr;
- };
- struct svc_event_nb {
- spinlock_t nb_lock;
- uint32_t service_id;
- uint32_t instance_id;
- struct raw_notifier_head svc_event_rcvr_list;
- struct list_head list;
- struct mutex svc_addr_list_lock;
- struct list_head svc_addr_list;
- };
- struct req_handle {
- struct list_head list;
- struct qmi_svc_clnt_conn *conn_h;
- uint16_t msg_id;
- uint16_t txn_id;
- };
- struct qmi_svc_clnt_conn {
- struct list_head list;
- void *svc_handle;
- void *clnt_addr;
- size_t clnt_addr_len;
- struct list_head req_handle_list;
- struct delayed_work resume_tx_work;
- struct list_head pending_txn_list;
- struct mutex pending_txn_lock;
- };
- #endif
|