Commit Graph

670 Commits

Author SHA1 Message Date
Houston Hoffman
c1d9a41415 qcacmn: Fix diag_ce initialization
With more copy engines, the diag ce was not moved to the end.
The diag_ce was being assigned a null value from the unitialized
index.

Change-Id: Ib0fc6450712af2dc5e38f00bb692cfb26982ddae
CRs-Fixed: 997175
2016-04-20 15:48:56 -07:00
Rajeev Kumar
6f8012b2aa qcacmn: Remove QDF_FTM_MODE from runtime pm code
QDF_FTM_MODE is deprecated. QDF_GLOBAL_FTM_MODE is the enum for the
ftm driver mode now.

Change-Id: I8783fb2d3748ed08995b3b13eaf69a7a1c40c22b
CRs-Fixed: 991822
2016-04-20 15:48:23 -07:00
Rajeev Kumar
74f7764f61 qcacmn: Fix epping mode ce attribute table size
Adrastea code expects a host ce table the have 12 entries.

Change-Id: I22887495a9994df65b61315fa8ff87f2bb4bcf50
CRs-Fixed: 989695
2016-04-20 15:48:20 -07:00
Vishwajith Upendra
70efc7576c qcacmn: Use epping specific shadow register config table
Update shadow register configuration for epping.

Acked-by: Aravind Narasimhan <aravindn@qca.qualcomm.com>

Change-Id: Ia975d2a651a7ff4fb5fcd6081b62c574457b016f
CRs-Fixed: 989695
2016-04-20 15:46:00 -07:00
Manjunathappa Prakash
4a9c3a8fb6 qcacmn: Cleanup fastpath changes
Do following cleanup on fastpath code changes:
1) Do not reap off Tx HIF buffers in Rx handling, instead handle
   reaping in Tx fastpath itself.
2) In ce_per_engine_service_fast check for more Rx packets after
   packet processing.
3) Make stub functions as static inline for non-fastpath enabled case.

Change-Id: If07c4344a424ce13b94128bf28931a24255b661a
CRs-Fixed: 987182
2016-04-17 15:23:37 -07:00
Manjunathappa Prakash
7399f148b5 qcacmn: Add fastpath Rx support
With dedicated CE for Rx and Tx completion HTT messages, skip processing
in Host Target Communication layer.
Do special handling in HIF-CE and HTT layer, this optimization results
in 3-4% CPU utilization gain.

Change-Id: I400148a0e24ac62dd09e2a95d5f35d94d83fe2df
CRs-Fixed: 987182
2016-04-17 15:23:32 -07:00
Houston Hoffman
c7d5429428 qcacmn: Support multiple RX CEs for NAPI/LRO/FastPath
Make changes so that LRO and FastPath can check whether a
given CE is a datapath RX CE. This is done through new
flags in CE_state which indicate whether or not a given
CE is a htt_[tr]rx CE.
Also add support to enable multi-queue NAPI.
Note that the paths are not yet parallel-execution protected,
but this should be OK as all NAPI instances are processing
the same interrupt now and as such as serialized.

Acked-by: Orhan K AKYILDIZ <oka@qca.qualcomm.com>

Change-Id: I57125b3e1fbad0345b6e1f4ed25e71babaf4f520
CRs-Fixed: 982728
2016-04-17 15:23:26 -07:00
Yuanyuan Liu
a7a282f1e3 qcacmn: Bypass GLINK/QMI for 8998 RUMI bring up
Bypass QMI for 8998 RUMI bring up as it doesn't support
QMI for now.
Increase regulatory timeout for slow RUMI setup.

Change-Id: Ie4d790a79aaa166731c876bdecf0f4f6970caae4
CRs-Fixed: 978953
2016-04-17 15:22:30 -07:00
Rajeev Kumar
8e73708b0e qcacmn: Fix compilation error caused by hif_disable_power_management
hif_disable_power_management is only defiend for PCI devices which is
causing compilation error for SNOC devices. Define empty definition of
hif_disable_power_management for SNOC devices.

