Commit Graph

148 Commits

Author SHA1 Message Date
Rajeev Kumar
5bac30f5e6 qcacmn: Add unit test framework to validate WLAN suspend/resume features
WLAN suspend/resume feature has tight dependency on APPS platform
suspend/resume support. On new targets APPS suspend/resume is not
supported until target is feature complete. In absence of APPS
suspend/resume support testing WLAN offload features become
difficult. Add unit test framework to test WLAN suspend/resume
features using private IOCTL command by simulating APPS
suspend/resume behaviour.

Trigger WLAN suspend:
iwpriv wlan0 wlan_suspend 0 0

To resume WLAN run a ping test from access point side and very 1st
ping request unicast packet should trigger wake up.

If FW is not waking up APPS then use below command to do a manual
wake up:

Trigger WLAN resume:
iwpriv wlan0 wlan_resume 0 0

This framework is only for SNOC platform.

Change-Id: I177a0047f460aa2a305a9e4e46fbfaa94a81dced
CRs-Fixed: 1042205
2016-08-03 01:07:49 -07:00
Govind Singh
051a8c4457 qcacmn: Remove duplicate definition from hif layer
FW common files needs to be in sync with host and fw.
There are duplicate definition of target attach API when
latest copy of fw common files are used.
Remove duplicate definition of target attach from hif layer.

Change-Id: Ie4a80ba07bc3ec2d9d1466c32062c373c9759a94
CRs-Fixed: 1012542
2016-07-08 06:12:14 -07:00
Nirav Shah
b70bd731ec qcacmn: Add per CPU interrupt statistics
Add per CPU per copy engine interrupt statistics.

Change-Id: I1619f0db3314ae3d915284459f2b191f31fc2190
CRs-Fixed: 1017437
2016-06-30 03:11:34 -07:00
Nirav Shah
da0881a68f qcacmn: Datapath changes for WiSA specification
Datapath changes for WiSA specification.
 - Multicast packets with 50000 as destination
   port should go at 6Mbps.
 - Multicast packets with 50001 as destination
   port should go at 24Mbps.

Change-Id: I582b13fd85e2bdc0e49739a1c6f8d8a3b295902f
CRs-Fixed: 1010412
2016-06-14 13:48:41 -07:00
Poddar, Siddarth
e41943f3a8 qcacmn: Add hif layer changes for sdio bus (Part 3 - HIF SDIO)
Abstract bus related functionalies to respective bus layer.

CRs-Fixed: 969334
Change-Id: Ie14970d69c0a8bf545d136480e4571352f2d4a26
2016-06-14 13:48:17 -07:00
Govind Singh
4cc8213cc2 qcacmn: SDIO bus support (Part 1 - HIF SDIO)
Add legacy hif sdio code.
Implement new hif sdio interfaces with respect to new hif design.
Add datapath to HIF interfaces.
Refactor hif-sdio codebase.
Remove references to older kernel version.

Change-Id: Ieca3e512edca5f960d6f2b64d15121db6c8138c7
CRs-Fixed: 969334
2016-06-14 13:48:12 -07:00
Yuanyuan Liu
a5f0a396a2 qcacmn: Use PLD layer
Remove ICNSS_CONFIG dependency as it is taken care by PLD layer.

CRs-Fixed: 1013853
Change-Id: I7f174642a1d9053670b4544e0e37dee1d4849872
2016-05-23 11:33:41 -07:00
Houston Hoffman
8592507dfb qcacmn: nss wifi offload changes
Expose copy engine infrastructure for use by an nss subsystem.

Change-Id: Icad9dc056ecccf4029caa4b83d4c976dcfc232a4
Acked-by: Varsha Mishra <varsham@codeaurora.org>
CRs-Fixed: 1009050
2016-05-19 18:00:03 -07:00
Houston Hoffman
fb698efe55 qcacmn: Add support for AP chipsets
Add copy engine configuration, extended set_hia functionality,
htc_module credit flow control function and physical address calculations.

Change-Id: I5e4394bed39cc92bb8323d332dc124d948737322
Acked-by: Venkateswara Swamy Bandaru <vbandaru@codeaurora.org>
CRs-Fixed: 1009050
2016-05-19 17:59:48 -07:00
Houston Hoffman
c3c6bc1e5c qcacmn: Add support for Regtable convergence
Add regtable definitions for chipsets AR6004,AR6320,AR900B,
      AR9888,IPQ4019,QCA9888,QCA9984

Change-Id: Ic018a1396aa36f61ead6d8607feda4711e2a2b07
Acked-by: Venkateswara Swamy Bandaru <vbandaru@codeaurora.org>
CRs-Fixed: 1009050
2016-05-19 17:59:43 -07:00
Houston Hoffman
56e0d70c3c qcacmn: Introduce APIs needed by WIN
Added new APIs ce_batch_send and ce_send_single
only used by WIN.

