Commit Graph

58 Commits

Author SHA1 Message Date
Venkata Sharath Chandra Manchala
1e3a479fdf qcacmn: Add hal_rx_mpdu_get_fr_ds API
Implement hal_rx_mpdu_get_fr_ds API
based on the chipset as the macro to
retrieve for_ds value is chipset
dependent.

Change-Id: I6d41d02ac50cae752567d98645f0447cc122a84f
CRs-Fixed: 2522133
2019-10-17 15:08:06 -07:00
Venkata Sharath Chandra Manchala
e7924fd2da qcacmn: Add hal_rx_mpdu_get_to_ds API
Implement hal_rx_mpdu_get_to_ds API based
on the chipset as the macro to retrieve
to_ds bit value is chipset dependent.

Change-Id: I36d9d14e226bcc604b91d8aecbe52836c5a12272
CRs-Fixed: 2522133
2019-10-17 15:07:57 -07:00
Venkata Sharath Chandra Manchala
96ed623043 qcacmn: Add hal_rx_mpdu_start_sw_peer_id_get API
Implement hal_rx_mpdu_start_sw_peer_id API
based on the chipset as the macro to retrieve
sw_peer_id value is chipset dependent.

Change-Id: Ifebaf2430731f5e0593dde4789d721e9fe7ce7c1
CRs-Fixed: 2522133
2019-10-17 15:07:50 -07:00
Venkata Sharath Chandra Manchala
2a52d3426c qcacmn: Add hal_rx_get_mpdu_mac_ad4_valid API
Implement hal_rx_get_mpdu_mac_ad4_valid API
based on the chipset as the macro to retrieve
mac_ad4 value is chipset dependent.

Change-Id: I9d7cc90e798d4f0775e915fe6edcb1a1f5129490
CRs-Fixed: 2522133
2019-10-17 15:07:45 -07:00
Venkata Sharath Chandra Manchala
55f2d92e61 qcacmn: Add hal_rx_msdu_end_last_msdu_get API
Implement hal_rx_msdu_end_last_msdu_get API
based on the chipset as the macro to retrieve
last_msdu value is chipset dependent.

Change-Id: I561c28a49062d7b650e68c5a4ce4da0183be34d6
CRs-Fixed: 2522133
2019-10-17 15:07:40 -07:00
Venkata Sharath Chandra Manchala
79055387d9 qcacmn: Add hal_rx_msdu_end_da_is_valid_get API
Implement hal_rx_msdu_end_dat API based on
the chipset as the macro to retrieve da_is_valid
value is chipset dependent.

Change-Id: I79f06eaa2576e7516c21f963b2c149aac7f62c64
CRs-Fixed: 2522133
2019-10-17 15:07:33 -07:00
Venkata Sharath Chandra Manchala
cb255b4834 qcacmn: Add hal_rx_msdu_end_first_msdu_get API
Implement hal_rx_msdu_end_first_msdu_get API
based on the chipset as the macro to retrieve
first_msdu value is chipset dependent.

Change-Id: Iea325159a0349c45a249c1ae113664c41a54b0f1
CRs-Fixed: 2522133
2019-10-17 15:07:28 -07:00
Venkata Sharath Chandra Manchala
a2d7497e1c qcacmn: Add hal_rx_print_pn API
Implement hal_rx_print_pn API based on the
chipset as the macro to retrieve
pn value is chipset dependent.

Change-Id: Id9d0d3b34a5f6a09fe5903e1d24bb0a59205174b
CRs-Fixed: 2522133
2019-10-17 15:07:23 -07:00
Venkata Sharath Chandra Manchala
c1a4c8b4fc qcacmn: Add hal_rx_encryption_info_valid API
Implement hal_rx_encryption_info API based
on the chipset as the macro to retrieve
sa_idx value is chipset dependent.

Change-Id: I0c48800dfa5628898c53f7a9271e517b6bfa3da7
CRs-Fixed: 2522133
2019-10-17 15:07:18 -07:00
Venkata Sharath Chandra Manchala
f05b2ae5c2 qcacmn: Add hal_rx_msdu_end_l3_hdr_padding_get API
Implement hal_rx_msdu_end_l3_hdr_padding_get API
based on the chipset as the macro to retrieve
sa_idx value is chipset dependent.

Change-Id: Ice1fc2d70e339dc1d80fa6f34f37c5a7aa074be5
CRs-Fixed: 2522133
2019-10-17 15:07:13 -07:00
Venkata Sharath Chandra Manchala
43d563277d qcacmn: Add hal_rx_desc_is_first_msdu API
Implement hal_rx_desc_is_first_msdu API
based on the chipset as the macro to
retrieve first_msdu bit value is chipset
dependent.