Change-Id: I4da5e2346119626fd6478d3eb835bcb1ba9dd663
CRs-Fixed: 978810
2016-04-14 18:41:41 -07:00
Rajeev Kumar
cbbd7b2ee9 qcacmn: Fix compilation error caused by hif_enable_power_management
hif_enable_power_management is only defiend for PCI devices which is
causing compilation error for SNOC devices. Define empty definition of
hif_enable_power_management for SNOC devices

Change-Id: If6a4de93d18e8c5ca2a67f43a0eae69e781efa68
CRs-Fixed: 978802
2016-04-14 18:41:40 -07:00
Houston Hoffman
20968291c5 qcacmn: Reset the Runtime PM state when exiting
qcacld-2.0 to qcacld-3.0 propagation
Add prevent method to reset the Runtime PM state before driver
unload to ensure Runtime PM is recovered by driver load.

Change-Id: I5fccc345e5217d1a26c3c4f0cda1dca5ee71004c
CRs-Fixed: 899522
2016-03-31 22:47:12 -07:00
Houston Hoffman
b21a053526 qcacmn: Fix runtime pm compilation
Runtime PM compilation broke while it was disabled.

Change-Id: I1378e5a10c8982b11ccaaff3041223da94bf25ae
CRs-Fixed: 935300
2016-03-31 22:47:03 -07:00
Houston Hoffman
b4149dda4f qcacmn: pointerize hif power_management apis
Bus power management requirements are different for different busses.
Add them to the bus opps table.

Change-Id: Ia5a2500dc2f1db3be2ddbbaea6a5969420ec0c51
CRs-Fixed: 978810 978802
2016-03-31 22:46:46 -07:00
Rajeev Kumar
febbf6b9ec qcacmn: Clean-up log messages from data path
In data path per packet logging is overwriting previous useful
logs. Use HDD data module ID for WMM per packet logging with
debug log level such that by defualt per packet WMM debug log
messages are not logged.

Change-Id: I64053a6d5048a14277e01f35fcb6e0bbf6ac42b9
CRs-Fixed: 969712
2016-03-31 22:46:37 -07:00
Komal Seelam
7508012ea9 qcacmn: Rename hif_callbacks and remove unwanted header files in source files
Rename hif_callbacks structure to hif_driver_state_callbacks and remove
get_monotonic callback and use qdf API to get monotonic time.

Remove following unwanted header files in the hif source files.
osdep.h, athdefs.h, a_types.h, osapi_linux.h.

Change-Id: Ib7a03cab1b056a33b39247989fa3dfca41c85f77
CRs-Fixed: 967765
2016-03-31 13:35:33 -07:00
Houston Hoffman
3c017e7bcf qcacmn: Pointerize hif_dump_registers
Allow different busses to have different register sets to dump
in case of a crash.

Change-Id: I2b0665f276594dfb29ca34fe3f363c2f414cd2e7
CRs-Fixed: 986480
2016-03-16 13:49:56 -07:00
Houston Hoffman
162164c8cd qcacmn: Unify hif_bus_get_context_size
Since the open logic needs to allocate the bus context
before initializing the bus ops table, we need a single
function that is aware of the bus context size for all
busses.

Change-Id: I681e91ed1a792da7e753b477f869ee415ea8f3c7
CRs-Fixed: 986480
2016-03-16 13:49:52 -07:00
Houston Hoffman
795299c42c qcacmn: Resolve duplicate hif_get_target_type definition
Duplicate deffinitions of hif_get_target_type prevented compilation
of snoc and pci functionality at the same time.

Change-Id: I44cdca79c6f296c4294a54a4e1bfb459a519f46b
CRs-Fixed: 986480
2016-03-16 13:49:47 -07:00
Houston Hoffman
8f239f67a2 qcacmn: Pointerize more HIF apis
Pointerizing these apis is easier than removing external
references or unifying them.  Support multibus by
pointerizing them.

