Commit grafiek

37 Commits

Auteur SHA1 Bericht Datum
Kai Liu
b8e1241366 qcacmn: dump reo ring when flush cache failed
When delete peer, host will try to flush all frames in REO queue
by sending a cmd through reo ring, but sometimes encounted failure to
send this cmd, dump ring status if ecountered above failure.

Change-Id: I3ea4e96e5999f85398b531ddf4f350e91e798d70
CRs-Fixed: 2167419
2018-01-22 07:37:34 -08:00
Pratik Gandhi
034cb7cb60 qcacmn: Define Host based TARGET_TYPE
fwhdr_abstrct: Use Host based TARGET_TYPE instead of firmware
defined TARGET_TYPE. It will abstract dependency on bmi_msg.h.

Change-Id: I76d744db27df730a3a91a243adfc07fc17d77487
CRs-Fixed: 2140921
2018-01-03 20:09:46 -08:00
Manoj Ekbote
376116e052 qcacmn: Handle error case with HAL SRNG setup
If hal_srng_setup() fails, memory allocated for srng
is not freed resulting in a leak. Free the memory in
that case. In future, return error to caller and
assert when invalid ring ID is used during setup.

Change-Id: I6f3a7494a5c5e861652f3a38d18c220cd9a6eef2
2018-01-03 14:17:00 -08:00
Sathish Kumar
03d77e6590 qcacmn: Add source ring for direct buffer rx module
Direct Buffer Receive provides the driver with a mechanism by which target
can transfer information directly into host memory via DMA.

DMA rings must be initialized and configured before they can be shared
to the target for transfer ot data. Host driver will use the HAL SRNG
APIs to create, initialize and configure the DMA rings.

Change-Id: I43cd39ccbb5f5069c9a14092459d5c88ea514dca
CRs-Fixed: 2157986
2017-12-13 19:18:09 -08:00
Alok Kumar
ebdb2daf68 qcacmn: Replace instances of unadorned %p
Replace instances of unadorned %p which violates security guidelines.

Change-Id: I0b00fb9f997d3ed6a2824c2bb133c343fc92caef
CRs-Fixed: 2133330
2017-12-11 11:25:12 -08:00
Yun Park
601d0d868a qcacmn: Fix IPA WDI3 Tx issues
Fix bug to enable IPA WDI3 Tx H/W path.

Change-Id: Ice691dccc649b38971985cd8da042719d943cec7
CRs-Fixed: 2085751
2017-10-23 22:08:28 -07:00
Jeff Johnson
05503ee8f1 qcacmn: hal: Replace instances of unadorned %p
Replace instances of unadorned %p in hal.

Change-Id: I76cfeb154511d1852cc70c7969982e25d603089a
CRs-Fixed: 2111274
2017-10-03 16:02:41 -07:00
Houston Hoffman
ae850c6d62 qcacmn: Cleanup some excessive logging
Cleanup some excessive logging used durring bringup.

Change-Id: I09df15b7aad8176ad35f70d4d51b4a0a254699e0
CRs-Fixed: 2101103
2017-09-13 15:25:42 -07:00
Houston Hoffman
9b55b5fbb9 qcacmn: Fix ce ring timeout interrupt hw work arround
Interrupt was constantly firing because the low_threshold was
improperly configured.  The low threshold needs to be 1 less than
the number of buffers posted when the CE is fully posted.  The
srng backed CE's are setup with nentries - 2 buffers as the fully
posted amount, therefore the threshold needs to be nentries - 3.

Also fixes a bug where a reused variable is not cleared.  This
bug could result in the threshold being set to a garbages value.

Change-Id: Iac840bfd6677683bf2feb42d8bdbd050f42e895d
CRs-Fixed: 2090603
2017-08-31 06:27:43 -07:00
Yun Park
fde6b9e551 qcacmn: Enable WLAN host data path support for IPA WDI3.0
Change to support WLAN Napier host autonomy data path architecture.

