blob: 9f524649102126688eab51017e01f3776e24f544 [file] [log] [blame]
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001/* 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 */
33enum 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 */
43 RMNET_IOCTL_MAX
44};
45
46/* QMI QoS header definition */
47#define QMI_QOS_HDR_S __attribute((__packed__)) qmi_qos_hdr_s
48struct QMI_QOS_HDR_S {
49 unsigned char version;
50 unsigned char flags;
51 unsigned long flow_id;
52};
53
54#endif /* _MSM_RMNET_H_ */