Commit Graph

56 Commits

Author SHA1 Message Date
Houston Hoffman
65a4a87ebd qcacld-3.0: move hif_bus_open to hif_open
Can consolidate these allocations.

Change-Id: I8af6fa459db62c99bf93ecdbd1dcd94bbee580a8
CRs-Fixed: 967256
2016-02-08 15:50:44 -08:00
Houston Hoffman
dc9c6c26b0 qcacld-3.0: Remove hif_claim_device
hif_claim_device does not serve a purpose in copy engine.
The usage and implementation of hif_claim_device need to be
reexamined for sdio and usb. It should not store the device
in a ce specific data structure.

Change-Id: I0847e152ae3a1ca57d5c6937d6929918063cc362
CRs-Fixed: 967244
2016-02-08 15:50:44 -08:00
Rajeev Kumar
fec3dbedc5 qcacld-3.0: Rename API cds_is_load_unload_in_progress
Rename API cds_is_load_unload_in_progress() to
cds_is_load_or_unload_in_progress() for clarity purpose.

Change-Id: I209c661ccee760f822d5df53577d822f3c741b37
CRs-Fixed: 964217
2016-02-08 15:50:43 -08:00
Houston Hoffman
267723f092 qcacld-3.0: Move runtime pm bookkeeping out of hdd
Move state machine and stat logging for runtime pm feature out of hdd.

Change-Id: I2699905d9c238a1402eac11c1107b44bb9e617e4
CRs-Fixed: 935300
2016-02-08 15:50:42 -08:00
Houston Hoffman
ac31d34d80 qcacld-3.0: Instrument fastpath for runtime_pm
Fastpath needs gets and puts to work with runtime_pm enabled.

Change-Id: I2248d1e77c842ab12fcc10e3f29fa3ef4dd76052
CRs-Fixed: 935300
2016-02-08 15:50:41 -08:00
Houston Hoffman
a0e71066f3 qcacld-3.0: Fix rmmod for runtime pm
Runtime PM should be turned off before the driver is unloaded.

Change-Id: I8746e92931375893708556e77a3d93bfd6266668
CRs-Fixed: 935300
2016-02-08 15:50:41 -08:00
Houston Hoffman
746a571cf7 qcacld-3.0: Mark last busy in recieve for runtime pm
Scan was not going through.

Change-Id: I37d02a88e29da9c4fa756cc46fc812f10c58fe00
CRs-Fixed: 935300
2016-02-08 15:50:41 -08:00
Houston Hoffman
10a20bbdea qcacld-3.0: Prevent runtime suspend when linkdown not allowed
Runtime suspend does not save power in d0 mode.

Change-Id: I6bc83923a6384c3275b95bd0ffbb4404d9a3f86d
CRs-Fixed: 935300
2016-02-08 15:50:41 -08:00
Houston Hoffman
d92ae54ea1 qcacld-3.0: Log runtime suspend resume occurances
Keep track of how many times supesend resume succeeds and fails
also mark last busy on a failed runtime suspend or a successful
runtime resume.

Change-Id: I04df805429e3a9ce91bc3d7f27bfd598396257c9
CRs-Fixed: 935300
2016-02-08 15:50:41 -08:00
Houston Hoffman
f2936d19bc qcacld-3.0: Provide hif runtime suspend resume apis
hif runtime suspend resume is identical to a regular bus suspend
resume, but provide a different api just in case this changes.

Change-Id: If069df7733d6a1ebe38d356ac5bdd4e2a250118b
CRs-Fixed: 935300
2016-02-08 15:50:41 -08:00
Houston Hoffman
d13fa735b2 qcacld-3.0: Add hif apis to prevent allow runtime pm
Support pm_runtime put/get/prevent/allow apis in hif layer.

Change-Id: I66be45de4177eeff3678b9ebd874c9bbde3cad22
CRs-Fixed: 935300
2016-02-08 15:50:41 -08:00
Houston Hoffman
a8ef6fb8c7 qcacld-3.0: Provide setters for pm_state to upper layer
Runtime pm opperations will be initiated in hdd, so hdd
needs an api to updated the runtime_pm state.

Change-Id: I783fc136777a56d8ea23f8b11617ebe92641221a
CRs-Fixed: 935300
2016-02-08 15:50:41 -08:00
Houston Hoffman
8eb73ed3ad qcacld-3.0: Add runtime pm initialization
Add runtime pm initialization, including the creation
of a debugfs entry.

Change-Id: Ib057feaf36a04bb525a731e236187c134449c5f2
CRs-Fixed: 935300
2016-02-08 15:50:41 -08:00
Houston Hoffman
9e7c1c77c5 qcacld-3.0: Replace EndPoint with endpoint
This change also changes EndPointStats to endpoint_stats.

