Gráfico de commits

342 Commits

Autor SHA1 Mensaje Fecha
aloksing
c60b9619a3 qcacmn: Conditionally compile monitor related features and issue fixes
PATCH[7/7]:
This patch consists following changes:
 -Conditionally compile all monitor destination ring related code
  Macro used QCA_MONITOR_PKT_SUPPORT
 -Add QCA_ENHANCED_STATS_SUPPORT macro to conditionally compile
  enhanced stats support
 -Use QCA_MCOPY_SUPPORT and QCA_TX_CAPTURE_SUPPORT macros
  to conditionally compile MCOPY and Tx capture features
  respectively
 -Use QCN_IE macro to conditionally compile BPR
  feature
 -Use QCA_ADVANCE_MON_FILTER_SUPPORT macro to conditionally
  compile advance monitor filter feature
 -Fix vdev attach issue for special and smart monitor vap
 -Fix status ring initialization issue.

Change-Id: I0deaa28a9a54bf34b0f41e6dd510fdd8d4992db2
CRs-Fixed: 2983780
2021-07-30 21:51:26 -07:00
aloksing
53fe7000ba qcacmn: Move monitor related fields from soc/pdev to mon_soc/mon_pdev
PATCH[6/7]:
This patch consists following changes:
 -Move monitor related pdev variables to struct dp_mon_pdev
 -Move monitor relted soc variables to struct dp_mon_soc
 -Move cookie to monitor link desc va to monitor file
 -Add APIs to access monitor related variables
 -Add dummy APIs to build without monitor support.

Change-Id: I032a480b1383d061f984cee3ba6b10ac7a0ff350
CRs-Fixed: 2983781
2021-07-30 21:51:21 -07:00
aloksing
e7cc727374 qcacmn: Move core monitor and monitor dependent feature func
PATCH[4/7]:
This patch consists following changes:
 - Move core monitor and monitor dependent feature functions
   to monitor file
 - Move enhanced stats functions from htt to monitor file
 - Move vdev set monitor mode rings function to monitor file
 - Create and initialize relevant funct ptrs
 - Initialize cdp monitor related ops.

Change-Id: Iac1ab43eb1c4b98bd21bbb8a5741ee53034da2f1
CRs-Fixed: 2984635
2021-07-30 21:51:12 -07:00
Yeshwanth Sriram Guntuka
f14c5c6593 qcacmn: Avoid possible double skb_pull in no peer stack delivery
skb_set_len and skb_pull operations are done in both
dp_rx_deliver_to_pkt_capture_no_peer and
dp_rx_deliver_to_stack_no_peer. Due to this, in the
issue scenario, EAPOL frame gets dropped in roaming
scenario since qdf_nbuf_is_ipv4_eapol_pkt returns
false.

Fix is to do a skb_push_head operation in
dp_rx_deliver_to_pkt_capture_no_peer API before
exiting.

Change-Id: I071a5248f9f8577c8a21547f67ec53d707dee0be
CRs-Fixed: 2982188
2021-07-18 04:57:13 -07:00
Rakesh Pillai
5605d45923 qcacmn: Add near-full irq processing handler for RX ring
Add the handler to process the near-full condition
on the rx ring.

Change-Id: I426480386c4716702f8410ed87c70160decaa03f
CRs-Fixed: 2965081
2021-06-30 13:48:07 -07:00
Jinwei Chen
4083155141 qcacmn: Add support for HW cookie conversion
Support HW cookie conversion for BE platform.

Change-Id: I39058fbf256266557f5e734ba376db4db0731b24
CRs-Fixed: 2929533
2021-06-23 23:32:49 -07:00
Amit Mehta
ad4cb6357b qcacmn: Add NULL check for dp_pev
Currently, no NULL check is made for the value of dp_pev.
Adding a NULL check to avoid NULL dereference.

Change-Id: I2712b7e2fd53ba3a346878e73d2eedac161c5935
CRs-Fixed: 2955365
2021-06-10 13:02:39 -07:00
Jinwei Chen
12a999bc58 qcacmn: Deliver EAP frames to stack from REO exception path
Revert "qcacmn: drop duplicated EAP frames from REO exception path",
allow all EAP frame delivering to stack including retried ones.

