Commit Graph

327 Commits

Author SHA1 Message Date
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
Karunakar Dasineni
a8c779b2d1 qcacmn: Fix REO command issues
Fixes for issues seen while sending multiple REO commands:
- Fix bug in error return from hal_reo API.
- REO status for updates done as part of peer deletion are sometimes
  received after peer is deleted, causing crash due to invalid access
  in REO command status handler. Fixed by using temporary copies for
  rx_tid structures.
- Zero out REO command descriptors before setting up new commands.

Change-Id: I63409eb74fd91a21e0264fb2b3a62efb3a91bfe6
2017-02-01 11:47:50 -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
Karunakar Dasineni
e8380bbece qcacmn: REO descriptor changes
Disable CHK_2K_MODE and OOR_MODE in REO descriptor. Also set RTY bit for non-BA TID queues as temporary WAR for duplicate detection issue.

Change-Id: Ifa51c20ffbfe31c807d4e7f99014cb76f411e066
2017-01-19 12:46:37 -08:00
Venkata Sharath Chandra Manchala
8e8d8f1e82 qcacmn: Fix for compilation issues in REO management
Added suitable typecasting for qdf_set_bit and
qdf_clear_bit functions

Change-Id: I90fc0f441a6eae8dfdea43705373fced81b26b48
CRs-Fixed: 1105853
2017-01-18 20:05:32 -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
Karunakar Dasineni
a0f09eae1d qcacmn: REO management changes
Changes to use REO HW command/status interface to update/delete REO queues.

Change-Id: I3500d45db021ef314b4d03fa878314d407ddfe65
2017-01-18 20:05:29 -08:00
Manoj Ekbote
4f0c6b1732 qcacmn: REO command access APIs
Implementation of APIs for Lithium REO command/status rings

Change-Id: Ib428dd995bd597f7fbfbfc458dade6e7e258000c
2017-01-18 20:05:28 -08:00
Tallapragada Kalyan
1ef5480ea4 qcacmn: Added support to handle NULL Q descriptors
The MC BC packets cause a NULL REO queue descriptor exception,
and hence are directed to the ring that is configured to receive
this exception from REO. As of now, this error is directed to
WBM release ring. Add handling to pass these packets to stack
instead of dropping them, when received on the WBM release ring.

Note that, the final fix may be route these to REO exception ring
from which the driver may need to pass them to stack.

CRs-Fixed: 1098153
Change-Id: If544911e7882a9f5e7dbffa5ef705618e9fcbbda
2016-12-29 01:48:29 -08:00
Vijay Pamidipati
5bcfa31ec4 qcacmn: Add support to process Tx completion status from WBM descriptor
Add HAL API to parse Tx completion statistics from WBM descriptor and
populate HAL Structure and a DP API to print the statistics per packet

CRs-Fixed: 1088985
Change-Id: Ic6e918aabdbd7743d8f640e0451070dc229c6f0d
2016-12-23 06:06:01 -08:00
Karunakar Dasineni
e631b5865b qcacmn: REO descriptor changes to support blockACK
REO descriptor fields SVLD should be set to 0 and IGNORE_AMPDU should be
set to 1 to receive packets after ADDBA negotiation

Change-Id: I89e655d8a6e1e0349aeed0aa7d2c3773a3786e4a
2016-12-22 15:27:16 -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
Pamidipati, Vijay
b90a79ec7d qcacmn: Fix packet offset computation logic in Tx path
Fix the packet offset value filled in Tx descriptor.
Also fix a crash in Tx completion handler because of storing wrong
pointer in tx descriptor chain (next)

CRs-Fixed: 1088985
Change-Id: Ie2895700e0bb7e6f4b7b09a01da07a17d1c41160
2016-12-07 14:38:40 -08:00
Pamidipati, Vijay
dfe618e3b5 qcacmn: Add a new version of hal_srng API does not update HW pointer
Add hal_srng unlock API to be  used in completions reap funtion (CE) in
which HW head pointer/tail pointers need not be updated

CRs-Fixed: 1088985
Change-Id: Ia54b144e5dfd0b37bbabf992c764697928ddf76d
2016-12-06 14:50:53 -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
Pamidipati, Vijay
576bd154a2 qcacmn: Add Lithium DP Tx core functionality
Implement Lithium Core Tx Data Path, Tx HW descriptor processing
and Tx Completion Path (Processing of WBM Release Ring)

CRs-Fixed: 1073253
Change-Id: I11bebc49177398a157fcd161228859e2ef860402
2016-11-01 20:06:51 -07:00
Vijay Pamidipati
a3e1e3ca75 qcacmn: Add HAL Tx library needed for Lithium Datapath
Implement HAL APIs for accessing HW_TCL Data Descriptor,
processing of Tx MSDU Extension Descriptor and WBM Descriptors.

CRs-Fixed: 1073253
Change-Id: If6bd5c3ef7837b6968295d1a2cd5a18299d4ce42
2016-10-28 07:07:35 -07: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
9b814ce7e5 qcacmn: Lithium data path initialization
1. Intial version of Lithium data path initialization
2. HAL changes for REO and WBM setup

Change-Id: I52f638faf6e60c2a932acc3c76788bf8946c30db
2016-10-27 15:21:45 -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