Change-Id: I88509901b0d15a59f35633dccbe7ca0b5f7b3b76
CRs-Fixed: 935297
2016-02-08 15:50:39 -08:00
Houston Hoffman
f709c67be7 qcacld-3.0: Fix firmware assert completion handling
Hif needs to guarantee that it frees the buffers that it doesn't
pass to upper layers.

Change-Id: I816d0a1b19a5a0c00e9669c18dfdf427c102c911
CRs-Fixed: 958124
2016-02-08 15:50:39 -08:00
Houston Hoffman
6ccc86afd8 qcacld-3.0: Remove IHELIUM_BU flag
This flag supports depricated emulation hardware.
Remove conditionally compiled code and dummy functions
that become unused as a result.

Change-Id: Ie21df7e39b196109acfb6b41afc6b8c22fecb822
CRs-Fixed: 958120
2016-02-08 15:50:39 -08:00
Prashanth Bhatta
9e14305000 qcacld-3.0: Maintain driver state in CDS
Driver state of loading, unloading, logp are maintained in
multiple modules like HDD, CDS. Change to maintain the driver
state in CDS and provide CDS APIs to find out the state of the
driver so that any of the module can query it.
Also rename the logp to recovery in progress for clarity purpose.

Change-Id: I8e1864e1bc7f3b1dd6f4eb804ce2578c6695967d
CRs-fixed: 958659
2016-02-08 15:50:38 -08:00
Peng Xu
f5d60c8524 qcacld-3.0: Clean up usage of con_mode
Separate con_mode from adapter mode definition and clean up usage of
con_mode.

CRs-fixed: 917959
Change-Id: Ia058826cdb873558ab8703fcd4f80d37d3f782df
2016-02-08 15:50:37 -08:00
Yuanyuan Liu
edcbc30ce9 qcacld-3.0: Add support of setting FW debug mode
FW needs the debug mode from WLAN INI file. After parsing INI file,
WLAN driver passes the mode value to platform driver, which uses
QMI message to exchange information with FW.

Change-Id: Ifd01b18bcfafad2344196d80ab17c605cca35972
CRs-Fixed: 942237
2016-02-08 15:50:36 -08:00
Houston Hoffman
2ab3f43df1 qcacld-3.0: Recheck firmware indicator register after enabling interrupts
qcacld-2.0 to qcacld-3.0 propagation

We suspect that the firmware indicator interrupt is being dropped when
the firmware indicator interrupt is disabled.  Check the firmware indicator
after reenabling the firmware indicator interrupt.

Change-Id: I600bd9dfae99ab96dfaf7e3448cef9128f8b7357
CRs-Fixed: 925315
2016-02-08 15:50:35 -08:00
Houston Hoffman
6710de643f qcacld-3.0: completion_freeq_lock needs initialization
Initialization of completion_freeq_lock was removed as part of
removing the completion thread.  The lock still protects the
variable num_sends_allowed for copy engines used for sending.

Change-Id: Ia52d2c1b839d2ccfedbd175f1b8f60f953d08203
CRs-Fixed: 951563
2016-02-08 15:50:35 -08:00
Houston Hoffman
c9f2a429a0 qcacld-3.0: Record polled completion processing
Since the wmi tx copy engine's completions can be
processed in both its tasklet context and through
ce_per_engine_servicereap on a polled basis, we
wish to be able to distinguish the when each is used.

Change-Id: I5892eeeab4e1c7e4c35b958d98db7ad0293ec24f
CRs-Fixed: 951569
2016-02-08 15:50:35 -08:00
Houston Hoffman
d93b804d66 qcacld-3.0: Make ce_init_ce_desc_event_log not static
Fix a compilation error for perfbuild.

Change-Id: I26950eddb8c0f0835cf1faf145f7997a601f2339
CRs-Fixed: 955059
2016-02-08 15:50:35 -08:00
Houston Hoffman
dee0d5374c qcacld-3.0: Record CE interrupt and tasklet entry/exit
Record CE interrupt in CE event history since the interrupts
may come separately for the different interrupts.

Change-Id: I269a103054d3ab2015d67370c43f4af598871b8d
CRs-Fixed: 951569
2015-12-28 22:35:56 -08:00
Houston Hoffman
f82c7e880b qcacld-3.0: Record ce descriptor events
qcacld-2.0 to qcacld-3.0 propagation

Record when descriptors are posted to or completed by the copy engine
in SLUB_DEBUG builds.

Change-Id: I78ee028a7a61ffd253092cbb530ce9ec2e5022d3
CRs-Fixed: 938120
2015-12-28 22:35:56 -08:00
Houston Hoffman
67056b2870 qcacld-3.0: Initialize irq_lock and connection_status_lock
Uninitialize spinlock caused crash on mdm platform.