Acked-by: Varsha Mishra <varsham@codeaurora.org>
Change-Id: I55d86d692455be118734f6e0a13e0e58c227b1a0
CRs-Fixed: 1009050
2016-05-19 17:57:57 -07:00
Prakash Manjunathappa
82b8996739 qcacmn: Make MAX_NUM_RECEIVES same for all cases
MAX_NUM_RECEIVES, the maximum number of messages to be processed
by the bottom-half before control is returned to kernel was
defined as different (but close) numbers for NAPI and non-NAPI
cases (based on NAPI feature flag), 100/1000 for non-NAPI and
128/1024 for NAPI cases.
With this update the value is set to 128/1024 regardless of NAPI
feature being compiled or not.

Change-Id: I152afd30b302d52426c07ae39a95af388ba0ae52
Acked-by: Orhan K AKYILDIZ <oka@qca.qualcomm.com>
CRs-Fixed: 1012336
2016-05-12 11:22:38 -07:00
Houston Hoffman
127467f040 qcacmn: Add hif_ctx to fastpath_cb_register api
Hif apis can't rely on a global context.

Change-Id: I2cad80573fc0102f210bb0f7c3f9e22c5f8e16f9
CRs-Fixed: 1009274
2016-05-04 21:11:05 -07:00
Houston Hoffman
d6f946ce21 qcacmn: Default CE_COUNT_MAX to 12
CE_COUNT_MAX should be the maximum number of CE's supported.
Set it to 12 to support all chipsets dynamically.

Change-Id: Id65278ee452a4ca2e3b0dcfe5c082a7e7a286347
CRs-Fixed: 1002084
2016-05-04 21:10:55 -07:00
Komal Seelam
6ee559010d qcacmn: Remove unwanted header files in transport layer
Rename OL_TARGET_STATUS as HIF_TARGET_STATUS and move the enum to hif.h

Change-Id: Ib84514aa65404b4340b1be06a4adefff27bfdc6d
CRs-Fixed: 998536
2016-05-04 21:10:51 -07:00
Houston Hoffman
f789c661a8 qcacmn: Remove support for QCA6180
This is deprecated emulation hardware.

Change-Id: Ibafc2e55a26bcac28e88a325689a419e058997b5
CRs-Fixed: 1003804
2016-05-04 21:10:27 -07:00
Nirav Shah
d7f9159cf2 qcacmn: Update htc_endpoint only for htt tx endpoint
Update htc_endpoint only for htt tx endpoint to avoid
double freeing of Tx Queue packets as it will be
freed in htt_htc_misc_pkt_pool_free.
Rename htc_endpoint to htc_htt_tx_endpoint to reflect
it's appropriate use.

Change-Id: I736ba08505acc829eb15be30538553dd945695f6
CRs-Fixed: 1006498
2016-04-25 23:03:05 -07:00
Yuanyuan Liu
4e3feeb40b qcacmn: Fix compilation errors for msmcobalt
Fix compilation errors when building for msmcobalt.

CRs-Fixed: 1006068
Change-Id: I26af2637ca95df0765055e7909905babce6a09cb
2016-04-21 20:32:15 -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
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
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
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
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
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
Komal Seelam
bd7c51d1c5 qcacmn: Remove CDS instances in HIF
Remove CDS instances in HIF for WIN/MCL convergence.
a. Update con_mode param in HIF
b. Have callbacks to CDS from HIF to update CDS global context

Change-Id: Iceebf32271b8d53beb634031f7dbc005f5fe5ed0
CRs-Fixed: 967765
2016-03-16 01:55:42 -07:00
Komal Seelam
5584a7cf92 qcacmn: Make hif_opaque_softc as global HIF context
Make hif_opaque_softc as global HIF Context and cleanup
ol_softc structure to bmi structure. No one else is using ol_softc
numbers.

Change-Id: Ib6447d2b67d41a30ec22903720900d7e4d55c7a9
CRs-Fixed: 967765
2016-03-16 01:55:38 -07:00
Komal Seelam
a5911d3ca2 qcacmn: Remove unwanted ini config from hif
Move unwanted ini config params from hif to respective modules.

Change-Id: I19603bcf516cf2c67053c707456d83ee536f41ce
CRs-Fixed: 967765
2016-03-16 01:55:32 -07:00
Komal Seelam
f76166d3c3 qcacmn: Move BMI info structure to global BMI context
BMI info is needed during BMI Phase. The structure holds
the physical address and virtual address of Command and response
of BMI buffer. Remove the structure from HIF and move to BMI.

Change-Id: I37a43cca0bdef66f6b0201d27e9dcbecffeef5dd
CRs-Fixed: 967765
2016-03-16 01:55:29 -07:00
Komal Seelam
8eb8f28ce2 qcacmn: Move targetdef out of ol_softc to ol_bmi_context
Targetdef is needed during BMI phase of PLL switching.
Move this member to ol_bmi_context

