Commit Graph

41 Commits

Author SHA1 Message Date
Jeff Johnson
117ae69181 qcacmn: hal: Fix misspellings
Fix misspellings in hal/...

Change-Id: Icf033a647e6a15d46420d7102dc161b94fa7dd2c
CRs-Fixed: 3304685
2022-10-10 23:02:47 -07:00
Kenvish Butani
a16d867018 qcacmn: Separate GetFrameControl API's for LI chipsets
For 802.11 Fragmented frames, currently there is a
generic GetFrameControl API from RX TLV for all Li
Chipsets. As the offset for frame control in RX TLV
is different for QCN9000 and QCA8074V2, reading the
frame control with generic API gives wrong frame
control value. The Offset is different as the size
of RX_MSDU_START struct is 8DWORDS in QCA8074v2 while
it is 9DWORDS in QCA9000. In the reo reinject path
the destination queue descriptor address read from ring
descriptor address is Invalid

Fix is Separating out the GetFrameControl API from
generic API to Chip specific API. Also fix the reading
of queue descriptor address.

CRs-Fixed: 3280809
change-Id: Ifc5eca31b9b7e70c84ca455d56a58c27601cd51d
2022-09-26 10:48:59 -07:00
Sai Rupesh Chevuru
ceccc982e3 qcacmn: Get the peer meta data from msdu end tlv
In QCN9224 fetch the peer meta data from the msdu end tlv
instead of MPDU start

Change-Id: Icd9420cd83e06abe5e54e9e05cc8cbf8d8312ae1
CRs-Fixed: 3245626
2022-08-10 01:18:45 -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
Naman Padhiar
3cb1b64c60 qcacmn: Use a max of 5 WBM2SW rings for whunt failure
The maximum WBM2SW rings in whunt for MSL is 5 and
the same could be 4 in wlan code which will result
in wcov failure for MSL. Use a maximum of 5 WBM2SW
rings for HSP based on FW_SIM config flag to address
this failure.

Change-Id: I16770566710efeeea7acbb51f6710e7a996b5cac
CRs-Fixed: 3167050
2022-04-07 16:28:34 -07:00
Amit Mehta
d2199b7a99 qcacmn: Set default value for REO dest ctrl register
Currently in some case we are receiving non error packets on REO2TCL
ring, which is causing issue.

Fix is to set DEST_RING_MAPPING_0 to SW1 for REO dest ctrl
register, So that non error packets with reo_destination_indication
with 0x0 in the reo entrance ring will be routed to SW1 ring.

Change-Id: I67f78f35e7dba899943307902d99d0325a60498f
CRs-Fixed: 3150186
2022-03-17 07:25:12 -07:00
Jia Ding
d40b388d2f qcacmn: Mark first packet after wow wakeup
Add feature support to tag first packet that wakes up HOST from WoW.

rx_pkt_tlv.rx_msdu_end.reserved_1a field is used by TARGET to meet
such request.

Change-Id: I3d37e13e8cff49bc4f622d3070a19e4c4be56417
CRs-Fixed: 3137621
2022-03-03 07:22:05 -08:00
Wu Gao
a6d46ebc8b qcacmn: Populate additional params to CFR info for QCA6750
HAL changes to populate agc gain, CFO, rx_start_ts, mcs_rate and
gi_type to CFR info for QCA6750.

Change-Id: I164324b1e929399a8dacf88f3012970c65d5d653
CRs-Fixed: 3115256
2022-01-27 03:12:49 -08:00
Kai Chen
d93357ef5d qcacmn: Move CCE and flow hal implementation to per chip
Move CCE and flow hal implementation to per chip hal layer.

Change-Id: I95a37d8bab00cdecfd6e8ae9a724b8c5541b336e
2021-12-21 11:41:42 -08:00
Yeshwanth Sriram Guntuka
371d4ebd86 qcacmn: Increase the max WBM2SW rel rings for qca6750
Increase the max WBM2SW release rings for qca6750
when multiple tx ring pairs support is enabled.

Change-Id: Ifa3be25a7c9b7cb019165e76b3a71d3db9572334
CRs-Fixed: 3075392
2021-11-18 09:28:10 -08:00
Chaithanya Garrepalli
41fda10bc5 qcacmn: In WBM err process read peer_id from peer_meta_data
In WBM error processing read peer_id from peer_meta_data
instead of sw_peer_id.

