Grafik Komit

117 Melakukan

Penulis SHA1 Pesan Tanggal
Jeff Johnson
f8a610f679 qcacmn: Fix hal_rx.h documentation
The kernel-doc script identified a multitude of documentation issues
in hal_rx.h, so fix them.

Change-Id: I36913abcfea5504b1fdea2afb5c71810b08e4da6
CRs-Fixed: 3352421
2022-12-17 21:25:44 -08:00
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
Sai Rupesh Chevuru
6aef607629 qcacmn: htt support for compact tlv feature
Adding htt support for compact tlv feature

Change-Id: If45b5b32c4cef482cb6c54b5f2919b56384a8a93
CRs-Fixed: 3293927
2022-10-09 20:42:33 -07:00
Rakesh Pillai
27f5c5e7b8 qcacmn: Fix mpdu re-stitch failure for fragmented wifi frames
When the length of a 802.11 frame is more than the
size of the posted receive buffers, it is split across
multiple buffers, which have to be accumulated before
submitting to network stack.

For all-but-last buffer which are used for the above
mentioned large 802.11 frame, the MSDU_CONTINUATION
flag will be set indicating that remaining data of the
same msdu has been DMA'ed to the next buffer.

The current implementation in monitor-1.0 works for
legacy chipsets, where MSDU_START tlv is available and
hence the aforementioned information was available in
all the buffers containing the large 802.11 frame.

For kiwi target, there is no MSDU_START tlv, and hence
a lot of information eg: mpdu_len_err, decap_format and
l2_hdr_offset are not available in the buffers where the
msdu_continuation flag is set. This leads to an attempt
of mpdu_restitch using incorrect data from tlv, and hence
the mpdu_restitch fails for such large 802.11 frame.

Fix this issue for kiwi target, by gathering all these
information which are available in the last buffer and
are used to process/accumulate the entire 802.11 frame.

Change-Id: I1c4fc9fd574c1c5fabc845407aa6f2d990c60906
CRs-Fixed: 3261494
2022-10-09 06:51:07 -07:00
Tallapragada Kalyan
27da15777b qcacmn: initialize BE specific HAL API callbacks
certain BE specific HAL APIs were only initialized for
KIWI chipset but not for WKK. Now moved all these APIs
under beryllium generic initialization.

These APIs are mainly used in de-frag pkt handling.

CRs-Fixed: 3294784
Change-Id: I6611f1b7ef80b432d24a490ba65880dd55539137
2022-09-26 02:04:24 -07:00
Amit Mehta
163dd20054 qcacmn: Add API to read tsf time
Add API to read tsf time from scratch registers.

Change-Id: If736c31f9ae522a9f853e7b83b6b8a61cad990da
CRs-Fixed: 3287544
2022-09-13 10:51:38 -07:00
Pavankumar Nandeshwar
a615488cf4 qcacmn: Hal changes for Umac post reset at host
Hal layer changes to handle Umac post reset
and post reset complete events from firmware.

Change-Id: Ib25427930aab25650731c87b38e2ef7e47ae98d9
CRs-Fixed: 3267222
2022-08-21 00:37:53 -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
jinbaoliu
5731d1c389 qcacmn: Fix the crash when execute hal_rx_tlv_l3_type_get()
This function fails to register in the 6750 platform.
Since some old chips do not have l3 type field, the
callback function cannot be registered, so this change
solves it by recognizing whether the callback is NULL.
If it is NULL, then return an invalid vallue: 0xFFFF.

Change-Id: I47c8df5e54eeac9489010e45057e44eccdb2bf22
CRs-Fixed: 3258200
2022-08-08 03:47:15 -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
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
sumedh baikady
52181cceb1 qcacmn: Fix Reo qref issues
1. Since peer id is reused for reconnection in MLO case,
old entries for queue desc addr is cleared. Clear the reo
internal storage and reset it back on client connection.

2. Send Qref feature WMI cmd to FW to enable the feature.

Change-Id: I6705ce121c8c25d9a2ace039dab21312fa5ea4b1
CRs-Fixed: 3156642
2022-04-12 06:31:36 -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
Pavankumar Nandeshwar
70bd47772e qcacmn: Sanity check for phy addr in cb against ring_desc
Check phy addr in cb against ring_desc for sanity
in wbm rx path