Change-Id: Iab86adf2076a082b75d9ba393123798e16f5b82e
CRs-Fixed: 986480
2016-03-16 13:49:43 -07:00
Houston Hoffman
4411ad4d0c qcacmn: Replace A_TARGET_ACCESS_BEGIN/END_RET_PTR
Macros should not alter the execution of function bodies.
Fix possible memory leaks that this cleanup exposed.

Change-Id: I546c5822d7c28e0c9dd77094a5bb0f7e3e7544d4
CRs-Fixed: 986480
2016-03-16 13:49:38 -07:00
Houston Hoffman
987ab445de qcacmn: Fix return codes from A_TARGET_ACCESS_BEGIN_RET
A_TARGET_ACCESS_BEGIN_RET hid nonsensical return values.
Replace nonsensical return values with sensible ones.
In many cases, the returned value is changed and not
just renamed.

Change-Id: I8bf1d4a44d4ebd76e3aa60bc4d24416ce0d45d61
CRs-Fixed: 986480
2016-03-16 13:49:33 -07:00
Houston Hoffman
2c32cf6dd1 qcacmn: Replace A_TARGET_ACCESS_BEGIN/END_RET apis
Macros should not alter the execution of function bodies.

Change-Id: I54c90230c5c0f43cb20412110f4eb7aa568e654d
CRs-Fixed: 986480
2016-03-16 13:45:20 -07:00
Houston Hoffman
bac9454390 qcacmn: Replace A_TARGET_ACCESS_BEGIN/END apis
Macros should not alter the execution of function bodies.

Change-Id: I444caccd93ec7e0fa766acce5149d0f322e837c7
CRs-Fixed: 986480
2016-03-16 13:45:16 -07:00
Houston Hoffman
54ef87d3aa qcacmn: Dummy sleep_state_adjust for epping mode
Epping mode is a test mode and wants the target to be forced
awake at all times.  The sleep state adjust calls to keep
the target awake while the driver is loading and to keep
the driver awake in max perf mode are converted to the
pci specific function so that they won't get dummied out.

This fixes the logic for MAX PERF mode by avoiding the dummy
for the keep awake call and correctly avoiding the sleep ok
call when power management is re-enabled after driver load.

This removes a discrepancy where some sleep state adjusts
were missing the epping mode check. (Q_TARGET_ACCESS_BEGIN...)

Change-Id: I4e546f12703bcee21a76f42c12b59dd7fd1ab1a9
CRs-Fixed: 986480
2016-03-16 13:45:10 -07:00
Houston Hoffman
0b48913237 qcacmn: Unify A_TARGET_ACCESS_LIKELY
Sleep state adjust has been added the the bus_ops table and the
macros using it can be unified.

Change-Id: Ib788800c83457919ae7eee01f6687cbb57c84a4b
CRs-Fixed: 986480
2016-03-16 13:45:03 -07:00
Houston Hoffman
ca581c4ee3 qcacmn: Remove extra sleep_state_adjust dummy
Select the dummy implementation in the pci bus_ops assignment function
when MAX_PERF is selected.

Change-Id: I0a77e060dde2792959ae96bca86a4c073bb4cab0
CRs-Fixed: 986480
2016-03-16 13:44:59 -07:00
Houston Hoffman
379fad90ca qcacmn: Remove driver registration logic from hif
Upper layers are responsible for registering the wlan
driver.

Change-Id: I5644aa3895827b5e9d29c8f1e7b1d910c9da20fd
CRs-Fixed: 986480
2016-03-16 13:44:54 -07:00
Houston Hoffman
bd8c04fa24 qcacmn: Unify Q_TARGET_ACCESS macros
Sleep state adjust has been added the the bus_ops table and the
macros using it can be unified.