This changes is needed because we need to process Rx packet
on ML peer. But in MLO case sw_peer_id field contains
link_peer_id where as peer_meta_data has ml_peer_id.

Change-Id: I3f469adfdf7efa88cb081e94fa9fe0c54c1fb078
2021-11-12 04:46:16 -08:00
Chaithanya Garrepalli
7ccb73b31f qcacmn: Add support for beryllium on WIN
Add support for split between lithium and beryllium
HAL files.
Add Wkk TLV support.

Change-Id: I7135e4061a4c3605d76c70c33320cbd533ea0c62
2021-08-13 12:04:12 -07:00
Devender Kumar
c182e1e3e9 qcacmn: Use sw_peer_id instead of ast_index to get peer
In order to support flow overide feature,
AST table has to be split between RxPCU and DDR.
With this split, RX monitor cannot make use of
ast_index to fetch peer as it is not from DDR.
So make use of sw_peer_id to fetch peer.
This sw_peer_id is derived from RX_MPDU_STAT_START_TLV

Change-Id: Ib2a003a2640fded3287c318d2ad59fd3127af9b6
CRs-fixed: 3004363
2021-08-12 08:29:37 -07:00
Chaithanya Garrepalli
f79a68f685 qcacmn: Fix lithium HAL generic APIs
HAL generic APIs which use HW definitons that
do not have same value across all lithium chipset
are moved to header files. So that these will be
compiled with appropriate header files

Change-Id: I6c167afa4212c5e884f5e18ff1ccb3bbbba8f5f5
2021-07-01 09:06:06 -07:00
Rakesh Pillai
47af4d320f qcacmn: Move to index based assignment for srng register offset
Currently the hardware srng register offset is statically
assigned to the handle. This can lead to incorrect index access
when targets (eg: wcn7850) is added which require additional
register offsets to be stored in the hw srng register offset table.

Move to the index based assignment of the srng register offset.

Change-Id: I8e38bdd0c28068029a0267fce706edf4378b9df8
CRs-Fixed: 2965081
2021-06-30 13:47:57 -07:00
Rakesh Pillai
59ea466ca4 qcacmn: Add HAL APIs for Lithium targets
Add hal soc API handlers for existing Lithium targets.

Change-Id: I2ca25c94702759eb8329eb24048c9f5732caa3cc
CRs-Fixed: 2891049
2021-06-05 15:10:50 -07:00
Mohit Khanna
4e6a7cf1bf qcacmn: Use function to attach HAL TX/RX ops
Assign th HAL TX/RX ops in a function instead of assining a structure
directly. This can be later extended to have default ops for a family of
chips and then override that with chip specific ops.

This also helps the case where a new hal_soc->ops needs to be added.
The new 'op' will need to be added to only a default ops initializer
(with assumption that it applies to all chips).

Change-Id: Iefa23d14110fa5252444fad89737a3b2b2fbab6f
CRs-Fixed: 2891049
2021-06-05 15:10:50 -07:00
Karthik Kantamneni
278a9d30ba qcacmn: Redirect bar frames to REO exception ring in QCA6750
Redirect bar frames to REO exception ring and handle as normal
data packets.

Change-Id: Ibaa14af5bfe7bfcecc4560fec5bae218d6df7e7d
CRs-Fixed: 2869449
2021-02-09 10:44:31 -08:00
Rakesh Pillai
783f811315 qcacmn: Send ring sel cfg to configure rx pkt tlvs offset
Currently the FW configures the mac with appropriate
offsets for rx pkt tlvs using the structure defined in
te FW and the host does not send the ring selction config
HTT message. This can create a problem when FW stops subscribing
to tlvs or changes its rx pkt tlvs offset.

Fix this by configuring the rx pkt tlv offsets via HTT
ring selection config message.

Change-Id: I1a2865f91b34dd7bda1af8651d7831097dac0bee
CRs-Fixed: 2860504
2021-01-29 00:04:19 -08:00
Dustin Newman
05bc154f2a qcacmn: hal: Initialize hal_hw_txrx_ops for 6750
Change hal_hw_txrx_ops struct to designated initializer syntax for
structs for 6750.

Change-Id: I6a6728eb9d5f7f9c3256a087726abd9a627fd14d
CRs-Fixed: 2837917
2021-01-11 04:06:41 -08:00
Karthik Kantamneni
081912efd0 qcacmn: Add API to get reo destination indication for QCA6750
Add hal_rx_msdu_get_reo_destination_indication API for QCA6750
target. Add NULL check to avoid possible null pointer dereference
for targets API is not supported.