Change-Id: I0d86999d70e35c69775e698e69a8388de24d6fb3
CRs-Fixed: 951563
2015-12-28 22:35:55 -08:00
Amar Singhal
01098f7526 qcacld-3.0: Remove the obsolete LINUX VERSION checks
We already know kernel version is more than equal to 3.10.
So remove static checks for any previous kernel.

Change-Id: I4e17614fae47782a02dd528c7b4adf3d2802ec69
CRs-Fixed: 920681
2015-12-28 22:35:55 -08:00
Houston Hoffman
5998d5f66d qcacld-3.0: Enable emergency reaping for wmi pipe.
Since management frames have been added to the wmi pipe,
the wmi pipe may fill up before the driver schedules the
tx completion processing.

Make tx completion processing use the DDR ce index to
avoid register access durring reaping.

Change-Id: I213aa0274d3c66e583bcdb700ced1133c2c30ebc
CRs-Fixed: 945831
2015-12-28 14:20:47 -08:00
Leo Chang
8e07361afb qcacld-3.0: wdi2.0 feature enable, dp hif
wdi20 enable implementation for hsoffload. Large physical address
support and wdi20 interface propagate to IPA.
This is part of HIF and DP.

Change-Id: If898f03a8a75689c98c70d1e55910f476d8fe329
CRs-fixed: 941041
2015-12-28 14:20:43 -08:00
Houston Hoffman
b8954c6402 qcacld-3.0: Remove from_irq
From irq variable is not serving a good purpose.

Change-Id: I362e4fa8c5202e748fac455fb76ce676bd1ea31b
CRs-Fixed: 941355
2015-12-09 23:21:39 -08:00
Houston Hoffman
a499f30bd5 qcacld-3.0: Replace target_lock with ce_index_lock
Target_lock was a global lock for all target and copy engine data
structure access. Replacing target_lock with a per copy engine
lock permits paralel completion handling for different copy engines.

Change-Id: I9c09d557c85f9e48beafe5e3f936e105183ddd3f
CRs-Fixed: 941355
2015-12-09 23:21:39 -08:00
Houston Hoffman
15ec6c6895 qcacld-3.0: Remove target_lock from hif_crash_shutdown
This is called by the platform driver in case of kernel panic.
Replacement syncronization might be needed here if the kernel
panic doesn't stop the other host cpus before the platform driver
calls this.

Change-Id: Ic6d4eb1cb08f6363029463994ec7e3837212e271
CRs-Fixed: 941355
2015-12-09 23:21:39 -08:00
Houston Hoffman
3e551e46b9 qcacld-3.0: Remove target_lock from watermarks_set functions
If watermarks are going to be used, the should be set as part of a
single threaded initialization sequence.

Change-Id: I3e1e9cd0f55f46d9f46718c139963931311fe8ae
CRs-Fixed: 941355
2015-12-09 23:21:39 -08:00
Houston Hoffman
5d2697f78d qcacld-3.0: Remove target_lock from ce_h2t_tx_ce_cleanup
No other thread should modify the copy engine indexes while we
are cleaning up the data structures.

Change-Id: I324286c3a8eed24ddd94aa868dbaac425cc30dbf
CRs-Fixed: 941355
2015-12-09 23:21:39 -08:00
Houston Hoffman
542a5eeeb8 qcacld-3.0: Remove ce_disable_any_copy_compl_intr
Remove ce_disable_any_copy_compl_intr and
ce_enable_any_copy_compl_intr since they aren't
used and give a false sense of thread safety.
Modifying copy complete interrupt currently needs
to be synchronized with completion handling.

Change-Id: Ieb27a8c71363ebd56f16eda9e1037a161a5eeb62
CRs-Fixed: 941355
2015-12-09 23:21:39 -08:00
Houston Hoffman
a7163174a3 qcacld-3.0: Remove target_lock from cb regsitration
Send and recv callback registration currently occurs durring init
and after bmi download is complete.  In either case no transactions
are in progress and no race condition can exist.
Similarly watermark callback registration would happen at the same time
if it were used.

Change-Id: Ia77bf30fb3bcefa500465cea9ad9927990bb7ced
CRs-Fixed: 941355
2015-12-09 23:21:39 -08:00
Houston Hoffman
1186b91046 qcacld-3.0: Remove target_lock from ce_pkt_dl_len_set
Download length should be set before messages are recieved, so
no race condition should exist.

Change-Id: I92de4b3c4077f23032df45ceca6e169616351b8b
CRs-Fixed: 941355
2015-12-09 23:21:39 -08:00
Houston Hoffman
eab684b511 qcacld-3.0: Check for SSR before sending messages to upper layers
FW is asserted, dont service the messages.  The hif completion
thread used to prevent processing of messages when firmware crashed.

