Commit Graph

710 Commits

Author SHA1 Message Date
Himanshu Batra
7be2cf3775 qcacmn: Add support for vlan tagged traffic in IPA offload
In IPA offload, both tagged and untagged traffic cannot be handled with
a single rx pipe. Hence, add support for 2nd RX pipe for tagged and
untagged traffic respectively.

Change-Id: I77ff633327696f66df42fb592492321c1591646b
CRs-Fixed: 3226021
2022-07-21 11:02:34 -07:00
Hariharan Ramanathan
fc00c5bb21 qcacmn: Initial Hal changes for QCA5332
Changes to create hal files and add hal related changes in hal_srng.c

Change-Id: I96dd76333e68bdd030e17e09602b93843ebc5030
CRs-Fixed: 3233322
2022-07-18 04:53:25 -07:00
Devender Kumar
e198badbe6 qcacmn: Get the correct MSDU length in the RX path
Skb under panic issue is seen when a packet comes via RX err path,
MSDU length read by SW is coming as 0 and leaving no space for skb_push
in buffer, data is moving beyond the head and causing the issue.
MSDU length is read by generic API which is architecture-independent,
hence the struct size for one architecture is different from another
architecture.

FIX is to get the MSDU length by architecture-specific API.

Change-Id: I5a6259034e5e06ae9ce7ba6b135b44f2849f2fd9
CRs-Fixed: 3235636
2022-07-16 10:47:11 -07:00
Shwetha G K
b9951fb457 qcacmn: Use HAL_RX_GET_64 to read cfr elements
Host failed to read some of cfr elements by HAL_RX_GET
for Waikiki since their LSB is big then 32 and reading
4 bytes isn't enough. This change reads 8 bytes and then
gets cfr elements properly.

CRs-Fixed: 3241915
Change-Id: I0863f22a1cc0c5fd490ec3669ff6a97b27c66f15
2022-07-14 16:36:58 -07:00
Devender Kumar
277054124d qcacmn: AST entry create and update support for IPA
To support WDS feature in IPA driver, WLAN needs
to update the ast entry for any new rx packet, and for
end-nodes connected via repeater to root.

CRs-Fixed: 3226348
Change-Id: I7383b12f18e7c70ec06499d66130667eca033131
2022-07-13 02:37:22 -07:00
Rakesh Pillai
9ba8236444 qcacmn: Add support to track high watermark for SRNGs
Add support to track the high watermark for the number
of entries which are used at any given instant. This helps
in identifying if the ring size is sufficient or is being
full for certain use-cases.

Change-Id: Id3ffa52c653696699fbcfbb556a815d5f7908863
CRs-Fixed: 3235115
2022-07-11 03:59:38 -07:00
jinbliu
bb29a06aad qcacmn: Add hal API to get L3 type field
In some cases we need to classify frames accordinging
to l3 type. This change mainly focus on this issue.

Change-Id: I4bc49a808a02b4bc8c65f920690922045d65e739
CRs-Fixed: 3198481
2022-07-11 02:10:05 -07:00
David Oladunjoye
61b329ec5c qcacmn: hal: Replace fallthrough comment with attribute
-Wimplicit-fallthrough is being enabled by default. Some compilers
such as clang require the attribute instead of just a fallthrough comment.

Change-Id: Id97d026b2d90a607974cc541d0301565af423f2f
CRs-Fixed: 3218239
2022-07-07 02:38:33 -07:00
Shwetha G K
5e5ba18f3d qcacmn: Remove target type flag check on CFR APIs
Remove target type build flag check on CFR APIs

CRs-Fixed: 3232751
Change-Id: I6b4e7450799a5143b6f87bb00ca408551bc8e7fc
2022-07-05 06:32:52 -07:00
Jinwei Chen
9d2b26795a qcacmn: add 11be TX/RX rate statistic support
Currently 11be msdu rate statistic is not supported yet.
Another issue is: HW reported pkt type value 6, while host
SW defined 11be type DOT11_BE (value 5), they are not matching.
DOT11_BE value 5 is referred in monitor mode and otherwhere,
so do map and conversion in host sw side.