Change-Id: I07f7592d547bb796a3c12bbc4745cee22e2c0022
CRs-Fixed: 2064810
2017-08-07 17:47:38 -07:00
Houston Hoffman
648a918927 qcacmn: Enable msi support for ext_group ring groupings
assign msi vectors to srng rings based on the ext_group they will be
serviced in.

provide support for ext_groups in hif_pci.

Change-Id: If313fdb43b939871c0d73dea9a05f757427b5b16
CRs-Fixed: 2051911
2017-08-06 10:47:16 -07:00
Pamidipati, Vijay
45b1df25fc qcacmn: Configure DP interrupt mitigation values based on ring type
Currently interrupt mitigation values are configured for per-packet interrupts.
Change this for core DP rings (REO Destination and WBM Tx Completions) to reduce
CPU overhead of interrupt processing

Change-Id: I7bf0f6e78c52b5678ad3c8cc4d829444e410fad3
CRs-Fixed: 2064113
2017-06-26 17:42:33 -07:00
Karunakar Dasineni
335bbd1374 qcacmn: Fix SRNG low threshold setting in HAL
SRNG low_threshold setting should be in no. of dwords.

Change-Id: I9940f02936cff5947d2bae800ecf6d05b168e729
2017-06-17 15:47:22 -07:00
Naveen Rawat
ba24c486a3 qcacmn: Initialize DMA rings using hal_srng APIs
Initialize DMA rings for CIR/CFR capture and program them
to firmware.

Change-Id: I41c32cddc3fc0f7f0a972bf69ecbacfc9f0626f7
CRs-Fixed: 2053958
2017-06-02 14:47:29 -07:00
Pramod Simha
1dfdf64381 qcacmn: Fix for R2 REO register size calculation
Calculate register size by subtracting the higher
register address by the lower one.

Change-Id: Id2255ad48d0ceb2fde00774dbf56868efb3646ca
CRs-Fixed: 2052617
2017-05-30 17:31:23 -07:00
Bharat Kumar M
9e22d3d99e qcacmn: API to read memory info from HAL
HAL modification to provide additional information to
support lithium nss offload configuration.
A new API added to extract addtional information from HAL
Few additional parameter added in get_param function.

Change-Id: I2fb0ed89c2d3cb3ee253b158f7982e1a00ab4353
2017-05-17 19:29:48 -07:00
Houston Hoffman
8bbc99066e qcacmn: Use hal io apis in SRNG_REG_WRITE
The register write apis for the srng rings pass the
srng structure as their context.  Add a pointer to
the hal to enable windowing.

Change-Id: Ib3bda2d49d5c2d327cc1b986dcf825a216a004ef
CRs-Fixed: 2032131
2017-05-02 20:06:43 -07:00
Houston Hoffman
61dad49aa3 qcacmn: Provide hal io apis to support register windowing
Use windowing for register read/write.  This allows
for pci based devices to reduce the mapped bar size.
Required for QCA6290.

Change-Id: Ifb173095c135e9eca454f2ba6132b5c54ea8fc4b
CRs-Fixed: 2032131
2017-05-02 20:06:41 -07:00
Houston Hoffman
1a601690a1 qcacmn: Set SRNG_ENBLE bit in SRNG MISC register
Setting the SRNG_ENABLE bit is required for devices with newer
hardware definitions.  Setting this bit is a no-op for older
hardware.

Change-Id: I2e0369b62a89f6a9a32f9e211ab815e3c16b2393
CRs-Fixed: 2032351
2017-04-12 18:23:10 -07:00
Kai Chen
6eca1a62da qcacmn: Monitor mode configuration and processing
This change is for supporting monitor mode VAP.  All the monitor mode ring
is configured. The related monitor mode ring includes:
-monitor mode buffer ring
-monitor mode destination ring
-monitor mode status ring
-monitor mode link descriptor ring
The packet is not sent to monitor mode ring unless the monitor mode VAP is
configured. This release support Multiple VAP - AP/STA VAP plus Monitor
VAP configuration. The status ring is not used in this release. However,
the ring is tested and the ring is moving and there are TLV's in the ring.