Change-Id: Idf5bbe610a926506b87e8458fa460fd583263a03
CRs-Fixed: 967765
2016-03-16 01:55:21 -07:00
Komal Seelam
2a5fa63d2b qcacmn: Modify HIF BMI API to pass dma command and response
Pass BMI DMA Command and Response address to HIF BMI API as
arguments instead of using bmi context in HIF.

Change-Id: Ifdb51581a33665b1857c63e33b1c26bbd99575eb
CRs-Fixed: 967765
2016-03-16 01:55:15 -07:00
Komal Seelam
6081702c40 qcacmn: Move Max Peers variable to WMA
Remove Max Peers reference in HIF and move it to WMA

Change-Id: If2be1e3a69abdca471d6bb96aca9298bffd4bd25
CRs-Fixed: 967765
2016-03-16 01:55:10 -07:00
Vishwajith Upendra
3f78aa6a1d qcacmn: Make HIF independent of NIC_DEV
NIC_DEV is not needed in hif. Remove it from HIF.
Initialize cdf_device global structure in HDD.

Change-Id: Iff3e88c269ed0324d18289e23a0369fa6c2b14b0
CRs-Fixed: 967765
2016-03-16 01:52:55 -07:00
Komal Seelam
644263d323 qcacmn: Carve Out hif_softc out of ol_softc
Carve out hif_softc for internal hif usage.
ol_softc acts a opaque handle to other modules.

Change-Id: I7633e70ed82fe2ee88a21e2502177d6a7388ff56
CRs-Fixed: 967765
2016-03-15 14:29:26 -07:00
Komal Seelam
02cf2f8509 qcacmn: Refactor HIF to use Single HIF Context
Remove unwanted pointers to various HIF data structures.
Use single HIF Context and dynamically typecast to required
HIF data structures.

Change-Id: I1e2f39455a23826d1eaa9785aa9f1bc3854a9cb2
CRs-Fixed: 967765
2016-03-14 14:08:12 +05:30
Komal Seelam
c92a0cf52e qcacmn: Query HIF for FastPath support
Data Path bypasses transport layer for better throughput's.
Instead of dereferencing HIF structures, query HIF for fastpath
mode support

Change-Id: Icba897c9405084f1c14c7db4059527a96d841736
CRs-Fixed: 967765
2016-03-14 14:07:55 +05:30
Komal Seelam
f8600687ad qcacmn: Remove cds_get_context in HIF
Refactor Transport Layer from cds_get_context and pass the hif context
to all the API's to operate.

Change-Id: I1dedda76357f844e08fd422bf9eb15af70587eae
CRs-Fixed: 967765
2016-03-14 14:07:47 +05:30
Komal Seelam
b3a3bdf89f qcacmn: Refactor BMI members from ol_softc
Group BMI members and access bmi info from hif instead of
dereferencing hif context.

Change-Id: I082f648490be0078df7d90cc8ebbf745b64fd97a
CRs-Fixed: 967765
2016-03-14 14:07:40 +05:30
Komal Seelam
7fca106501 qcacmn: Refactor Ramdump API and PKTLOG API
Ramdump collection can be supported by buses other than PCIe, and
it's done in offload layer when recovery is required. Hence allocate
memory dynamically and free it once ramdump collection is complete.

PKTLOG is a DataPath Feature, HIF doesn't need to have any info
of it. Move pktlog implementation to HTT folder.

Change-Id: Ib8c2526ba8900843db2dae8388fe46c9d9e05f22
CRs-Fixed: 967765
2016-03-14 14:07:29 +05:30
Komal Seelam
aa72bb719e qcacmn: Move relevent hif_pci_softc members from ol_softc
Few members are relevant only for PCIe based solutions, hence
move those to hif_pci_softc structure.

Change-Id: I1f38da4cfc9f69c05a9c80e67abc70fd97e22af9
CRs-Fixed: 967765
2016-03-14 14:06:46 +05:30
Komal Seelam
91553ce741 qcacmn: Refactor ol_sc for target_info and ini params
Clean up driver modules to query hif for the target info and
ini handle, instead of accessing hif context in other modules.

Change-Id: Ibd4762a20f788190f242b4f24b914fa4b99d5a5b
CRs-Fixed: 967765
2016-03-14 14:05:27 +05:30
Govind Singh
2443fb341a qcacmn: Abstract bus debug dump in hif layer
Remove direct call to CE debug routine from ol_fw and
hif main layer. Abstract the bus debug dump
register routines to respective hif bus layer.

Change-Id: I8b6f325f12aaa99e4f7461f9da26b7f60259c8f8
CRs-Fixed: 964031
2016-03-14 12:37:39 +05:30
Prakash Dhavali
142cee4bf2 Initial host-common file folder cleanup and moves
Initial host-common file folder cleanup and moves
on top of baseline reference of MCL WLAN driver
SU#5.0.0.160.

Move dp, ht comm, hif, wmi and qdf folders one level up

Change-Id: I2120898024b1eafd5d651c48768dbf48bf05995d
2016-03-03 01:02:02 -08:00