Change-Id: Ic5c2dd2a35cbe0ecd6430f007b6e7e02ece40998
CRs-Fixed: 3230900
2022-07-05 03:19:03 -07:00
Nandha Kishore Easwaran
b7939ba6f3 qcacmn: Fix MSDU desc get definition
Fix MSDU desc get macro for qcn9224.

Change-Id: I987f2dbd546b227306b7708756426cdd6346bddc
CRs-Fixed: 3233284
2022-07-04 05:35:13 -07:00
Srinivas Girigowda
6d056b9959 qcacmn: Add support for Mango device id
Add support for Mango device id.

Change-Id: I2b32a39e258caab408723db77f132af364dc6b04
CRs-Fixed: 3232512
2022-07-02 09:55:56 -07:00
Amir Patel
debe4c7ecf qcacmn: Fix issues from monitor path
a. Fix memleak issue due to RX_HDR not received for a MPDU
b. Compute appropriate packet offset for non-decapped packets
c. Add correct DMA_LEN while adding a frag to SKB.
d. Add debug stats

Change-Id: Ie946f79df94df05789220b97c159c60d608bf1b2
CRs-Fixed: 3213698
2022-06-28 12:17:51 -07:00
Amit Mehta
721afd10ab qcacmn: Move tcl_data_cmd function attribute to common file
Move the function attribute to common file so that the
parsing issue due to unreferenced tcl_data_cmd can be
fixed on other targets also.

Change-Id: I40a7196926061e8d232f0f070c0ed045dafd97e2
CRs-Fixed: 3228562
2022-06-28 01:13:01 -07:00
nobelj
8c3b9f7684 qcacmn: tx monitor populate block ack information from tlv
tx monitor populate block ack information from tlv

Change-Id: I500015e888a0984188bcee821262dee072dea7f9
CRs-Fixed: 3205304
2022-06-23 16:22:12 -07:00
nobelj
1113811c53 qcacmn: tx monitor populate SIG information from tlv
tx monitor populate SIG information from corresponding tlv.

Change-Id: I8b90c27e88574d4bb6610e500e33efd54a270c76
CRs-Fixed: 3204953
2022-06-23 16:22:06 -07:00
nobelj
69a8a9c767 qcacmn: tx monitor populate basic tlv
tx monitor populate basic tlv data.

Change-Id: I346b5da00b967fb9717009a153e8f8db239494ef
CRs-Fixed: 3204929
2022-06-23 16:21:59 -07:00
Wu Gao
e46707f810 qcacmn: Correct registers when populate CFR elements from tlv
This is requirement change about correcting the registers when
populate CFR elements from tlv.

Change-Id: I424a0d3ae569dae3378137b84067a30b0fa28413
CRs-Fixed: 3218220
2022-06-22 16:42:55 -07:00
Wu Gao
5e7510f34a qcacmn: Use HAL_RX_GET_64 to read cfr elements
Host failed to read some of cfr elements by HAL_RX_GET for kiwi since
their LSB is big then 32 and ready 4 bytes isn't enough. This change
reads 8 bytes and then gets cfr elements properly.

Change-Id: I7715ae7c713e2b8e15ec19a191be2f770e2971a6
CRs-Fixed: 3218274
2022-06-22 09:01:14 -07:00
Jinwei Chen
45f5248753 qcacmn: support UL delay report for KIWI
support Ul delay report for KIWI

Change-Id: If78be5b7d1fa29e522d1df1d4372115d8e00473c
CRs-Fixed: 3222167
2022-06-21 05:18:22 -07:00
nobelj
373d053c4c qcacmn: tx monitor include tlv header files
Tx monitor feature need tlv, include all supported tlv header files

Change-Id: Ia01f7d0e498f7082376851334f5f3a31083b36f8
CRs-Fixed: 3203050
2022-06-20 14:22:12 -07:00
Ananya Gupta
8565e7029f qcacmn: Register DP, HTC, HAL modules with Runtime PM module
With restructuring in HIF runtime PM module, modules are
required to register with the HIF runtime PM module. Also,
changes are done in functions of allowing and preventing
runtime PM suspend as part of restructuring.
This change registers DP, HTC and HAL internal modules
with runtime PM module and update HIF runtime PM function
calls with the restructured code of HIF runtime PM module.