Change-Id: I8e8a3aceb225b591b96e6f8453ffbebf1f78e529
CRs-Fixed: 2522133
2019-10-17 15:07:09 -07:00
Venkata Sharath Chandra Manchala
5bf1e5a1da qcacmn: Add hal_rx_msdu_end_sa_idx_get API
Implement hal_rx_msdu_end_sa_idx API
based on the chipset as the macro to
retrieve sa_idx value is chipset
dependent.

Change-Id: Ib874520be9e7ad778c2a9a3c415e5c3047450b31
CRs-Fixed: 2522133
2019-10-17 15:07:02 -07:00
Venkata Sharath Chandra Manchala
59ebd5ee0c qcacmn: Add hal_rx_msdu_end_sa_is_valid_get API
Implement hal_rx_msdu_end_sa_is_valid_get API
based on the chipset as the macro to retrieve
sa_idx valid bit is chipset dependent.

Change-Id: I8bcb7030554331922ed12ea9da3ef51cd64b5c40
CRs-Fixed: 2522133
2019-10-17 15:06:56 -07:00
Venkata Sharath Chandra Manchala
ee90938f62 qcacmn: Add hal_rx_msdu_end_da_is_mcbc_get API
Implement hal_rx_msdu_end_da_is_mcbc_get based
on the chipset as the macro to retrieve
mcbc value is chipset dependent.

Change-Id: I860d259515c31345501080577d7a34beb97e5f60
CRs-Fixed: 2522133
2019-10-17 15:06:48 -07:00
Venkata Sharath Chandra Manchala
d1b7e4c326 qcacmn: Add hal_rx_get_rx_fragment_number API
Implement hal_rx_get_rx_fragment_number
based on the chipset as the macro
HAL_RX_MPDU_GET_SEQUENCE_NUMBER is
chipset specific.

Change-Id: I967190fa3a55d45f46760f58eab5007bf5fa908f
CRs-Fixed: 2522133
2019-10-17 15:06:42 -07:00
Sravan Kumar Kairam
78b01a1e1b qcacmn: Flush srng tp and hp only for flush event
Currently after runtime resume all SW2TCL data and reo cmd
srng rings hp and tp value are flushed. In case of IPA
offload case SW2TCL3 righ hp value will be updated by IPA
and not by host. In case of runtime pm enable host is
setting the value to zero as part of runtime resume which
results in incorrect hp value of SW2TCL3. As part of this
change set flush event for rings which are accessed by host
during link down state and after runtime resume flush the
rings for which flush event is set.

Change-Id: I5c9afa708277cf3a6e6d5ef99447bc21f88cfdcf
CRs-Fixed: 2514621
2019-10-12 22:16:04 -07:00
Subhranil Choudhury
4ee1b5e28d qcacmn: Add cache-set-num in HKv2 Tx path
Add the infrastructure to add cache-set-num field in
tx descriptor of HKv2.

Change-Id: Iec9423c3c90f868341b56ced795cd0bb73c9766a
2019-09-15 22:48:47 -07:00
Venkata Sharath Chandra Manchala
5ee6efde61 qcacmn: Avoid shadow register access when link is down
When the scheduler thread initiates the WMA_SET_BSSKEY_REQ
we send CMD_UPDATE_RX_REO_QUEUE to REO srng. This is done by
posting a descriptor to the reo command ring and then we
update the HP so that the HW can consume the descriptor.
Avoid accessing HP shadow address when we are in runtime
suspend state. Perform a hif_pm_runtime_get to resume the
link and access the shadow register and once done initiate a
hif_pm_runtime_put to allow device to go into runtime
suspend.

Change-Id: I24c3e046a5769f03a0f1969360cccdbe55b81d45
CRs-Fixed: 2495720
2019-08-05 18:53:08 -07:00
Akshay Kosigi
8eda31cab3 qcacmn: Remove void ptr usage in HAL
Add code to replace usage of void pointers from
HAL layer and instead use appropriate opaque pointers

Change-Id: Id950bd9130a99014305738937aed736cf0144aca
CRs-Fixed: 2487250
2019-07-27 13:43:07 -07:00
Akshay Kosigi
0bca9fb200 qcacmn: Change to remove void pointer usage for HAL SRNG
Add code to remove void pointer usage for hal_srng
and use opaque pointer dp_hal_ring_t instead.

Change-Id: I6907f7376d7fe3c9180b8795bd96f49fead2ec64
CRs-Fixed: 2484404
2019-07-27 13:42:41 -07:00
Akshay Kosigi
91c56523d3 qcacmn: Remove void pointer usage for ring desc's
Make change to remove usage of void pointers for
ring descriptors and instead use a opaque pointer
dp_ring_desc_t.