Change-Id: I73733841c1feb21d5b5fd160856a8fe9c21168fc
CRs-Fixed: 2959701
2021-06-08 18:17:28 -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
89270803f3 qcacmn: Refactor fisa packet history for BE
Refactor FISA packet history to not access "struct rx_pkt_tlvs". This is
because this structure may be different for Li and BE chips and should
not be accessed directly and only via hal_soc->ops in common code.

CRs-Fixed: 2888556
Change-Id: I0d9f2785a81c130a2dc506020a02ee5581c0bbd3
2021-06-07 01:51:15 -07:00
Manjunathappa Prakash
477928661c qcacmn: Core DP RX path changes for WCN7850
Implement core DP rx processing to functions in to corresponding
architecture specific be/li rx files. Keep common utility functions
in DP common files.

Change-Id: I40083e10772fd2b6ce2f1fa9e197f2ad92d0522a
CRs-Fixed: 2891021
2021-06-07 01:51:15 -07:00
Rakesh Pillai
27d6b43bfb qcacmn: HAL RX-TLV changes for beryllium
Add HAL rx tlv changes for WCN7850

Change-Id: Ie76c608ed57c6a4f8adac97e1efc7888d2036f52
CRs-Fixed: 2891049
2021-06-07 01:51:15 -07:00
Rakesh Pillai
872da9462b qcacmn: Datapath RX error handler for WCN7850
Add DP rx error handler changes for WCN7850.

Change-Id: I401f1b69eb107818e7aceb0a51279dab7f558b96
CRs-Fixed: 2891021
2021-06-05 15:10:50 -07:00
Karthik Kantamneni
0a7f7fb6a8 qcacmn: Optimize refill buffer pool feature code
Optimize refill buffer pool feature code to be
light weight on CPU, so that refill thread will
consume less CPU resources and also replenishing
RX buffers will be done faster.

Change-Id: I849ca60558c6197003d95e7d54fdb5f837cdc217
CRs-Fixed: 2950166
2021-06-02 13:48:27 -07:00
Karthik Kantamneni
cfbfcf3b21 qcacmn: Fix race condition during IPA map/unmap handling
While Rx buffers are getting umapped from net rx context if IPA
pipes are enabled at same time from MC thread context this is
leading to race condition and IPA map/unmap is going out of sync.

To fix this introducing IPA mapping lock and IPA mapping need to
be handled with lock held.

Change-Id: I9fa71bdb6d4e4aa93fc795cc5dd472a181325991
CRs-Fixed: 2945063
2021-05-27 13:41:35 -07:00
Varsha Mishra
6c720adf28 qcacmn: Enable peer authorize by default
Drop non-EAPOL frames from unauthorized peer in security mode.
Enabling this feature by default with this change.

Change-Id: I9878b37088149e34f456a38a9c0f722e4c5ee49a
CRs-Fixed: 2943789
2021-05-13 15:32:16 -07:00
Yeshwanth Sriram Guntuka
8c4c0044cb qcacmn: Do not intrabss forward EAPOL frames
Do not forward EAPOL frames that have DA different
from the SAP vdev mac addr.

Change-Id: I23959e38b5cbd845d369bebd6913150eca4551bf
CRs-Fixed: 2860248
2021-05-12 18:42:31 -07:00
Yeshwanth Sriram Guntuka
35b9bf6c44 qcacmn: Fix possible OOB access of rx_refill_ring_history
In monitor mode, when the channel is set to any 2G band channel
the mac_id passed to dp_mon_process API is 1. As part of
dp_rx_buffers_replenish, refill history is logged and the
mac_id is used to index into the history array. The array is
of size 1 and OOB access would happen when ring_num which
is the mac_id, passed in is 1.

Fix is to pass the pdev->lmac_id instead to
dp_rx_refill_ring_record_entry and add ring_num sanity check.

Change-Id: Id824ec8b01e7923ad74771d5f34a25f5fccb65f3
CRs-Fixed: 2939544
2021-05-11 08:03:31 -07:00
Karthik Kantamneni
3bc4b99247 qcacmn: Add support for Rx refill ring history
Add support for Rx refill ring history, maintain records of refill info
during RXDMA ring replenish.

