1 #ifndef _MSM_RMNET_H_ 2 #define _MSM_RMNET_H_ 3 4 /* Bitmap macros for RmNET driver operation mode. */ 5 #define RMNET_MODE_NONE (0x00) 6 #define RMNET_MODE_LLP_ETH (0x01) 7 #define RMNET_MODE_LLP_IP (0x02) 8 #define RMNET_MODE_QOS (0x04) 9 #define RMNET_MODE_MASK (RMNET_MODE_LLP_ETH | \ 10 RMNET_MODE_LLP_IP | \ 11 RMNET_MODE_QOS) 12 13 #define RMNET_IS_MODE_QOS(mode) \ 14 ((mode & RMNET_MODE_QOS) == RMNET_MODE_QOS) 15 #define RMNET_IS_MODE_IP(mode) \ 16 ((mode & RMNET_MODE_LLP_IP) == RMNET_MODE_LLP_IP) 17 18 /* IOCTL command enum 19 * Values chosen to not conflict with other drivers in the ecosystem */ 20 enum rmnet_ioctl_cmds_e { 21 RMNET_IOCTL_SET_LLP_ETHERNET = 0x000089F1, /* Set Ethernet protocol */ 22 RMNET_IOCTL_SET_LLP_IP = 0x000089F2, /* Set RAWIP protocol */ 23 RMNET_IOCTL_GET_LLP = 0x000089F3, /* Get link protocol */ 24 RMNET_IOCTL_SET_QOS_ENABLE = 0x000089F4, /* Set QoS header enabled */ 25 RMNET_IOCTL_SET_QOS_DISABLE = 0x000089F5, /* Set QoS header disabled*/ 26 RMNET_IOCTL_GET_QOS = 0x000089F6, /* Get QoS header state */ 27 RMNET_IOCTL_GET_OPMODE = 0x000089F7, /* Get operation mode */ 28 RMNET_IOCTL_OPEN = 0x000089F8, /* Open transport port */ 29 RMNET_IOCTL_CLOSE = 0x000089F9, /* Close transport port */ 30 RMNET_IOCTL_FLOW_ENABLE = 0x000089FA, /* Flow enable */ 31 RMNET_IOCTL_FLOW_DISABLE = 0x000089FB, /* Flow disable */ 32 RMNET_IOCTL_MAX 33 }; 34 35 /* QMI QoS header definition */ 36 #define QMI_QOS_HDR_S __attribute((__packed__)) qmi_qos_hdr_s 37 struct QMI_QOS_HDR_S { 38 unsigned char version; 39 unsigned char flags; 40 unsigned long flow_id; 41 }; 42 43 #endif /* _MSM_RMNET_H_ */ 44