Change-Id: I8899a1d3b92a90a05c5eaf4df7609f4008f739f8
CRs-Fixed: 3169372
2022-06-18 23:11:24 -07:00
Shwetha G K
308079ab5e qcacmn: Fix invalid ring id issue when CFR is enabled
Direct DMA source ring type has two rings where ring0 is
used for Spectral and ring1 is used for CFR. The current
hal_srng_ring_id do not have the ring_id defined for CFR,
which leads to wrong ring_id populated for TX MON feature,
which collides with CFR ring.

Fix the same by defining ring_id for CFR.

CRs-Fixed: 3220401
Change-Id: I778cea533a1907ae6cd94f63734ca6c967891b9d
2022-06-16 11:52:50 -07:00
Nandha Kishore Easwaran
debafd9b7b qcacmn: Add subtype filtering support
Add subtype filtering support for tx lite monitor.

Change-Id: I330f98abdfad3b9134f824b794a016dbd46696be
CRs-Fixed: 3219324
2022-06-16 09:15:21 -07:00
Harsh Kumar Bijlani
372f5a1376 qcacmn: Correct the value of macro QDF_MON_STATUS_USIG_MU_VALIDATE2_SHIFT
Incorrect value of macro QDF_MON_STATUS_USIG_MU_VALIDATE2_SHIFT
leads to non-zero value of field "Punctured Channel Info" in
USIG TLV in radiotap header even if puncturing is not enabled.

Correct the value of macro QDF_MON_STATUS_USIG_MU_VALIDATE2_SHIFT to 14.

Also use correct set of macros for setting of usig_mask.

Change-Id: I4a5594f784137238ee4aa072c7595e83673c1960
CRs-Fixed: 3218536
2022-06-15 13:54:53 -07:00
Ripan Deuri
0ffa79f0a4 qcacmn: Use CONFIG_SAWF macro for enabling HW Tx Delay
Use CONFIG_SAWF macro to prevent linking dp_set_delta_tsf in
low memory profile.

Change-Id: I07b75f893e6d043839225d9b7288823b6ef2f823
CRs-Fixed: 3211426
2022-06-08 17:10:16 -07:00
Shiva Sankar Gajula
5b5d4cb57a qcacmn: Handling MIC failures for QCN9224 target
For QCN9224 target, All the MIC failures are reported
as decrypt error from FW.

So, added changes to handle MIC failures for QCN9224
target .

Change-Id: I32e616e01e3cd6e76ef105d73fd8a87ce2c81cb9
CRs-Fixed: 3192749
2022-06-07 10:54:02 -07:00
Rakesh Pillai
ae051ef432 qcacmn: Handle Status buffer done tlv for monitor mode
WIFIRX_STATUS_BUFFER_DONE_E tlv indicates the dma
to monitor status ring is complete. Currently this
tlv is unhandled and the logs are flooded with error
message for this TLV being unhandled.

Handle the status buffer done tlv to remove the
unnecssary logging onto the console.

Change-Id: Ie1ac6adf46092ba7bff3ee4a3262fc98c8a6eb3d
CRs-Fixed: 3208659
2022-06-03 19:39:32 -07:00
nobelj
90ad48aa86 qcacmn: tx monitor base framework for tlv parsing
tx monitor base framework for tlv parsing.

Change-Id: Ia39b17b32406b655b77ddcddf2b5df981aa7c56b
CRs-Fixed: 3203043
2022-05-30 10:47:11 -07:00
Prakash Manjunathappa
1684251d1f qcacmn: Move FISA FST table to CMEM on Kiwi
Add support to move FISA FST from DDR to CMEM, enable it for Kiwi
Adding CMEM support for FISA FST includes
1) Reserving CMEM memory space FISA FST
2) Add HAL macros for CMEM flow search entry