Change-Id: I40dd2949993129d1da548da45160f9eace094bff
2022-02-18 15:32:02 -08:00
Sumedh Baikady
e4d9b0c2d7 qcacmn: REO queue ref enhancement for Waikiki
In WIN BE chipsets, replace the REO tid
queue programming in FW via WMI with writing to a
Host managed table shared by HW and SW. REO HW will
pick the tid queue address from the table indexed by
peer id and tid number.

Change-Id: I8107ca5116425538329b11ae3519f02b32573bac
2022-02-02 12:06:29 -08:00
Sai Rupesh Chevuru
6bbb8971e2 qcacmn: Fix for ping issue in NAWDS Learning repeater mode
In qcn9224, NAWDS Learning repeater mode will receive packets
with reason as HAL_RXDMA_UNAUTHORIZED_WDS.

Change-Id: I6fe8428a5f8e2bac0e1db45b87169db0bd4cc271
2021-12-30 03:23:12 -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
Ananya Gupta
e5a33cd5b6 qcacmn: Fix reo reinjection path
Add 2 hal soc ops, hal_msdu_desc_info_set and
hal_mpdu_desc_info_se for berilliyum datapath.
Attach hal_rx_msdu_ext_desc_info_get_ptr_be to its function
pointer.
Get reo queue descriptor address as a 5 byte value as in
beryllium datapath it is being obtained from rx packet tlv.

Change-Id: Ia58597384e1a3d5eec493b865a88bab4f209502d
CRs-Fixed: 3084532
2021-12-14 21:22:54 -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
Ananya Gupta
122bc19864 qcacmn: Fix REO reinjection path in hamilton DP
Add HAL APIs to fix REO reinjection path in hamilton DP

Change-Id: I73c6ec0aeb2f6d4bc72b366e22e9bc826f852426
CRs-Fixed: 3058549
2021-10-27 07:05:06 -07:00
Sai Rupesh Chevuru
ba3f9c04c8 qcacmn: Update TID value in skb priority from the MPDU buffer
Update TID value in skb priority from the MPDU buffer.

Change-Id: I707190f0c3095b4c47bd4b3cffd4a94f5952939c
CRs-Fixed: 3037067
2021-10-21 02:33:44 -07:00
Chaithanya Garrepalli
3c3e5709ac qcacmn: Increse num TX rings for QCN9224
This change includes below
1) Changes needed to increase Tx rings to 4
2) Use WBM2SW4 ring for rx error in QCN9224
3) memset srng at alloc to avoid populating RBM_id
in per packet path and enable implicit RBM

Change-Id: Icbd5ac2378273b8f3c6adc41c611e29551fff22f
2021-10-13 13:12:19 -07:00
Pavankumar Nandeshwar
851b1f68c0 qcacmn: enable MEC support for Beryllium
The multicast echo check feature is moved to hardware in
Beryllium. Enable this hardware feature and also disable
the MEC handing code for Beryllium in the host.

Change-Id: I86d319963191f3ed77aba16dcccbc659906edd9f
2021-10-01 15:18:25 -07:00
Pavankumar Nandeshwar
26c6cd1397 qcacmn: Enable intra-bss in Waikiki
In Beryllium the HW does the ast lookup and match
and sets the intra-bss bit in the msdu_desc_info
structure of reo_destination ring and WBM Rx release ring.

So, change the Beryllium code to make use of this
hardware assistance for intra-bss.

Change-Id: Ic7c89efc741fefe35603082309204fbe3c9a97c7
2021-09-24 18:28:07 -07:00
Chaithanya Garrepalli
d7637a443d qcacmn: Add handling for rxdma_rx_flush and invalid psh_rsn
In WBM error path, add handling for packets received with
rxdma_psh_rsn as rxdma_rx_flush. Also add assert for packets
received with an invalid push reason.

Change-Id: I4e445d52f00bbbdca358225aef488da0e8dccaa7
CRs-Fixed: 2978262
2021-08-03 04:36:34 -07:00
Rakesh Pillai
5d44eac10a qcacmn: Enable PN check for 2K-jump and OOR frames
Currently the EAPOL/ARP/DHCP frames arriving as 2K-jump
or out-of-order frmaes are being delivered to the network
stack, without checking for the packet-number sequence.

WCN7850 has hardware support to provide the packet number
of the previous successful re-ordered packet from hardware.
Use this feature to check if the packet-number are in proper
sequence for these EAPOL/ARP/DHCP packets arriving as 2k-jump
or out-of-order packets before submitting it to the network
stack.