Change-Id: Id08f5d95c295ab8419c0ae60519aae064c318856
CRs-Fixed: 986480
2016-03-16 13:44:48 -07:00
Houston Hoffman
858f723a62 qcacmn: Unify io memory access
Snoc and pci should use the same memory access semantics.

Change-Id: I0f9eb8d0517853426897acd712c343b7ac7a5a1f
CRs-Fixed: 986480
2016-03-16 13:43:41 -07:00
Houston Hoffman
dd50043a6e qcacmn: Remove unused #defines in snoc
References to the PCI compile time configuration defines
have been moved to pci specific files and don't need
dummy values.

Change-Id: I335f3b9c5b70ef58b58feacc76825b15e27dbcbc
CRs-Fixed: 986480
2016-03-16 13:23:53 -07:00
Houston Hoffman
b72c03c8f7 qcacmn: Don't use war_pci_write32
The regular path is the only path used.  The work arround
code path is never accessed because the conditional variable
is allways left to 0.

Change-Id: I9af8fd38c6fbbfc9304bbffb6e1ae78cea34c6a0
CRs-Fixed: 986480
2016-03-16 13:23:46 -07:00
Houston Hoffman
eadcb4a234 qcacmn: Reduce number of pci A_TARGET_READ/WRITE definitions
Simplify the configuration space.

Change-Id: Id2d1398ea5de77cd39a8ac8db711aae317c6e5d3
CRs-Fixed: 986480
2016-03-16 13:03:06 -07:00
Houston Hoffman
4ca03b6579 qcacmn: Add dummy functions to bus_ops table for snoc
Use bus ops table to tunnel into dummy implementations for snoc.
Needed to support both pcie and snoc in the same binary.

Change-Id: I11725ed4dfa5dd7b43a4b29236d3caca58fda41f
CRs-Fixed: 986480
2016-03-16 13:03:03 -07:00
Houston Hoffman
63777f221f qcacmn: Make hif_sleep_entry pci specific
Snoc does not use the force wake mechanism.  Isolate force
wake code to reduce dummy implementations.

Change-Id: Ief32778cadb7d1b9c905535ea0d01604246c72df
CRs-Fixed: 986480
2016-03-16 13:03:01 -07:00
Houston Hoffman
e61d4e1382 qcacmn: Controll target sleep in hif
Reduce the api footprint of hif and make hif responsible for controlling
its own timer as part of suspend resume.

Change-Id: I256161a8d147e99811f018c995081684f2bd0167
CRs-Fixed: 986480
2016-03-16 13:02:59 -07:00
Houston Hoffman
00d42aeb8e qcacmn: Move hif_targ_is_awake to pci
Avoid maintaining a dummy api for the internal function.

Change-Id: Ie26aaf557d1bdefe292aa364fa6ec3140a113f5e
CRs-Fixed: 986480
2016-03-16 13:02:57 -07:00
Houston Hoffman
b861cb3837 qcacmn: Manage driver load target sleep state in hif
The target awake durring driver load feature should be isolated
to hif.

Change-Id: I89de39cc3632f9cc54d1fe5544da8b0bf250206d
CRs-Fixed: 986480
2016-03-16 13:02:54 -07:00
Houston Hoffman
fb7d612980 qcacmn: Move power_gating to centralized power management api.
Upper layers should not need to know about pci specific power management
features.

Change-Id: I841af588246d328f12fa69d8c0394ec1eafaa236
CRs-Fixed: 986480
2016-03-16 13:02:53 -07:00
Houston Hoffman
60a1eeb69f qcacmn: Export the bus type
Currently only ol_target_failure needs to query the bus type,
but when usb and sdio busses are added there will be more
external checks based on the bus type.

Change-Id: I48172a918e75ff3a6e56fae5c311ae999efa607e
CRs-Fixed: 986480
2016-03-16 13:02:49 -07:00
Houston Hoffman
26352594d9 qcacmn: Add hif_needs_bmi api
Since the logic requires device knowledge and could become more
complicated, provice a hif api tho check.