Change-Id: I782ee0c3b998d8b3bbac79b5e7fdecdbff15fa93
CRs-Fixed: 2013049
2017-03-29 05:58:52 -07:00
Karunakar Dasineni
d0ea21f109 qcacmn: WBM ring changes to fix stability issues
1. Increased the sizes of following SRNGs used by WBM and also added max size
check in SRNG setup:
-idle link descriptor ring
-Tx completion ring
-Rx release ing

2. As per HW team, TP_ADDR and HP_ADDR for Idle link ring should remain 0 to avoid
some WBM stability issues. Remote head/tail pointers are not required since
this ring is completly managed by WBM HW

Change-Id: I93d70a287329dfeb08fcfb6b04306d65776b4834
2017-02-23 00:27:27 -08:00
Houston Hoffman
f60a3488d0 qcacmn: Add config flag to use shadow registers
For platforms that don't use QMI and have firmware
enable shadow registers, host needs to ignore the
shadow register configuration it calculated.

Change-Id: I91a3d9a0c65172afde6a2ddab61651f9f8683aee
CRs-Fixed: 2003581
2017-02-10 18:10:34 -08:00
Dhanashri Atre
0215a3ee92 qcacmn: Pass the mac id while getting the ring id
There is a bug where the mac id passed to get the
HAL srng id is always hardcoded to 1. This should be
the mac id.

Change-Id: I0e07c420f77c7158b0a778c8a5fc81af7de2e5ee
CRs-Fixed: 2003050
2017-02-06 22:50:10 -08:00
Dhanashri Atre
d4032abf27 qcacmn: Support for configuring 2nd MAC
Add support to configure the second LMAC ring
which is needed for DBS.

Change-Id: Idb055621d174c994e267dc6dcca2bc798ae79bfc
CRs-Fixed: 1116939
2017-02-01 16:23:38 -08:00
Houston Hoffman
3ba070e41e qcacmn: Include pld_common.h later
The pld_common.h stub doesn't include all the header files it needs
for compilation.  Let it get included from hal_internal.h through
hal_api.h.  In this manner, all the required .h files will allready
be included.

Change-Id: I40d107d2305baabe57719afe854bad4428d74a23
CRs-Fixed: 1113131
2017-01-30 22:18:24 -08:00
Houston Hoffman
e3c1a37468 qcacmn: add sanity check of shadow configuration
When shadow registers replace other register addresses,
ensure that they are configured to point at the registers
that would be written to with shadow registers disabled.

Change-Id: I789021fe394cad2ce50cbbeb2943827b6d5e464f
CRs-Fixed: 1113131
2017-01-30 22:18:21 -08:00
Houston Hoffman
5141f9d1e8 qcacmn: construct shadow v2 config
In this change, hif requests hal construct the shadow register
configuration for all the necessary datapath rings.  Then hif
requests hal append the configuration for the srng rings used
by the host copy engine module.  When constructing the shadow
register configuration, the hal makes note to use the shadow
register addresses instead of the actual addresses.

Change-Id: Ide8f523dece0d1dc6eb05f4c86739ece7909c25a
CRs-Fixed: 1113131
2017-01-30 22:18:20 -08:00
Dhanashri Atre
a98e024f86 qcacmn: Change due to R102 hardware headers for QCA6290
Changes needed to support the new definitions introduced
in the R102 hardware header files for QCA6290.

Change-Id: I4e3c27dfdc48b4d6a44f0f50f3e4a907be20e53d
CRs-Fixed: 1105853
2017-01-18 20:05:31 -08:00
Kiran Venkatappa
8524fdd6f8 qcacmn: Fix compilation for r96 headers
Add HW version check to remove referencing macros
not available in r96 headers. RING_ID_BMSK seems to be
removed in r96, Use it only for older version hw headers.