Change-Id: I034014eacfc510ec6f416fca601fa864326de9c2
CRs-Fixed: 2930005
2021-04-29 04:37:47 -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
Yeshwanth Sriram Guntuka
a5e6565dd6 qcacmn: Check for equal case in nbuf len sanity
MSDU with len 1654 is received in the REO2SW ring and
the total len of the pkt would be 1654 + 392 (pkt tlvs)
+ 2 (l2 hdr padding) = 2048bytes. The nbuf len sanity
checks for strictly less than 2048 bytes which results
in the assertion failure.

Fix is to add the equal case when validating the
nbuf len.

Change-Id: I7e5d1df10339c8d7908a12001c2322028965a8fe
CRs-Fixed: 2916351
2021-04-07 14:32:52 -07:00
Yeshwanth Sriram Guntuka
6512d66c27 qcacmn: Create IPA SMMU maps for host replenished bufs
Buffers replenished post processing entries in the
REO2TCL ring do not have ipa smmu mappings created
when RX_PREALLOC_BUFFER_POOL feature is disabled.
This will result in SMMU fault when IPA HW accesses
such replenished buffers.

Fix is to create IPA SMMU mapping for replenished buffers
when RX_PREALLOC_BUFFER_POOL feature is disabled as well.

Change-Id: I0fe611a1279b91a3e45bc269348e05de9015d596
CRs-Fixed: 2915686
2021-04-07 08:16:35 -07:00
Karthik Kantamneni
1759c5d6cb qcacmn: Rate limit excessive logs in WBM error path
Rate limit excessive logging prints in WBM error path

Change-Id: Ifb69959b78740bf4a0fca7b7611a2da0ef740413
CRs-Fixed: 2908240
2021-04-06 18:43:06 -07:00
Manikanta Pubbisetty
86e32fb122 qcacmn: assert on processing invalid RX ring descriptors
Currently, we break the dp_rx_process() reap loop when we encounter
a ring descriptor with invalid bit set in SW cookie. If the HW
has copied old/stale entries in the ring, then we will end up
processing the same entry every time we try to reap the ring.
Instead, assert on processing such invalid entries so that
we can obtain useful debug information.

CRs-Fixed: 2904509
Change-Id: Iddde959a573ddf4ca364e1fb7a54ed0eaf4dc169
2021-03-24 06:44:23 -07:00
Subrat Dash
ecb559ab6f qcacmn: Add check to discard multicast echo packets
The bridge forwards the multicast packets to all the
interfaces attached the bridge.

When the STA network interface receives such packets
from bridge and send it to the AP, it is echoed back
from the BSS.

These packets are not intended for the bridge as it
will lead to looping.

Add a check to detect and drop such packets when
received back from the BSS.

Refactor dp_rx_mcast_echo_check function to fix
compilation errors from the above change.

CRs-Fixed: 2894272
Change-Id: I3f9e92c3598af11d3ff4e6b9b8afbc4110a926fc
2021-03-18 07:43:13 -07:00
Karthik Kantamneni
f5fe106f3f qcacmn: Sanitize Rx buffer length received from H.W
Check if Rx single msdu length including padding and tlvs length
is greater than Rx buffer size allocated to H.W and raise error
to catch out of bound access.

Change-Id: I7c70b8a0b6828f7fd88a19141f9087430085c13a
CRs-Fixed: 2873933
2021-03-05 01:18:22 -08:00
Karthik Kantamneni
c9cec76270 qcacmn: Avoid per packet Rx refill buffer pool lock
Avoid per packet Rx refill buff pool lock, instead
acquire/release lock for burst of nbuf's replenishment.

Change-Id: I778cb9702d31d4b8911cca4e7f06f12c50ef6df9
CRs-Fixed: 2884208
2021-02-25 23:21:25 -08:00
Vulupala Shashank Reddy
1065dc8179 qcacmn: Refactor compilation flag of pkt capture mode
Refactor WLAN_FEATURE_PKT_CAPTURE_LITHIUM to WLAN_FEATURE_PKT_CAPTURE_V2
to remove hardware name from compilation flag.

