Grafico dei commit

87 Commit

Autore SHA1 Messaggio Data
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
Karunakar Dasineni
f2d6649390 qcacmn: Add HAL SW frame group Id for RTS
Add HAL SW frame group Id definition for RTS

Change-Id: Ic750d3e3f7123c17c6939b69200966e45bf3164a
2020-02-07 21:25:07 -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
Shashikala Prabhu
03a9f5b19c qcacmn: Add framework to configure varying data/monitor buf size
Add a framework to configure varying buffer size for both data and monitor
buffers.
For example, with this framework, the user can configure 2K SKB for Data
buffers, monitor status rings, monitor descriptor rings, monitor
destination rings and 4K SKB for monitor buffers through compile time.

Change-Id: I212d04ff6907e71e9c80b69834aa07ecc6db4d2e
CRs-Fixed: 2604646
2020-01-29 18:08:33 -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
Padma Raghunathan
5cd2e56349 qcacmn: CFR: Process PPDU status TLVs and extract CFR information
Channel Frequency Response(CFR) feature requires PPDU information
for correlation with CFR data. Host subscribes for the relevant PPDU
status TLVs via the Host RX monitor status ring. During monitor status
ring reap, all information needed for CFR correlation is accumulated
in a HAL PPDU structure and delivered to WDI event subscribers.

Change-Id: I3662b60375cb8886447a2fba3efead6a1ef3a98d
CRs-Fixed: 2593408
2020-01-09 10:34:35 +05:30
Prathyusha Guduri
d32c59edb5 qcacmn: Enable HAL_IS_DECAP_FORMAT_RAW for all profiles
HAL_IS_DECAP_FORMAT_RAW was only defined for low memory profiles. Enable
it on all profiles

Change-Id: I064109e6756b25252bedf96065f59ad6ed360bcc
2020-01-02 06:44:38 -08:00
Aniruddha Paul
33fce952a9 qcacmn: Fix the next link descriptor read issue
Link descriptor were getting freed by the pointer
of the previous freed link descriptor. This patch
fixes by copying the address of the current in a
local descriptor info and using it to free the
current.

Change-Id: I95e137ba5b1f0ad21b0e6fb39f6671e1d5b65ba6
CRs-Fixed: 2577624
2019-12-30 05:53:14 -08:00
Kai Chen
011b6c668b qcacmn: add block ack and ack frame for tx capture feature
Block ack and ack frame is composed and sent to up
layer after a unicast packet to AP is received for
tx capture feature.

Change-Id: I4b6bb35fa093432539d15d09a93f85a8ec700b34
2019-12-23 05:50:44 -08:00
Venkata Sharath Chandra Manchala
36fd40ab6e qcacmn: Add hal_rx_get_rx_sequence API
Add hal_rx_get_rx_sequence API to retrieve
rx sequence value based on the chipset.

Change-Id: I8377b96dfe04e9695a183482d9fcc4a804f845e0
CRs-Fixed: 2522133
2019-10-17 15:12:59 -07:00
Venkata Sharath Chandra Manchala
5c5d409000 qcacmn: Add hal_rx_tlv_get_tcp_chksum API
Implement hal_rx_tlv_get_tcp_chksum API
to retrieve tcp_udp_checksum value
based on the chipset.

Change-Id: Ifab970f10af06f8c0cdbd14d57cb66b49bae1648
CRs-Fixed: 2522133
2019-10-17 15:12:02 -07:00
Venkata Sharath Chandra Manchala
1059fae62c qcacmn: Add hal_rx_msdu_get_flow_params chip specific
Implement hal_rx_msdu_get_flow_params API
per chipset as the macro
to retrieve the flow parameters is
chipset dependent.

Change-Id: I6ef83232ebdf7497871a7fc588e082d14cdc9e75
CRs-Fixed: 2522133
2019-10-17 15:11:50 -07:00
Venkata Sharath Chandra Manchala
8fc894afc8 qcacmn: Add hal_rx_msdu_cce_metadata_get API
Implement hal_rx_msdu_cce_metadata API per
chipset as the macro to retrieve the cce_metadata
value is chipset dependent.

