Commit Graph

301302 Commits

Author SHA1 Message Date
Angshuman Sarkar
f15e9af3ff n_smux: Fix compilation when CONFIG_N_SMUX is undefined
Fix compilation issues when CONFIG_N_SMUX is undefined and
empty stub functions are getting defined.

Change-Id: I6a9982dac7d9558b8da533f1fc28dddac6c1f8fc
Signed-off-by: Angshuman Sarkar <angshuman@codeaurora.org>
2013-02-25 11:32:44 -08:00
Eric Holmberg
89e04ba097 tty: n_smux: Add Dedicated Power Control Queue
The current design uses the existing channel queues for sending power
commands along with a command filter in the TX worker that always sends
all command messages for queues as long as the TTY UART link is up.
This can allow open and close events to be sent between a request to
power down the link and before the ACK has been received that actually
powers down the link.

Update the implementation to add a dedicated control channel for
power-control commands and bytes.  All power commands and bytes are now
sent by the TX worker that properly prioritizes the power commands over
logical channel commands.

CRs-Fixed: 369044
Change-Id: I05c080885c79c3510d02cc360bdfe879d68a962c
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-02-25 11:32:43 -08:00
Eric Holmberg
fd97f18e5f tty: n_smux: Add support for SMUX subsystem restart
Support subsystem restart for SMUX which includes being able to load and
unload the SMUX TTY Line Discipline.

The TTY port is shared between SMUX and memory dump collection which
requires support for gracefully disconnecting after a remote modem
crash and then reconnect after the modem has been rebooted.

CRs-Fixed: 368263
Change-Id: I0fea4c5f0f13c88282f33a7677ac5fd16dc690d9
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-02-25 11:32:42 -08:00
Eric Holmberg
760045e36d tty: n_smux: Add exponential backoff for RX buffer failures
If a client is unable to allocate a buffer for an incoming packet, the
current software retries once without a delay and then drops the packet.
This causes issues for some clients that use flip buffers for processing
RX data.

This change changes the get_rx_buffer callback failure handling to do an
exponential-backoff retry giving the client time to free up a buffer for
processing.

Change-Id: I3284824a7d5a1d8a03314eebdb4488aaf560440c
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-02-25 11:32:41 -08:00
Eric Holmberg
36d935bfaa tty: n_smux: Update power-collapse-enabled debug message
Only print power-collapse-enabled message when it is first enabled.

Change-Id: I4b645a0eb345f03762fc1e44eaf953511937db56
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-02-25 11:32:40 -08:00
Eric Holmberg
522a36e965 tty: n_smux: Add RX workqueue to reduce locking
To prevent multiple RX operations from overlapping, locking is currently
used during the entire RX operation which also includes calling the
client get_rx_buffer callback in atomic context.

To reduce locking, the RX processing has been moved to a single-threaded
workqueue which ensures serialization of the RX operations.  This
minimizes locking requirements and eliminates locking around
get_rx_buffer allowing the client to use GFP_KERNEL instead of
GFP_ATOMIC for memory allocation.

Change-Id: Ib87523191aa77f899fadb7667def58d94579c547
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-02-25 11:32:39 -08:00
Eric Holmberg
d38c35a6ca tty: n_smux: Remove unused power bit
Remove power control bit that is no longer used and is no longer part of
the SMUX protocol.

Change-Id: I727eb7d848d5298c146919f2299a86d17643253f
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-02-25 11:32:39 -08:00
Eric Holmberg
65dfb245ce tty: n_smux: Fix scheduling while atomic issue for ldisc open/close
Unlock spinlock when calling platform_device functions during line
discipline (ldisc) loading an unloading.

This fixes a potential scheduling while atomic condition if the platform
device code needs to allocate memory.

Change-Id: I7dbf15dc62b2276393272392a038c1d846ea2419
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-02-25 11:32:38 -08:00
Eric Holmberg
c620def47d n_smux: smux_ctl: Disable local loopback
For development, the local loopback mode was used.  Now that
the full system is ready, disable loopback mode to enable
communication with the remote system.

Change-Id: I24bee29b3fa41690ccbaf8992ecb3cb166dc3ffc
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-02-25 11:32:37 -08:00
Eric Holmberg
01d77d4834 n_smux: smux_ctl: Userspace character device interface for SMUX
QMUXD from user-space will use this interface to communicate
control plane QMI messages between APPs and QSC modem in Fusion 4.