Change-Id: Ia1e9a3da9eaa3cccf297b2135b52a72f2fe21431
CRs-Fixed: 2484409
2019-07-27 13:42:37 -07:00
Akshay Kosigi
6a206753d6 qcacmn: Add code to remove void pointer usage
Add code to remove void pointer usage for hal_soc
and introduce opaque pointer to be used intead of void
from dp layer into hal layer

Change-Id: Ia38571174c6ed79558d0f0c9cd1a0f4afaa66483
CRs-Fixed: 2480857
2019-07-27 13:42:34 -07:00
Amir Patel
57e7e055f2 qcacmn: Filter rx fcs error frames for m_copy mode
Filter fcs_err frames and pass only first fcs ok msdu payload
from ppdu to upper layer

Change-Id: Ibf739193275f4f5a5c3e786abbbaa45165b5aa13
CRs-Fixed: 2439392
2019-07-05 14:32:20 -07:00
Debasis Das
c39a68da37 qcacmn: Support for 8021p pcp to tid mapping
Add HAL and DP support to configure
8021p PCP to TID mapping tables into Hardware.

Change-Id: I8a54970c8c4ef56f3c487b6e648c4411b3abde0e
2019-03-25 14:24:36 -07:00
Krunal Soni
9911b44343 qcacmn: Use hal_verbose_debug() to print msgs which come excessively
Some of the print messages in HAL module come very excessively.
Use hal_verbose_debug() API to print them.

CRs-fixed: 2405028
Change-Id: I4b4754af65c00edb571de898527026b6183ef15f
2019-03-06 12:52:10 -08:00
Venkata Sharath Chandra Manchala
443b9b4da2 qcacmn: Print HP/TP Stats
Extend txrx_stats to print current HP/TP
Status for UMAC rings.

Change-Id: I50332f7507fdf1841dee51f0b1e97ef4ea68f04f
CRs-Fixed: 2332191
2018-11-13 06:56:15 -08:00
Mohit Khanna
efdae7f1bf qcacmn: Reduce log level in hal_srng.c
Functions hal_update_srng_hp_tp_address and hal_set_one_shadow_config
are dumping a lot of information, which is not needed.

Reduce INFO log levels to DEBUG.

Change-Id: I210cd5493d758685312b7851eb37e05ce93b6071
CRs-Fixed: 2342960
2018-11-09 19:43:33 -08:00
Balamurugan Mahalingam
764219e1a8 qcacmn: move some hal functions to hal_generic_api.h
Functions hal_rx_wbm_err_info_get, hal_tx_comp_get_release_reason,
hal_rx_dump_mpdu_start_tlv uses some hardware macros directly and the
value differs between qca8074v1 and qca8074v2 targets.
Move these functions to generic api file and compile it per target.

Change-Id: Ib78fb6e69238577aac64da3f60f38a72cee316b0
2018-10-03 02:44:47 -07:00
Balamurugan Mahalingam
fa1d9c7098 qcacmn: group hal tx and rx functions
keep hal tx and rx functions grouped as it will look clean
and avoid confusions while browsing code for others.

Change-Id: I519690d42cd077689bf7afe697908f43d7055da5
2018-10-03 02:44:43 -07:00
Chaithanya Garrepalli
710e2959f2 qcacmn: Add HAL APIs to set search type and index
HAL APIs added to set search type and search index
in tx descriptor

Change-Id: I9fc2eae5d1f75a7cb72ba141f45a60f248b52f9c
CRs-fixed: 2312178
2018-09-16 09:49:13 -07:00
Balamurugan Mahalingam
5d80641550 qcacmn: [1/2] Support both qca8074v1 and qca8074v2 from hal
Some of the macro names defined in qca8074v1, are defined with
a slightly different name in qca8074v2, and few macros have the
same name in both headers but are defined with different values.
Fixed the same.

Change-Id: I5e948baf5326d1d8fdfa2bd7ee8aa072c710d17c
2018-09-04 11:53:36 -07:00
Balamurugan Mahalingam
96d2d41c87 qcacmn: Fix compilation issues and a minor issue
Removed qdf exports on functions defined in target specific
header files and defined those functions as static. Revert
changes on hal_rx_msdu_end_sa_idx_get and make
hal_rx_msdu_end_da_idx_get target specific

Change-Id: I2858b1d77118f0a26b54bf983bd342c7a4fe757d
2018-07-21 00:03:36 -07:00
Balamurugan Mahalingam
97ad1061a3 qcacmn: introduce few target specific hal functions
make hal_rx_msdu_end_sa_idx_get and hal_rx_dump_msdu_end_tlv
routines target specific as qca6390 implementation differs
a bit. add target specific functions for qca6290 and qca8074