Change-Id: Icd87d4ac32be78d69b24da106381a7669c86ada6
CRs-Fixed: 2522133
2019-10-17 15:11:41 -07:00
Venkata Sharath Chandra Manchala
905312efaa qcacmn: Add hal_rx_msdu_fse_metadata_get API
Implement hal_rx_msdu_fse_metadata API per
chipset as the macro to retrieve the fse_metadata
value is chipset dependent.

Change-Id: Iae7f532460b5203af2f95c504a6941c0b18b665e
CRs-Fixed: 2522133
2019-10-17 15:11:29 -07:00
Venkata Sharath Chandra Manchala
b5ec9d28ee qcacmn: Add hal_rx_msdu_flow_idx_timeout API
Implement hal_rx_msdu_flow_idx_timeout API
per chipset as the macro
to retrieve the flow_idx_timeout value is
chipset dependent.

Change-Id: I03030e3763b3c4a9099699a2d24b8110961610cf
CRs-Fixed: 2522133
2019-10-17 15:11:16 -07:00
Venkata Sharath Chandra Manchala
b9a8536661 qcacmn: Add hal_rx_msdu_flow_idx_invalid API
Implement hal_rx_msdu_flow_idx_invalid API
per chipset as the macro
to retrieve the flow_idx_invalid value is
chipset dependent.

Change-Id: I5b8622eb896456b7388016a16657048d0da4e970
CRs-Fixed: 2522133
2019-10-17 15:11:03 -07:00
Venkata Sharath Chandra Manchala
c9a4e14344 qcacmn: Add hal_rx_msdu_flow_idx_get API
Implement hal_rx_msdu_flow_idx_get API
per chipset as the macro
to retrieve the flow_idx value is
chipset dependent.

Change-Id: I75131d7c048f5b67489ed25fbd52bfcf01bab782
CRs-Fixed: 2522133
2019-10-17 15:10:51 -07:00
Venkata Sharath Chandra Manchala
222b2539cb qcacmn: Add more HAL APIs in hal_api_mon.h
Add the following macros:
1. HAL_REO_CONFIG
2. HAL_RX_MSDU_DESC_INFO_GET
3. HAL_RX_LINK_DESC_MSDU0_PTR

Add the relevant function pointers to
retrieve the descriptor info from the
above mentioned macros based on a
given chipset.

Change-Id: If44ae3d91397f1b1b0c36a49ce56a2c5e719434e
CRs-Fixed: 2522133
2019-10-17 15:10:39 -07:00
Venkata Sharath Chandra Manchala
b7d2df16b5 qcacmn: Add HAL APIs in hal_generic_api.h
Add the following macros:
1. HAL_RX_GET_FC_VALID
2. HAL_RX_GET_TO_DS_FLAG
3. HAL_RX_GET_MAC_ADDR2_VALID
4. HAL_RX_GET_FILTER_CATEGORY
5. HAL_RX_GET_PPDU_ID

Also add function pointers to
retrieve the flags from the above
macros.
Change-Id: I334b198588ceba77cd30bdde7ebc500cdbe18358
CRs-Fixed: 2522133
2019-10-17 15:10:27 -07:00
Venkata Sharath Chandra Manchala
8227240793 qcacmn: Add HAL macros in dp_rx_defrag.c
Add the following HAL macros:
1. HAL_RX_MSDU0_BUFFER_ADDR_LSB
2. HAL_RX_MSDU_DESC_INFO_PTR_GET
3. HAL_ENT_MPDU_DESC_INFO
4. HAL_DST_MPDU_DESC_INFO

Add relevant function pointers to retrieve
descriptor info from the macros based
on chipsets.

Change-Id: I99ce7566a668180c7849eedea915b6f23a8dbf35
CRs-Fixed: 2522133
2019-10-17 15:10:16 -07:00
Venkata Sharath Chandra Manchala
685045eb9c qcacmn: Add hal_rx_msdu_end_sa_sw_peer_id_get API
Implement hal_rx_msdu_end_sa_sw_peer_id API
based on the chipset as
the macro to retrieve sa_sw_peer_id value is
chipset dependent.

Change-Id: I2efd1f851539bbffc8f75c7662045c1f4a3c4469
CRs-Fixed: 2522133
2019-10-17 15:09:53 -07:00
Venkata Sharath Chandra Manchala
56022cb6e1 qcacmn: Add hal_rx_mpdu_start_mpdu_qos_control_valid_get API
Implement hal_rx_mpdu_start_mpdu_qos_control_valid
API based on the chipset as
the macro to retrieve mpdu_qos_control value is
chipset dependent.