Change-Id: I2f51f6927a6f92b106548d22c3965575d4468d5a
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2013-02-25 11:32:36 -08:00
Eric Holmberg
d68384d72e tty: n_smux: Add SMUX TTY Line Discipline Driver
Add new Serial Multiplexer (SMUX) driver.

This driver multiplexes multiple logical channels over a single
physical HSUART channel using the TTY Line Discipline framework.
This driver will be used in Fusion 4 for control plane, data plane
and DIAG traffic between Application processor and QSC modem.

Change-Id: Ibecf6cea872f5baf11fb93ded6124243a37a2085
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Signed-off-by: Angshuman Sarkar <angshuman@codeaurora.org>
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-02-25 11:32:35 -08:00
San Mehat
6944ad25e1 [ARM] msm: RTC driver for Qualcomm MSM7K chipsets
Create a virtual RTC alarm which restricts max suspend sleep time.

Since the QCT RTC alarm doesn't work properly (yet), we need to clamp the
max suspend sleep time if there is an alarm set for the future.  This
ensures that the device will be awake when the virtual RTC alarm needs to
be triggered.

Signed-off-by: San Mehat <san@android.com>
2013-02-25 11:32:34 -08:00
Stephen Boyd
3668c403db rtc: Add MSM RTC driver
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-02-25 11:32:34 -08:00
Ashay Jaiswal
6b6a72adc0 drivers: rtc-pm8xxx: Fix automatic wakeup of APPS due to RTC alarm.
Alarm interrupt causes automatic wakeup even when the phone is in
powerdown state.

Change-Id: If3ae30304adba4f07284a3dc496956d67a1ae1b0
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2013-02-25 11:32:33 -08:00
Abhijeet Dharmapurikar
171e735d80 power: Add pm8921 battery monitoring driver
pm8921 chip is equipped with a smart battery gauge called bms.
BMS is capable of intelligently measuring battery parameters
under various loads, the software uses these reading to
accurately determine battery capacity.

Add driver for the bms module.

Change-Id: I0655c19bc9edc6aea15fb66b4de8d647a305416f
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2013-02-25 11:32:32 -08:00
Jay Chokshi
355b33f3a2 power_supply: Add driver for LTC4088 Charger
LTC4088 is high efficiency USB powerpath controller
and Li-Ion/Polymer battery charger. This driver
enables the charger, allows to set current limits,
and detection.

Change-Id: I844431210cfd6e71d02fa7ffb730ee56d8417273
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
2013-02-25 11:32:31 -08:00
Abhijeet Dharmapurikar
ad0383bf14 power: pm8xxx-ccadc: Add pm8xxx ccadc subdevice
Until now only the BMS system was using the ccadc so there was
no need to create a separate ccadc driver.

However we can run in a configuration with BMS disabled
and clients won't be able to read battery current via ccadc.

Separate the ccadc from the bms, this change in is preparation
to add a ccadc api to read the battery current.

Change-Id: Ib96b146d91d01d196df9291eb23432cd430db4d0
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2013-02-25 11:32:30 -08:00
Abhijeet Dharmapurikar
fcdba5c296 power: pm8921_charger: Add charger driver
Change-Id: I76671b841668aea365c72729e046fb37c15f671b
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2013-02-25 11:32:29 -08:00
Abhijeet Dharmapurikar
7c797a3451 power: add bq27541 battery gauge
Change-Id: I618f7ba1250e5e876159dc6bc9ed5853e34ea81c
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2013-02-25 11:32:29 -08:00
Lei Zhou
1c908f7548 power: add bq27520 fuel gauge driver
Change-Id: I542110930ff5db4ff1b7aa0208666b828d675ae5
Signed-off-by: Lei Zhou <leizhou@codeaurora.org>
2013-02-25 11:32:28 -08:00
Benson Leung
7a952246cb add battery driver in st1.5
BUG=NONE
TEST=Built and ran on st1.5
Signed-off-by: Horace Fu <horace.fu@quantatw.com>

Review URL: http://codereview.chromium.org/1637005
(cherry picked from commit 2fffb8921503d2fc3a1d7ecf5e52c8512bfd9b18)

Signed-off-by: Benson Leung <bleung@chromium.org>