Change-Id: I1078452afce4bc00b2509436295e5bd80000feb4
CRs-Fixed: 2965086
2021-06-30 13:48:31 -07:00
nobelj
25acb759bf qcacmn: Fixes to enable LI & BE in a build
Changes to build Lithium and Beryllium together.
This is needed for WIN

Change-Id: I74c86803ea99fb17d1f73e8b9c4e7cf59751a707
2021-06-07 01:51:15 -07:00
Mohit Khanna
f3e19b41d3 qcacmn: HAL Changes for RX packet capture
Add HAL apis for populate RX packet capture params.

CRs-Fixed: 2891049
Change-Id: I0befd3001a40fd286704699f4ec682f7c390fbda
2021-06-07 01:51:15 -07:00
Rakesh Pillai
5d289aea93 qcacmn: HAL RX API changes for Beryllium
Add HAL RX API changes for WCN7850.

Change-Id: Ia370b712253b4bb62c7ca3a23633ce262213cb13
CRs-Fixed: 2891049
2021-06-05 15:10:50 -07:00
Yeshwanth Sriram Guntuka
69e696c423 qcacmn: Reset the inv bit in ring desc cookie for jumbo pkts
When a msdu scattered across multiple nbufs is received
in REO2SW ring and the remaining nbufs are not yet
available in the ring, loop in dp_rx_process is exited
without resetting the invalid bit in the ring desc cookie.
This will result in an incorrect assertion failure when
the same entry is processed the next time.

Fix is to reset the invalid bit in ring desc cookie
when the loop is exited in the above msdu scattered
scenario.

Change-Id: Ie5cfa1fb8ea1db4b7a0a4837545ecbfdfbb8719a
CRs-Fixed: 2916296
2021-04-08 02:50:56 -07:00
Himanshu Batra
ec2e7778ea qcacmn: Modify logs for QDF_MODULE_ID_CDP
Use macros like dp_cdp_debug, dp_cdp_err, dp_cdp_info to
print logs for QDF_MODULE_ID_CDP

Change-Id: I550eefa82c3417b8bf83378d4a9c6f382098fea6
CRs-Fixed: 2855937
2021-01-30 00:51:20 -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
Saket Jha
af0f724da2 qcacmn: Add support to handle BAR frames in host
Due to recent FW changes not filtering out BAR frames, redirect these
frames to REO exception ring and handle as normal data packets.

Change-Id: I4540929fddab14de57a23f6364fc916a70057cbe
CRs-Fixed: 2795499
2020-11-13 13:09:14 -08:00
Jinwei Chen
56f94da675 qcacmn: Add reo destination indication info to skb
Get reo destination indication from REO2SW ring descriptor,
store it to qdf_nbuf_cb of skb.

Change-Id: I5a4c504b2550229a77a435b1f5ddb78c4abe51aa
CRs-Fixed: 2809080
2020-11-01 23:14:06 -08: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
Shivani Soni
f1392936e6 qcacmn: Reserve 128 bytes headroom in monitor status buffer
Reserve 128 bytes headroom for monitor status buffer
to accomadate feature specific radiotap header or any other info
in the headroom.

CRs-Fixed: 2775118
Change-Id: I2b1aba26e565b58c48a2e24ad17965aacd6b4526
2020-09-18 10:38:14 -07:00
Debasis Das
59d63401a5 qcacmn: Use next link_desc instead of msdu_count
MSDU count is not reliable in all cases.Hence it is better
to check whether next_link_desc is valid or not and then
free the MSDUs in the next descriptor and subsequently
release both the current and next link descriptor back to HW.

Change-Id: Ie5ea3be547f9aed6673293221f6b47661cd92cce
2020-09-11 11:50:20 -07:00
Shivani Soni
c4c0a179f6 qcacmn: Monitor Status ring memory optimization
Memory optimization of monitor status ring by allocating buffers during
replenish using alloc_skb (linux API).
It creates buffer of required size rather than 4k size(dev_alloc_skb)

Change-Id: I3ae5e403de28c4570f8ac3b50d3ca878a9e4b2f9
CRs-Fixed: 2733931
2020-08-12 06:42:13 -07:00
Ankit Kumar
1f948cbb6b qcacmn: Process mon dest buffer via nr_frag
Process mon destination buffer via nr_frags
if RX_MON_MEM_FRAG is enabled.

