Files
ubports_kernel_google_msm/include/linux/msm_rmnet.h
Brian Swetland 2e94b215a4 [ARM] msm: driver for rmnet virtual ethernet interface
The MSM7X00A baseband makes up to 3 "virtual ethernet" channels available,
which allow ethernet packets to be exchanged with the cellular network, once
an appropriate data connection is established.

Signed-off-by: Brian Swetland <swetland@google.com>
Signed-off-by: San Mehat <san@android.com>

[ARM] msm_rmnet: HACK: do not count ARP packets

The android network traffic watchdog is tricked into thinking that
data traffic is working at times when it isn't, due to ARP traffic
between the apps and modem processor.  Don't count ARP packets in
link statistics to avoid this problem.

[ARM] msm: rmnet: Add stat tracking for number of radio wakeups occur.

There are two paramaters that appear for all rmnet devices.

rmnet0 for example:
/sys/devices/virtual/net/rmnet0/timeout (RW)
/sys/devices/virtual/net/rmnet0/wakeups (RO)

timeout is configured by userspace for the proper network timeout values
wakeups is the number of radio wakeups that occured.

By default timeout is zero which means the stats are disabled.

MSM_RMNET_DEBUG must be set.

Signed-off-by: Mike Chan <mike@android.com>

[ARM] msm: rmnet: Track wakeups due to xmit/rcv instead of globally.

Signed-off-by: Mike Chan <mike@android.com>

[ARM] msm: rmnet: Different stat timeouts when screen is on/off.

Timeout for modem powerdown can differ when the screen is on/off.
Allow timeout to change via early suspend/resume hooks.

Signed-off-by: Mike Chan <mike@android.com>

[ARM] msm: rmnet: Lock a wakelock for half a second when receiving data.

Signed-off-by: Arve Hjønnevåg <arve@android.com>

[ARM] msm: rmnet: Tracks total awake time when the rmnet is active.

Exports data in /sys/devices/virtual/net/rmnet0/awake_time_ms
in time expressed as ms awake.

Signed-off-by: Mike Chan <mike@android.com>

[ARM] msm: rmnet: Fix compilation issue when MSM_RMNET_DEBUG is not set.

Signed-off-by: Dima Zavin <dima@android.com>

msm_rmnet: fix to build on 2.6.32

Change-Id: Ic6a4903dd12ea83723354d00f639ae2f9375167f

msm_rmnet: ensure packet writes are atomic

Use the smd_write_atomic() function to prevent concurrent
packet writes to the transport from stepping on each other.

Signed-off-by: Brian Swetland <swetland@google.com>
2013-02-25 11:32:02 -08:00

55 lines
2.0 KiB
C

/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef _MSM_RMNET_H_
#define _MSM_RMNET_H_
/* Bitmap macros for RmNET driver operation mode. */
#define RMNET_MODE_NONE (0x00)
#define RMNET_MODE_LLP_ETH (0x01)
#define RMNET_MODE_LLP_IP (0x02)
#define RMNET_MODE_QOS (0x04)
#define RMNET_MODE_MASK (RMNET_MODE_LLP_ETH | \
RMNET_MODE_LLP_IP | \
RMNET_MODE_QOS)
#define RMNET_IS_MODE_QOS(mode) \
((mode & RMNET_MODE_QOS) == RMNET_MODE_QOS)
#define RMNET_IS_MODE_IP(mode) \
((mode & RMNET_MODE_LLP_IP) == RMNET_MODE_LLP_IP)
/* IOCTL command enum
* Values chosen to not conflict with other drivers in the ecosystem */
enum rmnet_ioctl_cmds_e {
RMNET_IOCTL_SET_LLP_ETHERNET = 0x000089F1, /* Set Ethernet protocol */
RMNET_IOCTL_SET_LLP_IP = 0x000089F2, /* Set RAWIP protocol */
RMNET_IOCTL_GET_LLP = 0x000089F3, /* Get link protocol */
RMNET_IOCTL_SET_QOS_ENABLE = 0x000089F4, /* Set QoS header enabled */
RMNET_IOCTL_SET_QOS_DISABLE = 0x000089F5, /* Set QoS header disabled*/
RMNET_IOCTL_GET_QOS = 0x000089F6, /* Get QoS header state */
RMNET_IOCTL_GET_OPMODE = 0x000089F7, /* Get operation mode */
RMNET_IOCTL_OPEN = 0x000089F8, /* Open transport port */
RMNET_IOCTL_CLOSE = 0x000089F9, /* Close transport port */
RMNET_IOCTL_MAX
};
/* QMI QoS header definition */
#define QMI_QOS_HDR_S __attribute((__packed__)) qmi_qos_hdr_s
struct QMI_QOS_HDR_S {
unsigned char version;
unsigned char flags;
unsigned long flow_id;
};
#endif /* _MSM_RMNET_H_ */