Change-Id: I2c78e16a6796b0b09834cb91749244357f3de753
CRs-Fixed: 2793284
2020-10-10 11:41:39 -07:00
Saket Jha
a64da56134 qcacmn: Stop FISA if frame rings mismatch
If frames from the same FISA flow goes into different REO2SW rings, it
will result in an unexpected FISA behavior. This can happen if the
frames have been reinjected from FW offload module since FW will select
REO2SW1 ring. If the same flow frames hash to other REO2SW rings, then
the same flow UDP frames will do to different rings.
Reo_destination_indication of 6 indicates if the frame has been
reinjected from FW. If so, then continue to deliver the packet without
FISA.

Change-Id: I14a17a10d04909adfb30557d58beb1610e59bf70
CRs-Fixed: 2790292
2020-10-06 23:57:02 -07:00
Manikanta Pubbisetty
3433cf4974 qcacmn: add HAL APIs to configure FSE in CMEM
Adding HAL APIs for adding and reading flow search entries(FSEs)
in CMEM.

Change-Id: If8282c8be38a85e2344bb55ffa4e63a7577daa20
CRs-Fixed: 2771198
2020-09-17 10:18:26 -07:00
Manikanta Pubbisetty
1a4e3a96c7 qcacmn: add APIs to access CMEM
Adding write/read APIs for accessing the CMEM.

Currently in QCA6750, UMAC and CE windows are statically mapped,
a new static window for CMEM is added for CMEM transactions.

Change-Id: Ie10b33a6f468c6e4db314ea85856414962ef29e3
CRs-Fixed: 2771193
2020-09-17 10:18:23 -07:00
Yeshwanth Sriram Guntuka
199e1831ab qcacmn: Rate limit rxdma decrypt error related log
Rxdma decrypt errors are observed when the association
is in progress as AP sends encrypted data packets to
DUT-STA. As part of the rxdma error handling, excessive
prints are logged to console resulting in an assert.

Fix is to rate limit rxdma decrypt error related log

Change-Id: I2ef28c635d77e3acafd067b921cdb13c277756c7
CRs-Fixed: 2725335
2020-07-07 14:16:50 -07:00
Sridhar Selvaraj
3ae6b5c3fe qcacmn: Update REO Remap config API as platform specific
Update REO Remap config API as platform specific

Change-Id: I6a38b87e9181e8bc939e49e3eb55fcd6cace626d
2020-06-12 19:29:39 -07:00
syed touqeer pasha
c6d4cbfd1a qcacmn: qcn9000 changes in rx flow identification
Rx flow indentification changes to provide
support on Qcn9000 target

Change-Id: I1b7ef8c93e38e753cb7014dca68148a4174daa82
2020-06-10 18:13:46 -07:00
Saket Jha
d30eab103c qcacmn: Create monitor mode spinlock and add null check
Due to changes in datapath init/deinit path, mon_lock spinlock was not
getting created. Create mon_lock spinlock during
dp_rx_pdev_mon_cmn_desc_pool_init.

Add null check to validate rx_tlv_header before calling
hal_rx_mpdu_start_tlv_tag_valid.

Change-Id: I41c781de29f2c8c05ec1bfa90f9c8f742f2539bf
CRs-Fixed: 2693687
2020-05-29 14:50:54 -07:00
Alok Kumar
37307abc04 qcacmn: Add FISA support for qca6750
Add FISA feature support for chip 6750

Change-Id: I0ca082b7b4ca71e2b2d18678a0ce10b7b46bbc28
CRs-Fixed: 2667283
2020-05-15 06:56:15 -07:00
Radha Krishna Simha Jiguru
8ca2521ac8 qcacmn: Get Rx TLV offsets from structure
Size of the TLVs have changed across generation of chipsets
Offset values need to be configured into DMA register for preheader DMA
Added APIs to get offsets of each TLV based on chip type

Change-Id: Ic011332cbf3a1017f324f246e47c9e2c91441c70
2020-04-22 14:03:08 -07:00
Jinwei Chen
b3e587db52 qcacmn: Support RX 2K jump/OOR frame handling from REO2TCL ring
Support RX 2K jump/OOR frame handling from REO2TCL ring.
(a) configure REO error destination ring register to route 2K jump
/OOR frame to REO2TCL ring.
(b) for 2K jump RX frame, only accept ARP frame and drop others,
meanwhile, send delba action frame to remote peer once receive first
2K jump data.
(c) for OOR RX frame, accept ARP/EAPOL/DHCP/IPV6_DHCP frame, otherwise
drop it.