Review URL: http://codereview.chromium.org/2850001

Change-Id: Ic43ec80dbf9b3c682f1a3742f543781550f86436
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
2013-02-25 11:32:27 -08:00
Abhijeet Dharmapurikar
842ab8e171 power: Add pm8058_usb_fix driver
Implement workaround for stuck VCHG.

Some boards do not use the charging feature of the pmic8058 chip. They
however need the software workaround for an issue where the VCHG remains
high even when the USB cable it removed.

Change-Id: Ic92ac0cd913ce88b86706ea013d17789f1acf791
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2013-02-25 11:32:26 -08:00
David Keitel
b95cf891f0 power: smb349: add support for smb349 charger chip
The SMB349 charger chip allows charge batteries
with a higher current. Add this driver to be able to
control charging from kernel space and deliver charging
information to userspace.

Also add debugfs entries to show current register
settings of SMB349 charger.

Change-Id: Ic88b539304539a49ebe69517d13045cbb18091bf
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
2013-02-25 11:32:25 -08:00
Abhijeet Dharmapurikar
dc3b279384 smb137b: Add smb137b charger driver
The smb137b chip from SUMMIT is a Switch Mode charger chip capable
of charging through USB source. It can also provide VBUS when the
system is a host.  The driver exposes the charger properties via
the power_supply class. It also interacts with the usb driver for
insertion/removal notifications and charge current information.
The driver also turns off charging and switches to providing VBUS
when told to do so by USB driver.

Change-Id: I0ace31b9e1c7780bc9b40d5a2572340dc97966ac
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2013-02-25 11:32:24 -08:00
Abhijeet Dharmapurikar
b21c851094 msm_charger: Add driver for isl9519q charger
The 8660 FFA has an external smp charger chip from Intersil. Add
the isl9519q charger driver to enable charging from this chip.

Change-Id: I2705c14858f68acc273ed63a0c1e669cb7bc63d9
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2013-02-25 11:32:24 -08:00
Abhijeet Dharmapurikar
858ed5f036 pmic8058: Add pmic8058 charger driver
Change-Id: I1a99f7305d2ab1e30421490bba180120703aa5a2
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2013-02-25 11:32:23 -08:00
Abhijeet Dharmapurikar
36cf1ca7ba msm: charger: Add msm_charger
MSM 8660 FFA has two charging paths one via an SMPS charger chip isl9519q
and other via the pmic 8058 chip's linear charger.
Write a driver which talks to the power supply framework and also decides
the optimal charging path depending on the charging cable presence and
battery capacity.

Change-Id: Id00ba526651cb8da688b48b4d1e1d1eb178c1e87
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2013-02-25 11:32:22 -08:00
Kiran Kandi
b73acff6c5 msm_battery: battery driver for Qualcomm MSM chipsets.
Battery driver for reporting status of battery and charger.

Signed-off-by: Kiran Kandi <kkandi@quicinc.com>
2013-02-25 11:32:21 -08:00
David Keitel
b33eb64fa4 power: core: add power supply APIs
Rename power_supply_set_charging_by to power_supply_set_online to
more accurately reflect the intent of the API.

Add power_supply_set_charge_type to enable a charger driver to set
a POWER_SUPPLY_PROP_CHARGE_TYPE. Ultimately this is handled like
a request, the receiving charger driver then can handle the request
and report the adequate POWER_SUPPLY_PROP_CHARGE_TYPE once necessary
action has been taken.

Change-Id: Idf4760c7d6c0f61a9eccc656cd469a6ac5fdc6cd
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
2013-02-25 11:32:20 -08:00
Willie Ruan
556c6f2f0c power: core: add power supply APIs
Add two APIs, 1) set_current_limit API and 2) set_charging_by.
set_current_limit api is used for external control, such as for USB
driver to tell a charger driver the maximum current to draw.
set_charging_by is used to change the state of the charger.

Change-Id: I147eab37836b54627ca1458167eb117ba3eacd7a
Signed-off-by: Willie Ruan <wruan@codeaurora.org>
2013-02-25 11:32:19 -08:00
Ofir Cohen
006e91b4a3 usb: gadget: SPS BAM-to-BAM - USB BAM driver
USB BAM driver to support BAM-to-BAM
USB<->Peripheral transactions.