Change-Id: I42a5a285056e989d302e766f2922bb7c114634dc
CRs-Fixed: 941358
2015-12-09 23:21:39 -08:00
Houston Hoffman
7523d226a3 qcacld-3.0: Remove hif_completion_thread
Remove hif_completion_thread serialization mechanism.
Allow for parralel processing of copy engine transactions.

Change-Id: I8ecd325314542c2950294fd769a7f127d319df8f
CRs-Fixed: 941358
2015-12-09 23:21:38 -08:00
Houston Hoffman
b4eb2b20b4 qcacld-3.0: Remove spinlocks from ce_enable_msi
ce_enable_msi should happen before interupts are enabled.  Therefore
we should be single threaded here and don't need to protect access
with a spin lock.

Change-Id: I24feec02003bdb402201d71d1cd5254dacae0b72
CRs-Fixed: 941355
2015-12-09 23:21:38 -08:00
Houston Hoffman
7099f33d04 qcacld-3.0: Remove spinlocks from ce_init
ce_init should happen before interupts are enabled.  Therefore
we should be single threaded here and don't need to protect access
with a spin lock.

Change-Id: I5e1cfd32860eeda8a403744cf1589e35c57ee6df
CRs-Fixed: 941355
2015-12-09 23:21:38 -08:00
Houston Hoffman
79f8ecd3c4 qcacld-3.0: Move recieve count to CE_state
Removing references to global data in the processing of
copy engine interupts.

Change-Id: I1ecc2ee67526498a56680870969ec529f0ac6e95
CRs-Fixed: 941355
2015-12-09 23:21:38 -08:00
Houston Hoffman
3d491e2e07 qcacld-3.0: Bypass hif_completion_thread in recv
We want to process the completions in parallel.
Upper layer should take care of its own thread safety.
hif_completion_thread is a legacy function that does in
context serialization of hif completions. Bypass it.

Change-Id: I7953545b55dae093931741359bbf985e2fb9faca
CRs-Fixed: 941358
2015-12-09 23:21:38 -08:00
Houston Hoffman
e0d54529fb qcacld-3.0: Move force break to CE_state
Removing references to global data in the processing of
copy engine interupts.

Change-Id: I4d18198c392aab8c46aa755e2007ba2da0c47a57
CRs-Fixed: 941355
2015-12-09 23:21:38 -08:00
Rajeev Kumar
1a65e5801e qcacld-3.0: Fix agc registers dump logic to avoid fw assert
Propagation from qcacld-2.0 to qcacld-3.0

- Current AGC registers dump logic is not correct and its not
  reading correct target registers
- Add correct AGC register read recipe to read correct AGC data
- Wake up SoC before reading any target register

Change-Id: I38016f91bf3d124e93e304522058e97daa711f4a
CRs-Fixed: 911554
2015-12-02 12:55:28 -08:00
Orhan K AKYILDIZ
c409461034 cld-3.0: Remove warnings issued by static analysis
Some of these are very remote scenarios (like HIF not being
initialized at the time of the calls, which could then
dereference a NULL pointer). There are a few cases of looping
beyond boundaries.

The scope of this update is limited to NAPI related code.

Change-Id: I60229406d5ab514d5465ef2569324d3d4eb430d4
CRs-Fixed: 938253
2015-11-25 17:26:48 -08:00
Sanjay Devnani
a64b512a9e qcacld-3.0: Check if unload is in progress during suspend
If unload in progress, abort suspend. causes null pointer ref otherwise

Change-Id: I7028b6f0efc9da62352b561e9def90ff9bffd5e6
CRs-Fixed: 878755
2015-11-25 17:26:47 -08:00
Houston Hoffman
4c9607b607 qcacld-3.0: Bypass hif_completion_thread in fw event
We want to process the completions in parallel.
Upper layer should take care of its own thread safety.
hif_completion_thread is a legacy function that does in
context serialization of hif completions. Bypass it.

Change-Id: I73b8518d87645d827814cd1345eb68370de30d1f
CRs-Fixed: 941358
2015-11-25 17:26:46 -08:00
Houston Hoffman
bada641804 qcacld-3.0: Bypass hif_completion_thread in send
We want to process the completions in parallel.
Upper layer should take care of its own thread safety.
hif_completion_thread is a legacy function that does in
context serialization of hif completions. Bypass it.

Change-Id: I19660327ebb4a3cbb9908ce562ab6c72a6282e95
CRs-Fixed: 941358
2015-11-25 17:26:46 -08:00
Karthick S
c40696df00 qcacld-3.0: set proc_dir to NULL
qcacld-2.0 to qcacld-3.0 propagation

In athdiag_procfs_remove, set proc_dir to NULL after removing the
directory. This is to avoid trying to remove the directory which is
already removed.

Change-Id: I01526f4b59ccc991d157c1028d4df5904338f182
CRs-Fixed: 868965
2015-11-25 17:26:45 -08:00