Change-Id: I5a30b33d8bd6065d12e7c89c666c2f0cab66344e
CRs-Fixed: 2869827
2021-02-11 00:24:33 -08:00
Karthik Kantamneni
595bc84a39 qcacmn: Add RX prealloc pool for replenishing RX buffers
Add and initialize a preallocated pool of buffers which can
be used to replenish RX buffers. During replenish, the buffers
from the pool are used instead of allocating/mapping a new buffer
in the softirq context. This preallocated pool will be refilled
in thread context.

Change-Id: Idf3bd7d25c5d57ddba105ccd8fab672c26a184f1
CRs-Fixed: 2869345
2021-02-09 17:47:02 -08:00
Lihua Liu
74efc61848 qcacmn: Avoid using small buffer address
The memory below 0x2000 is reserved for the target use,
so any memory in this region should not used by host.
But on some third-party platforms, we observe such
memory is allocated for RX buffer, which cause HW/FW
NOC error, then RX is stuck. To address this,
re-allocate RX buffers when small buffer appear.

Change-Id: Iad118e82f3fe10f92cbf5f7388dc0960542fc03c
CRs-Fixed: 2707190
2021-02-04 06:43:41 -08:00
Surabhi Vishnoi
01c8d3f45f qcacmn: Add support for RX offload packets in packet capture mode
Add support to process RX offload packets in packet capture mode.
To distinguish rx offload packets from normal rx packets,
DP_PEER_METADATA_OFFLOAD bit is set in peer metadata, based on value
of this bit rx packet is delivered to stack or packet capture
component.

Change-Id: Ice656a0bc14efd0382c4949d695daa8e926ce41e
CRs-Fixed: 2856792
2021-01-22 16:12:18 -08:00
Shwetha G K
b3fafa78c8 qcacmn: Cleanup rssi and snr used interchangeably
Cleanup rssi and snr used interchangeably

Change-Id: Idc78ca1ceb62af766aaf69e42ab5d6e8990a6f0b
2021-01-11 15:13:44 -08:00
Mainak Sen
37a91751be qcacmn: Enable Peer authorization support in RX path
In security mode, allow only EAPOL frames in receive path
when peer is not authorized. This feature is enabled per VAP
based on vdev flag and will be applicable for all peers in that
VAP

Change-Id: Ic5dea09c2083f31e8cd301a0cdc3565f247b735c
2021-01-07 16:48:52 -08:00
Vulupala Shashank Reddy
6735c84cff qcacmn: Add WDI event for rx packet to packet capture mode
Add WDI event and call wdi event handler for to deliver rx packet
to packet capture mode.

Change-Id: I856ac07f292047136431f67bb2654c855767e5e8
CRs-Fixed: 2844728
2020-12-24 09:52:42 -08:00
Vevek Venkatesan
16066cae2b qcacmn: fix error in NULL checking of rx_ring_history
rx_ring_history is an array of pointers, address of pointer is
always a non-NULL value, this always passed the NULL check,
which leads to NULL pointer dereference, fixing the same.

Change-Id: I401203a6f2a5930869cf4002ac0e714d3fdba62f
CRs-Fixed: 2844038
2020-12-24 07:40:22 -08:00
Shikha Bakshi
3de99369a0 qcacmn: Modify Logs for QDF_MODULE_ID_RX
Add macros dp_rx_info, dp_rx_debug, dp_rx_err,etc.
to define logs

Change-Id: I75820f9f19f876d9fb91b977f56e205b3e275444
CRs-Fixed: 2841584
2020-12-22 14:41:30 -08:00
phadiman
d1bb528ae7 qcacmn: Host Static Memory Optimization (in NSS offload mode)
Low memory profiles like 256M and 16M profiles support
only NSS Wi-Fi offload mode and HOST data path APIs are
not used in NSS offload mode

Disable HOST data path APIs which are not used in both
NSS Wi-Fi offload mode and in HOST mode (in NSS offload mode)

CRs-Fixed: 2831478
Change-Id: I6895054a6c96bd446c2df7761ce65feef662a3cc
2020-12-15 13:34:26 -08:00
Aniruddha Paul
e9a6af6660 qcacmn: Drop invalid peer frames with RA as STA and TA != BSSID
In HKv1, if smart monitor mode is enabled on RE,
we are getting invalid peer frames with RA as STA
mac of RE and the TA not matching with any NAC list
or the the BSSID.Such frames need to dropped in order
to avoid HM_WDS false addition.