Change-Id: I61449ff5afc958f1a1f93013b0c5ab56d38cc833
CRs-Fixed: 2522133
2019-10-17 15:09:41 -07:00
Venkata Sharath Chandra Manchala
84d5092701 qcacmn: Add hal_rx_hw_desc_get_ppduid_get API
Implement hal_rx_hw_desc_get_ppduid API based
on the chipset as the macro to retrieve
ppduid value is chipset dependent.

Change-Id: I7d3457d731ea486f04367f98f9f18d3f1c0fcfd7
CRs-Fixed: 2522133
2019-10-17 15:09:23 -07:00
Venkata Sharath Chandra Manchala
8513048ac9 qcacmn: Add hal_rx_tid_get API
Implement hal_rx_tid_get API based on
the chipset as the macro to retrieve
tid value is chipset dependent.

Change-Id: I37eab3f3c1c2bbba6094b9ddb24d72712b819f73
CRs-Fixed: 2522133
2019-10-17 15:09:13 -07:00
Venkata Sharath Chandra Manchala
5ddc518b2e qcacmn: Add hal_rx_is_unicast API
Implement hal_rx_is_unicase API based
on the chipset as the macro to retrieve
is_unicast bit value is chipset dependent.

Change-Id: I38807f478c295309adf2a07ce9010b1bc04c734e
CRs-Fixed: 2522133
2019-10-17 15:09:04 -07:00
Venkata Sharath Chandra Manchala
68d6f0d585 qcacmn: Add hal_rx_get_mpdu_sequence_control_valid API
Implement hal_rx_get_mpdu_sequence_control_valid
API based on the chipset as
the macro to retrieve sequence control valid
value is chipset dependent.

Change-Id: I01a006094d0330060e9ff1a91200c48c2426f38d
CRs-Fixed: 2522133
2019-10-17 15:08:54 -07:00
Venkata Sharath Chandra Manchala
aa7628361e qcacmn: Add hal_rx_mpdu_get_addr4 API
Implement hal_rx_mpdu_get_addr4 API based
on the chipset as the macro to retrieve
addr4 value is chipset dependent.

Change-Id: Ie35d01de1619a8ab540bb1b2019a15b436efb7d4
CRs-Fixed: 2522133
2019-10-17 15:08:45 -07:00
Venkata Sharath Chandra Manchala
7c868259ff qcacmn: Add hal_rx_mpdu_get_addr3 API
Implement hal_rx_mpdu_get_addr3 API
based on the chipset as
the macro to retrieve addr3 value is
chipset dependent.

Change-Id: I3983599b656e82170de5905c08daee3ec164e7a0
CRs-Fixed: 2522133
2019-10-17 15:08:38 -07:00
Venkata Sharath Chandra Manchala
a81a2fed42 qcacmn: Add hal_rx_mpdu_get_addr2 API
Implement hal_rx_mpdu_get_addr2 API
based on the chipset as
the macro to retrieve addr2 value is
chipset dependent.

Change-Id: I4026db892d4f2f41db72c50f780ba898b8a17fa7
CRs-Fixed: 2522133
2019-10-17 15:08:31 -07:00
Venkata Sharath Chandra Manchala
e3ae3193f9 qcacmn: Add hal_rx_mpdu_get_addr1 API
Implement hal_rx_mpdu_get_addr1 API
based on the chipset as the macro to
retrieve addr1 value is
chipset dependent.

Change-Id: I7ed88f2243d397c9d605a08d3b93e17f0004c63d
CRs-Fixed: 2522133
2019-10-17 15:08:22 -07:00
Venkata Sharath Chandra Manchala
25ba7b8c4f qcacmn: Add hal_rx_get_mpdu_frame_control_valid API
Implement hal_rx_get_mpdu_frame_control_valid API
based on the chipset as the macro to retrieve
frame control valid value is chipset dependent.

Change-Id: I49d16ae44b2e9567ff746d2088058f0c1025ea40
CRs-Fixed: 2522133
2019-10-17 15:08:12 -07:00