Change-Id: Ib49a41f5dcdccb6f6bff2492fa64ead40f18b870
Signed-off-by: Ofir Cohen <ofirc@codeaurora.org>
2013-02-25 11:32:19 -08:00
Amir Samuelov
90dc7b8180 platform-drivers: msm: sps: Smart Peripheral System (SPS) driver
The driver controls the SPS hardware DMA to move data in the following
modes:

1. Peripheral-to-Peripheral
2. Peripheral-to-Memory
3. Memory-to-Memory

This driver complies to BAM hardware version#2.

Change-Id: I1b2b503893cf6891b47201da0f44a47ce7511ece
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
Signed-off-by: Kenneth Heitke <kheitke@codeaurora.org>
2013-02-25 11:32:18 -08:00
Kenneth Heitke
75b4a3b6f1 platform-drivers: msm: add single-wire serial bus interface (SSBI) driver
SSBI is the Qualcomm single-wire serial bus interface used to connect
the MSM devices to the PMIC and other devices.

Since SSBI only supports a single slave, the driver gets the name of the
slave device passed in from the board file through the master device's
platform data.

SSBI registers pretty early (postcore), so that the PMIC can come up
before the board init. This is useful if the board init requires the
use of gpios that are connected through the PMIC.

Based on a patch by Dima Zavin <dima@android.com> that can be found at:
http://android.git.kernel.org/?p=kernel/msm.git;a=commitdiff;h=eb060bac4

This patch adds PMIC Arbiter support for the MSM8660. The PMIC Arbiter
is a hardware wrapper around the SSBI 2.0 controller that is designed to
overcome concurrency issues and security limitations.  A controller_type
field is added to the platform data to specify the type of the SSBI
controller (1.0, 2.0, or PMIC Arbiter).

Change-Id: Ic37e1505f0ed7cfb8c5926a4c8d1770aa43e67cc
Signed-off-by: Kenneth Heitke <kheitke@codeaurora.org>
2013-02-25 11:32:17 -08:00
Stephen Boyd
fc7a3d36a8 drivers: Start MSM platform directory 2013-02-25 11:32:16 -08:00
Yunsen Wang
8324333c5b net: wireless: wcnss: Initial version of the WCNSS WLAN Driver
This is the initial version of the Wireless ConNectivity SubSystem (WCNSS)
WLAN driver. The WCNSS is a new Hardware integrating WLAN, BT and FM
technologies that is built into new MSM chip. This version of the driver
does basic WLAN device detection, WLAN SMD channel allocation probing and
trigger the PIL to download the WCNSS SW image.

Change-Id: I054566453152e8d8d02f79693e6a51f26d047835
Acked-by: Jeff Johnson <jjohnson@qualcomm.com>
Signed-off-by: Yunsen Wang <yunsenw@codeaurora.org>
2013-02-25 11:32:15 -08:00
Rohit Vaswani
ca7a13cdbe net: wireless: Add CONFIG_ATH6K_LEGACY for QCA AR6003
CONFIG_ATH6K_LEGACY is added to support QCA AR6003 (Non cfg80211).
AR6003 driver needs WIRELESS_EXT support. WIRELESS_EXT is going to
be deprecated so adding it to defconfig will not work. Driver needs
to mark it as dependency.

Change-Id: I09c1f07ea15b8de75c1ed35d4fec6c82265018a9
Acked-by: Prasanth Bhatta <c_bhatta@qca.qualcomm.com>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2013-02-25 11:32:14 -08:00
Anuradha Chandramouli
b31184c5be wireless: libra: SDIO interface module
Libra SDIO Interface driver module. Adds interface functions
to interact with the SD/MMC bus driver.

Acked-by: Anuradha Chandramouli <chandram@qualcomm.com>
Signed-off-by: Yunsen Wang <yunsenw@quicinc.com>
2013-02-25 11:32:14 -08:00
Hemant Kumar
6d82bdb808 net: usb: Fix premature auto suspend on Rx data path
usbnet driver does not prevent auto suspend while submitting
the URB on rx data path. This causes the usb device to go to low power
mode in the middle of the downlink data transfer as the auto suspend
timer does not get reset by the driver while submitting the URB and
it expires.