Change-Id: If641052c3f0ac5ce49afcc52062462d8b7eaa0e6
2020-12-01 02:50:50 -08:00
Chaithanya Garrepalli
3888d0824e qcacmn: WAR to avoid SG process with wrong continuation bit
If a continuation bit is set in msdu desc info and reported
length can fit in single buffer avoid SG processing

Change-Id: I6e8c3e1e657c372d5d915450dda20ba26bac495f
2020-11-30 05:25:07 -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
Tiger Yu
eff1069f87 qcacmn: Assertion when detecting rx desc nbuf sanity check failure
Assertion when detecting rx desc nbuf sanity check failure to get more
info in the RX refill buffer ring for default version.

Change-Id: I8d0255e2f13e2b993f5651b788f895ea06187bf9
CRs-Fixed: 2800602
2020-10-28 09:21:45 -07:00
nobelj
9e4237dc34 qcacmn: Added WAR to populate rssi info
rssi value is always zero when retrieved from tlv header.
so added war to populate rssi value from stored value
of peer instead.

Change-Id: I6d5127438dae1f3891e3e78c97be93b79b4ee128
2020-09-21 16:55:55 -07:00
Jinwei Chen
18989f8ede qcacmn: support multiple pages prealloc for descriptor
Support multiple pages prealloc for DP descriptor

Change-Id: I66d4cef3acf69acf4b6fc8e5a6d01c3d67921dca
CRs-Fixed: 2751338
2020-09-21 01:33:16 -07:00
Varsha Mishra
c7789836fd qcacmn: Extended WDS solution RX
1. Register peer->osif_peer for per-STA netdevice delivery.
2. Wi-Fi 3-address frame packets received would be processed
   through AP netdevice.
3. Wi-Fi 4-address frame packets received would be processed
   through per-STA netdevice.

Change-Id: I102874ea1de9fba40ab7f0e2c32c9de1c9b4d075
2020-09-19 10:25:18 -07:00
Ankit Kumar
8528f1fc76 qcacmn: Add feature debug print for RX_MON_MEM_FRAG
Added debug print for RX_MON_MEM_FRAG feature enable
disable log.

Change-Id: Iaa8712755bd1f9a686ec32e2e22ffc1f41da48a6
2020-09-17 13:01:54 -07:00
Rakesh Pillai
21af5ba8cf qcacmn: Add data structures for SWLM
Add the necessary data structures for the
software latency manager.

Change-Id: Ibf55f0eef7ee6602b007de39a28f09c4622bd356
CRs-Fixed: 2769004
2020-09-10 01:04:20 -07:00
Mainak Sen
60cdb2185c qcacmn: Hlos tid override support in dp vdev
1. Add flag to support hlos id override feature in dp vdev
2. Update tid from nbuf->priority in dp_tx_send
3. Update tid to nbuf->priority in dp_rx_process

Change-Id: I66e8d77733a667f3f60b77e0d7bb444f7c5ad93d
2020-09-07 01:03:42 -07:00
Chaithanya Garrepalli
ddc9e59e8f qcacmn: Add VDEV refcount debug support
Add debug support for VDEV refcount to take
refcount by module id and decrement corresponding
refcount with same module id

Change-Id: I15c075816994ba70155fefbc0bce208b20fb9a59
2020-08-20 10:07:32 -07:00
Chaithanya Garrepalli
a718007f03 qcacmn: increment vdev refcount for search by id
Add new API dp_vdev_get_ref_by_id() which will return vdev
pointer by holding a reference. Caller of this API has
to ensure that this reference is released by calling
dp_vdev_unref_delete() API

New lock soc->vdev_map_lock is introduced to protect
vdev id to object array

Change-Id: I883e328932e35ef31254125492dbae20cebe0e00
2020-08-20 10:07:28 -07:00
Chaithanya Garrepalli
f4701f13ec qcacmn: remove peer backpointer in DP ast entry
Remove the peer backpointer in ast entry and store
peer_id instead

Assign peer_id in AST entry in AST MAP event,
also add the ast entry to peers ast list

In AST map & AST unmap APIs use ast find by vdev_id

Change-Id: I74d9828dc309149d98f6f577b5c8304cb087fd76
2020-08-15 01:26:17 -07:00