Change-Id: I0467a900317581ae7040ab0baae288ed9a905d60
CRs-Fixed: 1090092
2016-12-12 23:40:07 -08:00
Houston Hoffman
74109127d0 qcacmn: write DEST_MAX_LENGTH for CE rings
Change that allows configuration of max buffer
size for SRNG rings in the receive direction

Change-Id: Ib857f1fdf43c849078f9470ec029fe627379fcb4
CRs-Fixed: 1089874
2016-11-19 19:32:11 -08:00
Houston Hoffman
e1961b6e84 qcacmn: supply dev to qdf_mem_alloc_consistent
Required by newer kernels.

Change-Id: I891a6f86fcd8566deb4988a13259325be37e1fda
CRs-Fixed: 1089874
2016-11-19 06:49:42 -08:00
Houston Hoffman
6b3047aa2b qcacmn: Do msi init first and write to PRODUCER_INT_SETUP
PRODUCER_INT_SETUP register write was missed.
MSI init should be done before configuring interrupt
triggers.

Change-Id: Idf356b889ba2aa9d1269e0c07dcad02cc9c63a6a
CRs-Fixed: 1089874
2016-11-19 06:49:00 -08:00
Leo Chang
5ea93a4527 qcacmn: wifi3 compile against cdp
Wifi 3.0 compile against cdp apis.
Make compilable against mobile code base.
selective hw common header include.

Change-Id: I051f917001c0d13c762d9cb5a3ec141cd278d0e7
CRs-fixed: 1075736
2016-11-17 19:13:03 -08:00
Kiran Venkatappa
e478fe720e qcacmn: Remove function prototype for hif_get_dev_ba from c file
Function prototype for hif_get_dev_ba is added in hal_sng.c to avoid
warning. This should be ideally added in header file. Removing the
prototype from c file.

Change-Id: I3220765b1dbc8a2cd5a45ccfe85fde09aee12a00
CRs-Fixed: 1079655
2016-11-13 23:59:44 -08:00
Kiran Venkatappa
6768509c68 qcacmn: Pass valid dev in consistent mem alloc
On 64-bit platform consistent mem alloc was failing due to NULL
passed for dev. Fix this by passing valid dev in consistent mem alloc
call.

Change-Id: I730af58c637dc652c4e249b83d432e0b5f01f7fb
CRs-fixed: 1079575
2016-11-09 22:57:36 -08:00
Dhanashri Atre
7351d17b41 qcacmn: MCL Buffer Replenishment
Add support for replenishing the rx buffers using the host to
firmware buffer ring.

This includes adding a flag QCA_HOST2FW_RXBUF_RING:
When QCA_HOST2FW_RXBUF_RING is enabled the host will do the following:
- Allocate the refill buffer ring (HTT_HOST1_TO_FW_RXBUF_RING) and
populate it with
 rx buffers
- Send the refill buffer ring configuration to the firmware
- Allocate the rx DMA ring (HTT_RXDMA_HOST_BUF_RING), leave it empty.
- Send the rx DMA ring configuration to the firmware

When QCA_HOST2FW_RXBUF_RING is disabled, the host will do the following:
- Allocate the rx DMA ring (HTT_RXDMA_HOST_BUF_RING), and populate it with
 rx buffers
- Send the rx DMA ring configuration to the firmware

CRs-Fixed: 1074199
Change-Id: Iec05a973cd9d628c742e3aaa16b8dabc7797625d
2016-10-28 05:21:59 -07:00
Karunakar Dasineni
8fbfeea05f qcacmn: Lithium SRNG HAL
Initial version of HAL SRNG initialization and access functions.

Change-Id: Ic36b73bdf5053a06ca8cb2bc3a7e3edb53fc02e1
2016-09-26 13:15:26 -07:00