Change-Id: I45fc91a86c1ac89d3d95b246e26ea981314425a8
CRs-Fixed: 3199250
2022-05-27 19:37:16 -07:00
Ripan Deuri
74458d4542 qcacmn: Add function to calculate hardware Tx delay
Define a new function to calculate HW delay so that same logic
can be used to calculate delay by other modules.

Change-Id: Id3740bcaa2cd558b89ab02d8e88d5947eb5997b1
CRs-Fixed: 3198305
2022-05-27 18:06:34 -07:00
Jinwei Chen
a3585f6fe8 qcacmn: Add sanity check for BA window size in DP
The original BA window size given from CP might > max DP supported,
add sanity check based on HAL target allowed.

Change-Id: Ibadaddeffe65165a89d580d8a5cbf5f7c724c809
CRs-Fixed: 3193852
2022-05-26 01:32:39 -07:00
Amir Patel
bf92ed7b61 qcacmn: Add sanity check while adding a-msdu subframe header
1. Add sanity check before adding a-msdu subframe header
2. Add truncate MPDU handling

CRs-Fixed: 3191386
Change-Id: I11e6f971e470e486438ece9c4a7daef3df9f71ed
2022-05-26 01:32:33 -07:00
Ananya Gupta
1f9ab627fd qcacmn: Increase status size for HTT WBM completion v3
In beryllium DP, htt_tx_wbm_completion_v3 is used in which
20B are used by host and only 16B is assigned to the htt tx
status.
To fix this, increase the macro HAL_TX_COMP_HTT_STATUS_LEN
to 20 bytes.

Change-Id: I973ba1f8118488089cd6d6baac7fd589886c2164
CRs-Fixed: 3199031
2022-05-25 07:30:33 -07:00
Mohit Khanna
04bf8070da qcacmn: Reo-Cmd: Donot write to reg if no src desc
For reo_cmd ring, in current implementation, we call hal_srng_access_end
in case a descriptor is not available before baling out. This may cause
a write to the shadow register for the reo_cmd ring. In case we are in
the middle of WOW, this can be problematic.
Modify existing implementation to use hal_srng_access_end_reap, which
will not schedule a write to the register and simply return.

Change-Id: Ifb83d904e39b3d749522cd246a5ab3fe51a3104e
CRs-Fixed: 3194289
2022-05-24 16:01:27 -07:00
Rakesh Pillai
68f96a8c79 qcacmn: Add support to send Shadow config v3
Shadow config v2 can support max of 36 shadow
registers only. For KIWI target, there are 40
shadow registers supported.

Hence add support to send shadow config v3
for KIWI.

Change-Id: If57e6597397da3e239f25a6c0cc24f8fd37dcdf1
CRs-Fixed: 3167758
2022-05-19 01:57:23 -07:00
nobelj
ba3853e95f qcacmn: Add fix for tx monitor double free and other minor fixes
Add fix for tx monitor double free and other minor fixes like updating
channel frequency and channel number if it wasn't fetched properly,
fetch protection address only if it is valid.

Change-Id: I184e08080a47b903176b9df0a192f0b5eb0b2750
CRs-Fixed: 3184727
2022-05-19 00:20:12 -07:00
Chaithanya Garrepalli
cdbc3c0f76 qcacmn: Fix batch invalidate issue in ring WRAP around case
In ring WRAP around case invalidate the descriptors which
are being reaped

Also use no_dsb invalidate API for invalidate descriptors

Change-Id: Iafa844c81a8364af31520ce5fa3e030073e7c706
CRs-Fixed: 3198373
2022-05-17 16:44:56 -07:00
Jinwei Chen
15a9ac983c qcacmn: Support 1K BA window size for KIWI
Support 1K BA window size for KIWI

Change-Id: I9912524ebc3afc0a2a7e53f5849f5c2c881a10f4
CRs-Fixed: 3181140
2022-05-17 15:16:25 -07:00
sumedh baikady
5d0d6db673 qcacmn: Clear HW REO cache for shared reo qref entries
Clear HW REO cache when new entry is written to shared
REO qref table.