Change-Id: Ie05b91d965bae3642e3264620c6d8427ad368044
2018-07-21 00:03:32 -07:00
Balamurugan Mahalingam
d0159640ea qcacmn: Separate hal for qca6290 and qca8074
Create separate individual hal_srng_table and hal register
offset in target specific source files. Create separate
functions for qca6290 and qca8074 for few hal rx tx
functions as the macro value differs between the chipsets.

Assign target specific hal tx, rx ops as part of hal_attach
and call respective hal tx, rx ops through callbacks.

Change-Id: Ibbf490c678c39fdd9d54191aad7aaec786db30ec
2018-07-21 00:03:20 -07:00
Venkata Sharath Chandra Manchala
9a59bd6483 qcacmn: Add a new parameter to the srng table
Add max_size parameter in the hw_srng_table
to hold the maximum size for a given ring.

Change-Id: Ibfce021505ab9a55d3208b1c5aba26021d1fe230
CRs-Fixed: 2262818
2018-07-11 14:29:27 -07:00
Nandha Kishore Easwaran
372f566a59 qcacmn: Remove rx_header.h file inclusion
Remove inclusion of rx_header.h file

Change-Id: Ie585334fcfed369f2ff81b4d1d1bc16466c46c3e
CRs-fixed: 2256497
2018-06-08 20:14:15 -07:00
Mohit Khanna
6c22db3b45 qcacmn: process PHYRX_OTHER_RECEIVE_INFO_OTHER TLV
Process WIFIPHYRX_OTHER_RECEIVE_INFO_E and
WIFIPHYRX_OTHER_RECEIVE_INFO_RU_DETAILS_E TLVs in monitor mode.

Change-Id: I9cea6cee0499fd9ae9e07d4479c7010e35f3e5a5
CRs-Fixed: 2242514
2018-05-22 13:00:02 -07:00
Aniruddha Paul
91dfd50160 qcacmn: Add API to change Rx Fragment DST ring
Add API to change the Rx Fragment DST ring based on the SoC NSS
config
CRs-Fixed: 2175933

Change-Id: I2e3f0b82d301538f54d9790d55eeccdd0f6fa154
2018-01-30 23:55:20 -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
Soumya Bhat
6fee59c4d5 qcacmn: RX AM Copy mode
Provision to send first MSDU of a PPDU to upper layer based
on PPDU ID received in RX monitor lite ring.
FR 42926

Change-Id: I6daed9382b57fb3355ec6453e0609085cc7b9bb0
CRs-Fixed: 2127108
2017-12-01 22:28:23 -08:00
sumedh baikady
86a83e8927 qcacmn: Fix Radiotap headers in monitor mode
In monitor mode, code decodes legacy rates and bandwidth information for
HT and VHT. Other changes include populating radiotap header with correct
nss and mcs values for legacy, HT and VHT frames. Mapping of mcs rates in
rx_msdu_start tlv and radiotap header info is done using Lithium data
structure document.

Change-Id: I5f20e5d89329738e3a6c076ee14457c003cab279
CRs-fixed: 2083027
2017-09-18 17:45:54 -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
Karunakar Dasineni
f40efac097 qcacmn: Fix wbm release descriptor settings
Set BM_ACTION, RELEASE_SOURCE and BUFFER_OR_DESC_TYPE fields in WBM release
ring descriptor in hal_rx_msdu_link_desc_set function.
Added HAL API to retrieve RXDMA push reason and error code from REO entrance
descriptor.

Change-Id: I64209d9ebb332136fae43a55b39e0f0d242315fb
CRs-Fixed: 2062922
2017-06-30 19:29:47 -07:00
Gurumoorthi Gnanasambandhan
ed4bcf8e9d qcacmn: Add changes for PN check in REO
Setup PN check in REO for Security mode.

Change-Id: I682cda20907b7f64ba18bfef9927b7f8d72d2b54
2017-06-19 12:43:30 -07:00
Karunakar Dasineni
4055568bad qcacmn: Monitor status ring handling
Changes to process PHY TLVs from monitor status ring and extract
information required for radiotap header.

Change-Id: I99d642e7506ea797b26dbfac89fd223d1a4c0a55
CRs-Fixed: 2048006
2017-06-16 17:12:13 -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
Ravi Joshi
36f68ad7cb qcacmn: Enable support for receive defragmentation
Enable support for receive defragmentation on Lithium.

Change-Id: I6c1213db29d3b6e0a11506d6945d9ea05ece2c73
CRs-Fixed: 1109359
2017-05-08 14:59:04 -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
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