Change-Id: I6fbb8234a6c0a639afdd9a9a409688889e492bd7
CRs-Fixed: 986480
2016-03-16 13:02:47 -07:00
Houston Hoffman
f303f91734 qcacmn: Make hif_device_id an opaque type
If different busses cannot agree upon a common hif_device_id type,
we need to make it an opaque type in the general case and only
cast it in the bus specific code.

Change-Id: I769d65f10421caf07c8f5cc35ccfe11302485576
CRs-Fixed: 986480
2016-03-16 13:02:45 -07:00
Houston Hoffman
bc69349d0d qcacmn: Use new HIF_SNOC flag
Use new HIF_SNOC instead of assuming snoc when pci is not defined.
Exposes duplicate function defs with HIF_SNOC and HIF_PCI both defined.
Remove some trivial HIF_PCI conditional compilation.

Change-Id: I958740f49b3298c165e662b89b586bda2b3d2ee8
CRs-Fixed: 986480
2016-03-16 13:02:40 -07:00
Houston Hoffman
854e67f791 qcacmn: Move hif_set_hia to pci file
hif_set_hia isn't applicable to non pci targets.
Avoid needing a dummy hif_wake_target_cpu for
snoc.

Change-Id: I1ebdac2f1ea1c87466ba144986ff151f074476ba
CRs-Fixed: 986480
2016-03-16 13:02:37 -07:00
Houston Hoffman
f771862053 qcacmn: Move PCIE_AWAKE_WHILE_DRIVER_LOAD code to pcie
Move pcie specific code for keeping the target awake
durring driver load.  This code should be in a pci
specific file to avoid the ifdef HIF_PCI.

Change-Id: I117c43d95196a1f2f79b1124d290acf8542ebf10
CRs-Fixed: 986480
2016-03-16 13:02:35 -07:00
Houston Hoffman
e02e12d156 qcacmn: ifdef hif_pm_runtime_mark_last_busy call from ce file
fixes a compilation error for snoc.

Change-Id: Ie451904aa53a9be37f1fe6d070b19307a8f74fea
CRs-Fixed: 978746
2016-03-16 13:02:32 -07:00
Houston Hoffman
32bc8eb686 qcacmn: Add function pointer framework
Function pointers are needed to dynamically route
function calls to bus specific implementations
when supporting simultaneous multibus.

Change-Id: I81a181824e8c679ff0bdf906563de95b3291ba4a
CRs-Fixed: 986480
2016-03-16 13:02:29 -07:00
Houston Hoffman
108da40074 qcacmn: Introduce hif_bus_configure
Need to make hif_enable bus agnostic

Change-Id: If9bff722b32afb46efdf854bfbaa08304d77e780
CRs-Fixed: 967250
2016-03-16 13:02:24 -07:00
Vishwajith Upendra
70f8b6e32c qcacmn: Update driver to use QDF NBUF APIs(2/2)
Update driver to use QDF NBUF APIs

Change-Id: I555c739660e62e6d0237c65c57bcb169fec11cf4
CRs-Fixed: 981187
2016-03-16 12:22:29 -07:00
Chouhan, Anurag
fc06aa9430 qcacmn: Fix compilation issues HTC/HIF
Resolve compilation issues for references to cdf after rebase

Change-Id: I332566deb690fa7de68d89bf51b42f94f7a270a6
CRs-Fixed: 981187
2016-03-16 12:18:31 -07:00
Houston Hoffman
5693683262 qcacmn: change skb->cb to support 64 bit paddrs(2/2)
Prapogation from qcacld-3.0 to qcacld-3.1

Change skb->sb such that it is overlayed between tx and rx and
each one of then still fits 48 bytes.
Note that this will break IPA and it will be fixed subsequently
by another change.

Change-Id: I96168aee99dbdbecbdbd4259597e179b02d29f5d
CRs-Fixed: 881090
2016-03-16 12:16:24 -07:00