Change-Id: I7cb33279a8ba543686da4eba547e40f86813e057
CRs-Fixed: 2631949
2020-03-24 19:58:16 -07:00
Mainak Sen
aceafadc2e qcacmn: WBM msdu continuation for SG in QCN9000
In QCN9000, wbm release ring has msdu continuation bit
support for invld peer MPDUs. Host needs to form SG
buffer for packets with msdu continuation bit set

Change-Id: Ica03c78068d32d2c8dc609b9a50298b91dd48c0a
2020-03-23 16:07:47 -07:00
Alok Kumar
32de2fe166 qcacmn: Fix compilation and update SHADOW REG OFFSET for qca6750
For qca6750, update the SHADOW REGISTER OFFSET value and
fix the compilation issue.

Change-Id: Ic4b44c1c40e62ddcc50c0a66d37c0663a70b5c54
CRs-Fixed: 2633044
2020-03-04 07:30:44 -08:00
Ankit Kumar
2bf9b7a18a qcacmn: Initialize command/credit ring for qca8074 & qcn9000
Initialize command/credit ring for qca8074 & qcn9000.

Change-Id: I28087dd4d8f4afddd954c764c2e85da43eaf78f1
CRs-fixed: 2562649
2020-03-01 05:25:24 -08:00
Alok Kumar
7271755f47 qcacmn: Add static window support for UMAC and CE access in 6750
Use static window for accessing UMAC and CE register in qca6750. For
UMAC and CE register access, separate static window is mapped. Host
accesses these registers using relative offset to window address.

Change-Id: I7940336579553f05a11f1379f635689d08508c56
CRs-Fixed: 2617684
2020-02-15 17:42:01 -08:00
Alok Kumar
281aa22857 qcacmn: Update CE registers and CE IRQ for qca6750
Update CE registers offset during hal srng configuration
and configure CE IRQ for qcac6750.

Change-Id: I4fd3d37783361f0029c7ef80e32425f8790d1250
CRs-Fixed: 2617699
2020-02-14 20:20:07 -08:00
Manjunathappa Prakash
5fb8965b74 qcacmn: Fix HAL_RX_MSDU_END_DA_IDX_GET macro compilation failure
Move HAL_RX_MSDU_END_DA_IDX_GET macros to chip specific header file.
Fixing compilation failure for 6490 and 6750.
hal_rx_msdu_packet_metadata_get_generic need not be chip specific,
macros defining the function are already chip specific.

Change-Id: I940a289662bdeddfbf99fae2a80d7796334832e7
CRs-Fixed: 2595314
2020-02-05 15:32:48 -08:00
syed touqeer pasha
6997a37a1e qcacmn: Extract msdu end TLV information at once during Rx fast path
Rather than extracting msdu end pkt tlv information per field basis
during fast data path, extract msdu end pkt tlv information at once
and store in local structure.

Change-Id: I0877ba4f824d480cc0851c72090f010852d0d203
2020-02-05 02:28:41 -08:00
Kai Chen
085ce4026b qcacmn: fix the issue for block ack/ack for tx capture mode
fix the issue for block ack/ack for tx capture mode.
1. Hanndle BAR frame.
2. set rate for ACK frame.
3. Check block ack session and use block ack if block
ack session is established.
4. no ACK for broadcast probe request.
5. not ack if the ack policy is set to no ack in qos control.

Change-Id: I4f22c1c976334978fb971b42319fb3a6e43a00c2
2020-01-27 11:52:36 -08:00
Alok Kumar
9bb30c19ed qcacmn: Add callback to get WBM internal error in qca6750
Add target specific callback to read the WBM internal error
for qca6750.

Change-Id: I79960a972d024ead33903415b4094561a22ad99b
CRs-Fixed: 2607116
2020-01-25 14:08:15 -08:00
Rakesh Pillai
984343c2ea qcacmn: HAL layer changes for Moselle
Add the HAL layer APIs for supporting Moselle

CRs-Fixed: 2597328
Change-Id: Idc59af4ee093e702da95aa704fd3abd76ae5834f
2020-01-18 04:45:14 -08:00