OLD | NEW |
(Empty) | |
| 1 /* qmi.h - QMI protocol header |
| 2 * Copyright (c) 2010, Code Aurora Forum. All rights reserved. |
| 3 |
| 4 * This program is free software; you can redistribute it and/or modify |
| 5 * it under the terms of the GNU General Public License version 2 and |
| 6 * only version 2 as published by the Free Software Foundation. |
| 7 |
| 8 * This program is distributed in the hope that it will be useful, |
| 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 * GNU General Public License for more details. |
| 12 |
| 13 * You should have received a copy of the GNU General Public License |
| 14 * along with this program; if not, write to the Free Software |
| 15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
| 16 * 02110-1301, USA. |
| 17 */ |
| 18 |
| 19 #ifndef QCUSBNET_QMI_H |
| 20 #define QCUSBNET_QMI_H |
| 21 |
| 22 #include <linux/types.h> |
| 23 |
| 24 #define QMICTL 0 |
| 25 #define QMIWDS 1 |
| 26 #define QMIDMS 2 |
| 27 |
| 28 #define true 1 |
| 29 #define false 0 |
| 30 |
| 31 #define ENOMEM 12 |
| 32 #define EFAULT 14 |
| 33 #define EINVAL 22 |
| 34 #define ENOMSG 42 |
| 35 #define ENODATA 61 |
| 36 |
| 37 int qmux_parse(u16 *cid, void *buf, size_t size); |
| 38 int qmux_fill(u16 cid, void *buf, size_t size); |
| 39 |
| 40 extern const size_t qmux_size; |
| 41 |
| 42 void *qmictl_new_getcid(u8 tid, u8 svctype, size_t *size); |
| 43 void *qmictl_new_releasecid(u8 tid, u16 cid, size_t *size); |
| 44 void *qmictl_new_ready(u8 tid, size_t *size); |
| 45 void *qmiwds_new_seteventreport(u8 tid, size_t *size); |
| 46 void *qmiwds_new_getpkgsrvcstatus(u8 tid, size_t *size); |
| 47 void *qmidms_new_getmeid(u8 tid, size_t *size); |
| 48 |
| 49 struct qmiwds_stats { |
| 50 u32 txok; |
| 51 u32 rxok; |
| 52 u32 txerr; |
| 53 u32 rxerr; |
| 54 u32 txofl; |
| 55 u32 rxofl; |
| 56 u64 txbytesok; |
| 57 u64 rxbytesok; |
| 58 bool linkstate; |
| 59 bool reconfigure; |
| 60 }; |
| 61 |
| 62 int qmictl_alloccid_resp(void *buf, u16 size, u16 *cid); |
| 63 int qmictl_freecid_resp(void *buf, u16 size); |
| 64 int qmiwds_event_resp(void *buf, u16 size, struct qmiwds_stats *stats); |
| 65 int qmidms_meid_resp(void *buf, u16 size, char *meid, int meidsize); |
| 66 |
| 67 #endif /* !QCUSBNET_QMI_H */ |
OLD | NEW |