Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1 | /* Copyright (c) 2010, Code Aurora Forum. All rights reserved. |
| 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | * |
| 12 | */ |
| 13 | |
| 14 | #ifndef _MSM_RMNET_H_ |
| 15 | #define _MSM_RMNET_H_ |
| 16 | |
| 17 | /* Bitmap macros for RmNET driver operation mode. */ |
| 18 | #define RMNET_MODE_NONE (0x00) |
| 19 | #define RMNET_MODE_LLP_ETH (0x01) |
| 20 | #define RMNET_MODE_LLP_IP (0x02) |
| 21 | #define RMNET_MODE_QOS (0x04) |
| 22 | #define RMNET_MODE_MASK (RMNET_MODE_LLP_ETH | \ |
| 23 | RMNET_MODE_LLP_IP | \ |
| 24 | RMNET_MODE_QOS) |
| 25 | |
| 26 | #define RMNET_IS_MODE_QOS(mode) \ |
| 27 | ((mode & RMNET_MODE_QOS) == RMNET_MODE_QOS) |
| 28 | #define RMNET_IS_MODE_IP(mode) \ |
| 29 | ((mode & RMNET_MODE_LLP_IP) == RMNET_MODE_LLP_IP) |
| 30 | |
| 31 | /* IOCTL command enum |
| 32 | * Values chosen to not conflict with other drivers in the ecosystem */ |
| 33 | enum rmnet_ioctl_cmds_e { |
| 34 | RMNET_IOCTL_SET_LLP_ETHERNET = 0x000089F1, /* Set Ethernet protocol */ |
| 35 | RMNET_IOCTL_SET_LLP_IP = 0x000089F2, /* Set RAWIP protocol */ |
| 36 | RMNET_IOCTL_GET_LLP = 0x000089F3, /* Get link protocol */ |
| 37 | RMNET_IOCTL_SET_QOS_ENABLE = 0x000089F4, /* Set QoS header enabled */ |
| 38 | RMNET_IOCTL_SET_QOS_DISABLE = 0x000089F5, /* Set QoS header disabled*/ |
| 39 | RMNET_IOCTL_GET_QOS = 0x000089F6, /* Get QoS header state */ |
| 40 | RMNET_IOCTL_GET_OPMODE = 0x000089F7, /* Get operation mode */ |
| 41 | RMNET_IOCTL_OPEN = 0x000089F8, /* Open transport port */ |
| 42 | RMNET_IOCTL_CLOSE = 0x000089F9, /* Close transport port */ |
Tianyi Gou | 747a936 | 2012-08-06 17:24:25 -0700 | [diff] [blame^] | 43 | RMNET_IOCTL_FLOW_ENABLE = 0x000089FA, /* Flow enable */ |
| 44 | RMNET_IOCTL_FLOW_DISABLE = 0x000089FB, /* Flow disable */ |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 45 | RMNET_IOCTL_MAX |
| 46 | }; |
| 47 | |
| 48 | /* QMI QoS header definition */ |
| 49 | #define QMI_QOS_HDR_S __attribute((__packed__)) qmi_qos_hdr_s |
| 50 | struct QMI_QOS_HDR_S { |
| 51 | unsigned char version; |
| 52 | unsigned char flags; |
| 53 | unsigned long flow_id; |
| 54 | }; |
| 55 | |
| 56 | #endif /* _MSM_RMNET_H_ */ |