Change-Id: If49132b129e01f6a248544134ac9d9457aa2072d
CRs-Fixed: 2741789
2020-08-11 16:08:03 -07:00
Harsh Kumar Bijlani
cc9f9c7c1f qcacmn: VHT/HE info in radiotap header of mgmt & control frames
In monitor mode, radiotap header contains VHT/HE information in management
and control frames after association of STA to AP.For this,reset of
ppdu_info is required before processing of ppdu in order to avoid reuse
of ppdu_info.

Change-Id: Ia36ec2664f79d645ff76db016f986dfb92ec8bbd
CRs-Fixed: 2734804
2020-08-02 04:57:31 -07:00
Yeshwanth Sriram Guntuka
8007762d6a qcacmn: Set invalid bit in cookie for exception ring descriptor
On returning the msdu link descriptor to HW via WBM
release ring, the rx exception ring contents are not
zeroed. This could result in host reading stale ring
descriptor content in the scenario when HP is updated
even before the latest values are reflected in the ring
descriptor.

Fix is to set invalid bit in cookie for exception ring
descriptor and add cookie sanity check.

Change-Id: I01a294c92b260ebe8e584ef20e9550b1febec913
CRs-Fixed: 2730759
2020-07-22 03:21:44 -07:00
Rakesh Pillai
28f1bf3f4e qcacmn: Invalidate ring desc cookie after processing
Currently all the rx ring descriptor contents are left
intact even after these entries are processed. This can,
at times, lead to stale entries being processed, if the
head pointer of any ring is updated before the updated
contents of the ring descriptor gets reflected in the memory.

This can lead to scenarios where the host driver reads a
stale value of sw_cookie, and free/unmap a currently in-use
buffer, thereby leading to the hardware accessing unmapped
memory region.

The sw_cookie is the integral part of al the rx ring
processing. Hence we always mark the sw_cookie as invalid
after dequeuing an entry from the REO2SW ring. Every time
we check for the validity of the sw_cookie before we try to
process an entry from REO2SW ring. if the invalid bit in the
sw_cookie is set, we just skip this entry and move on to the
next entry in the ring.

Change-Id: I0e78fa662b8ba33e64687a4dee4d1a5875ddb4bf
CRs-Fixed: 2730718
2020-07-18 00:00:04 -07:00
Nisha Menon
a24579c66f qcacmn: Remove unnecessary msdu count check in mdpu desc
Remove uncessary msdu count check against msdu count in
mpdu desc info while processing REO Rx err pkts.
As per h/w team msdu count can be obtained from msdu link
desc instead of mpdu desc info.
SOC level Rx err stat rx.err.msdu_count_mismatch is
incremented to log this condition.

Change-Id: I4f7d2df7335778f2f2d28e542da17fc7f6970009
CRs-Fixed: 2729693
2020-07-11 15:08:42 -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
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
Amit Shukla
fc8337d5de qcacmn: Add support for noACK frames
Intercept monitor destination path for NDPA frames,
use it to generate noack frames for tx capture.

Change-Id: Ia54196bd84729a7863954b6deec7e02b52f23556
CRs-Fixed: 2605672
2020-02-28 00:20:34 -08:00
Amir Patel
b8e9bcdf4c qcacmn: Read ppdu_id from reo_entrance ring
For qcn9000, As part HW enhancements, PPDU_ID is sent
in reo_entrance_ring descriptor instead of RX_MPDU_START
tlv. Add support to read ppdu id from descriptor.
Modify existing hal API hal_rx_hw_desc_get_ppduid_get ()
arguments to pass RxDMA ring HW descriptor.

Usage:
 a. Use hal_rx_hw_desc_get_ppduid_get () -
    to get ppdu id from rx_tlv_hdr or hw descriptor based on target.
    for qcn9000, this API gets ppdu_id from HW descriptor,
    for other platforms, gets ppdu_id from rx_tv_hdr
 b. Use hal_rx_get_ppdu_id () - to get ppdu_id from rx_tlv_hdr

Change-Id: I5838227c12cde50cbb2a9da7a0d8056b8b9b7ef5
2020-02-13 05:54:15 -08:00
Venkata Sharath Chandra Manchala
d2ceaf472c qcacmn: Add hal macros for fisa assist
Add 6490 chip specific HAL macros to extract FISA assist from TLV header.

Change-Id: I269431b2708f07b10e7e02715d8940fea27a66f6
CRs-Fixed: 2599917
2020-02-12 11:58:49 -08:00