Change-Id: Ibd3ac709e7103eb3df91ce3318dba6da4e551366
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2013-02-25 11:32:13 -08:00
Hemant Kumar
2c6475d385 net: usb: Add support for embedded rmnet usb host driver
Embedded rmnet usb host driver will be used to communicate with modem
devices having rmnet interface. This driver works as pass through layer
for control and data path communication. Driver currently supports device
with product id: 0x9034 and vendor id : 0x05c6.

Change-Id: Ie037af915f2650828420a351bd3fe503a505eaee
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2013-02-25 11:32:12 -08:00
Mikulas Patocka
d4c4e6a028 dm-crypt: remove per-cpu structure
Remove per-cpu structure and make it per-convert_context instead.
This allows moving requests between different cpus.

CRs-Fixed: 339113

Change-Id: Iadc618920c7bdec0b8bbe2accdce1b69dbce5582
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
2013-02-25 11:32:11 -08:00
Mikulas Patocka
9beb8dff9f dm-crypt: move static cipher data out of per-cpu structure
Cipher information is static, so it does not have to be in a per-cpu
structure.

This is a preparation for further patches that remove per-cpu structure
altogether.

Change-Id: If33109eb334549a3499b0a92d7e171a90622ad7a
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
2013-02-25 11:32:10 -08:00
Michael Bohan
94f44896e2 msm: qpnp: Add gpiolib support for PMIC GPIOs
Add a gpio_chip driver to support the Qualcomm SPMI PMIC
architecture called QPNP. The driver supports Device Tree
and allows a device_node to be registered as a gpio-controller.

The driver also specifies APIs to allow a non-Device Tree user
the ability to configure the PMIC GPIOs.

This driver does not handle interrupts for GPIOs directly.
Instead, that work is handled by the existing qpnp-int driver.
This is feasible since the interrupt register map for all
QPNP peripherals is the same.

Change-Id: I04eb39d9855b0957f0647010fcb203ec2fc83c7c
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
2013-02-25 11:32:09 -08:00
Gregory Bean
a4d4710dd2 smsc911x: support nested interrupts.
Change the request_irq call to request_any_context_irq, in order
to properly handle nested-interrupt setups.

Change-Id: If3e29836a7223244c5e18563e07c14570c865bf8
Signed-off-by: Gregory Bean <gbean@codeaurora.org>
2013-02-25 11:32:08 -08:00
Rohit Vaswani
66e014b30f net: smsc911x: Add GPIO functions to the driver
Add hooks to control the relevant Gpio pin from
the Ethernet driver. This allows the driver to drive the
GPIO line low or high during suspend and resume for
power management.

Change-Id: Idfcf547501198d155d314a30923fd4de440840a9
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2013-02-25 11:32:08 -08:00
Brian Swetland
e61d2b7e6e smc91x: ARCH_MSM configuration 2013-02-25 11:32:07 -08:00
Rohit Vaswani
dff77def0f net: QFEC Ethernet driver
QFEC is 1 Giga-bit Ethernet MAC module residing in FSM9XXX.

Change-Id: I718fb578cfb56d598ec5fd8b9ffebad4414a7830
Acked-by: Kaushik Sikdar <ksikdar@qualcomm.com>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2013-02-25 11:32:06 -08:00
Karthikeyan Ramasubramanian
a4c2eafd17 msm: rmnet_smux: Add RMNET over SMUX
RMNET over SMUX will support IP Traffic over HSUART. This is used in
Fusion 4 target between Application processor and QSC modem.

Change-Id: I50a8acf96dc85d10e574768dc21db672b6615924
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
2013-02-25 11:32:05 -08:00
Jeff Hugo
ef376e60a6 msm: bam_dmux: initial version of BAM Data Mux driver
The BAM Data Mux driver serves as a muxing interface layer to the SPS BAM
driver for RMNET.

Change-Id: Ia8aabb1874955342b4829ddb4e70a01a84c16d5f
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
2013-02-25 11:32:04 -08:00
Niranjana Vishwanathapura
d28a029524 msm: RMNET SDIO Data Mux module.
Module to allow RMNET over SDIO link. As multiple rmnet ports
need to use single SDIO line (function), muxing of the rmnet
packets is required.

Change-Id: I0b0cea7a2135ba4afdc00ce4faf6a28fda5dc929
Signed-off-by: Niranjana Vishwanathapura <nvishwan@codeaurora.org>
2013-02-25 11:32:03 -08:00
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