Change-Id: I43cffb66b3e7fdf62afb7ffc1729275b868b9888
CRs-Fixed: 3189158
2022-05-06 16:42:57 -07:00
Manoj Ekbote
74ede2801b qcacmn: Handle ML destination in Intra-BSS code
When destination peer is an ML peer, get the soc from da_peer.

Change-Id: I93d10a7ab9ce805180397bcf0f3b404c27df528b
CRs-Fixed: 3177339
2022-04-30 03:02:31 -07:00
Harsh Kumar Bijlani
5eeabf4f49 qcacmn: Update reception type from PPDU Start User Info TLV
For MU_MIMO traffic from AP to STA, RSSI Legacy TLV gives
reception type as QDF_RECEPTION_TYPE_ULOFMDA which is incorrect.

In order to fix this, update reception type from PPDU Start User
Info TLV. Also remove updation of reception type from LSIG TLVs
to avoid override of reception type value.

Change-Id: I9ef4c5bc7a15d4e68404d702bec61eca9c9bad4c
CRs-Fixed: 3178085
2022-04-29 17:21:08 -07:00
sumedh baikady
e10617683d qcacmn: Fix mem issue in reo desc shared table free
Fix use after free in detach path of REO shared table.

Change-Id: I9bba8f16e19f2e6a5217c78a633bbb57d1609edf
CRs-Fixed: 3184481
2022-04-27 22:57:21 -07:00
Sai Rupesh Chevuru
d365912c55 qcacmn: Flush and invalidation of descriptor memory at allocation
Flush and invalidation of descriptor memory at allocation is helping
to avoid NULL descriptors issues in TX and RX path.

Change-Id: Ifcdb65df01365e7ec0b0be59d8b4bf862d90943d
CRs-Fixed: 3180696
2022-04-27 22:57:15 -07:00
sumedh baikady
324dcd5688 qcacmn: Add target check for reo shared qaddr enabling
Enable REO shared qref for 11be targets.
Fix a compilation issue in printing dma_paddr type. 

Change-Id: Ib8568a82e96016ea367c8e0122d862e3d6e70d00
CRs-Fixed: 3178147
2022-04-26 14:59:37 -07:00
aloksing
4022e9c245 qcacmn: Fix build issue
Fix build issue when WLAN_FEATURE_11BE undefined.

Change-Id: Id94702aaa23480cb3793716a8c820a68c9c7cacb
CRs-Fixed: 3180403
2022-04-25 08:58:16 -07:00
Jeevan Kukkalli
cedb0f2795 qcacmn: Handle lite monitor frames
Call function to process mpdus when lite monitor
feature is enabled

Change-Id: I0df722a92e91bddc09a84dce2bc2aa6a67548045
CRs-Fixed: 3173953
2022-04-22 03:10:57 -07:00
aloksing
9cc1b3a305 qcacmn: Get RU details in MIMO case
Get NSS, MCS and RU size from PPDU_START_USER_INFO TLVs.

Change-Id: I5898a46a52e8a1eb25e3cf54e7dfe50c503e1b68
CRs-Fixed: 3167954
2022-04-21 04:33:31 -07:00
Rakesh Pillai
a8a385329d qcacmn: Add MU msdu_q only for monitor 2.0
Monitor 2.0 uses a msdu_queue (75K memory), which
is currently enabled for monitor_1.0 as well.
Add this memory under Monitor_2.0 feature, so that
there is no memory increase for monitor_1.0.

Change-Id: If0f3701787585ec2b2efde018287101919a77570
CRs-Fixed: 3176254
2022-04-20 01:37:40 -07:00
Amir Patel
19970ea217 qcacmn: Add MPDU restitch logic For Waikiki RxMON
a. For decapped frames, convert frames from 802.3 t 802.11
b. for non-decapped frames no conversion is needed
c. Apply radiotap header and deliver MPDU to osif layer

CRs-Fixed: 3074441
Change-Id: Ia03b4bad35d69aa292958782cd424f3df56dabbc
2022-04-19 05:17:25 -07:00