Commit Graph

227 Commitit

Tekijä SHA1 Viesti Päivämäärä
nobelj
357bfbe52d qcacmn: Add support to Legacy tx monitor and Waikiki
Add function pointers to free buffer address stored in status buffer
and support tx monitor in legacy and Waikiki flow.

Change-Id: I28612d388009292ff751fe514183fb801909f485
2022-01-28 04:05:13 -08:00
Subrat Mishra
1e5ee08ad6 qcacmn: CDP interface support for Tx Capture Stats
Add CDP interface structure and ops functions for getting Tx Capture
stats.

Change-Id: I5b01e2ab21aec566848eee805d6a702da150d328
CRs-Fixed: 3111860
2022-01-21 01:54:05 -08:00
Subrat Mishra
0a5f55fb4a qcacmn: Add more stats to cdp_soc_stats structure
Add more stats to cdp_soc_stats interface structure to ship it to
userspace. Move soc, delay and jitter stats apis from dp_main.c to
dp_stats.c.

Change-Id: Idb7f8b706e8744350d7fb2e8802d9303b3f25b5c
CRs-Fixed: 3084586
2022-01-17 02:14:38 -08:00
Pavankumar Nandeshwar
8f62ddf128 qcacmn: Fix QUIC Copyright Markings
Fix QUIC Copyright Markings

Change-Id: I396830ab402318cd2385a5bed8dc3af373b8148b
2022-01-14 11:53:34 -08:00
Neha Bisht
15b88ae15e qcacmn: Prefetch Tx HW desc, SW desc and SKB in pipeline fashion
Prefetch TX HW desc, SW desc and SKB in pipeline fashion in Tx.
completion path.
This improves the UDP DL CPU idle% by ~4.5%

Change-Id: I48096e996cd835321ce2681d3981fa94c7189f54
2022-01-08 06:09:15 -08:00
Pavankumar Nandeshwar
d7908ff22a qcacmn: Add txrx_peer in dp peer
Add txrx_peer in dp peer which will be used in
per packet data path.

Change-Id: I91f10b1640430300f4c9f002ca54b3903c556d41
2022-01-06 07:55:43 -08:00
Rakesh Pillai
615c512921 qcacmn: Enable interrupt based processing in monitor mode
Enable the interrupt based processing in monitor mode
for WCN7850, by enabling MSI interrupts for rxdma
monitor destination ring.

Change-Id: Ia3c4456d28ed58c8ef49a7aa8e711076fbdf9415
CRs-Fixed: 3094129
2021-12-17 01:04:29 -08:00
Rakesh Pillai
0115477838 qcacmn: Monitor mode ring process changes for WCN7850
In WCN7850, there is only one common RXDMA dst ring for
both the mac.

Add changes to process the common RXDMA dst ring for
status TLVs corresponding to either MAC monitor status
ring. Also use arch ops to get rx_desc from sw_cookie.

Change-Id: Ia2c004755bc4389b587d995286093a519b995cab
CRs-Fixed: 3084442
2021-12-15 08:44:04 -08:00
Tiger Yu
95cb0e103f qcacmn: Refine dp pdev vdev stats updating function to non-inline
Refine dp pdev vdev stats updating function to non-inline to avoid kasan
building failure.

Change-Id: I896f28831198632c61735ccc10ed4aedb30a8232
CRs-Fixed: 3085365
2021-12-06 10:08:39 -08:00
Harsh Kumar Bijlani
af17c944fb qcacmn: Rx stats changes for BE HW vdev stats
Following peer stats are updated in per packet Rx path:
    to_stack
    multicast
    broadcast

In BE architecture, HW provides the support for basic vdev stats and
hence per packet stats updation of above parameters can be done only
when enhanced stats is enabled or HW vdev offload stats is disabled.

Avoiding per packet stats updation reduces CPU load and improves KPI.

Change-Id: Id7c11c025a8464951b615a7f7b006ce61db487fc
CRs-Fixed: 3067843
2021-11-30 00:58:04 -08:00
Harsh Kumar Bijlani
66e66d88d7 qcacmn: Tx stats changes for BE HW vdev stats
Following peer stats are updated in per packet Tx completion path:
    comp_pkt: Pkt Info for which completions were received
    tx_failed: Total Tx failure

In BE architecture, HW provides the support for basic vdev stats and
hence per packet stats updation of above parameters can be done only
when enhanced stats is enabled or HW vdev offload stats is disabled.

Avoiding per packet stats updation reduces CPU load and improves KPI.

Change-Id: I7090d1a1ce0a882236e3310e3e9517149cbb146b
CRs-Fixed: 3067843
2021-11-30 00:57:59 -08:00
Sai Rupesh Chevuru
0860396f1e qcacmn: ME6 changes with DMS enable
In ME6 we are currently using a workaround to send the native wifi packet
through the exception path, as the older HKv1 hardware didn’t support
single packet AMSDU. Since, the hardware is supporting this starting
from HKv2, we are sending ME packets as normal packets to FW with
DMS indication in Peer based meta for Beryllium.

Change-Id: Ic154b438df2c811c845e7c2eaadf252985d419ad
2021-11-29 02:06:19 -08:00
Tallapragada Kalyan
4e7ceff561 qcacmn: Prefetch RX HW desc, SW desc and SKB in pipeline fashion
Prefetch RX HW desc, SW desc and SKB in pipeline
fasion in the first loop of RX processing.

This has improved TPUT by 200Mbps and provided a
10% gain in CPU (single core)

PINE with other optimizations: 3960Mbps @ 100% core-3
PINE + pipeline prefetch: 4130Mbps @ 90%  core-3

Change-Id: I47f351601b264eb3a2b50e4154229d55da738724
2021-11-22 13:36:33 -08:00
Subrat Mishra
813d7d9a43 qcacmn: Define cdp interface APIs to fetch delay and jitter stats
Define a new cdp interface to fetch peer delay stats.
Define a new cdp interface to fetch peer jitter stats.

These interface APIs will be used by upper layers to fetch delay and
jitter stats per peer for telemetry stats feature.

Change-Id: I96ee6a861fa2626e7e1fba3df7df9ec64ff7e946
CRs-Fixed: 3071493
2021-11-12 06:20:07 -08:00
Amit Mehta
9cf3f44770 qcacmn: Update MPDU retries in case of successful transmission
In case of successful transmission If MPDU tx
is retried more than the threshold then
increment MPDU retry count by transmit_cnt / threshold

Change-Id: Idbc7e2d0579ff68e272132fe4ffe9f951c4aacf5
CRs-Fixed: 3058464
2021-10-29 10:23:17 -07:00
Rakesh Pillai
57e2c01e5e qcacmn: Peer id parsing changes for beryllium
Take care of the MLO peer bit indication to be
concatenated with peer_id to access the peer map
object.

Change-Id: Ia603a728101e83829a8906d1b847f42389e78ca6
CRs-Fixed: 3039326
2021-10-15 13:13:27 -07:00
Jinwei Chen
5c85cfb5a0 qcacmn: cdp/dp peer change for MLO
cdp/dp peer change for MLO

Change-Id: I9b8eb741317a0dc7337aff7e773148892e531ba2
CRs-Fixed: 3031166
2021-10-15 13:13:12 -07:00
sandhu
3de5365a37 qcacmn: Fix hamilton whunt compilation issue
Change-Id: I0ac3ab0530cfb645c0eef81aafc9d1ef6a35c776
CRs-Fixed: 3052592
2021-10-14 01:16:02 -07:00
sandhu
18fe5c3f02 qcacmn: Add dp functionality to support stats sysfs
Add dp functionality to collect stats for sysfs buffer.
Add both host and fw stats.

Change-Id: I64f84804d36cccec9d701925d96cc7ee96943b7a
CRs-Fixed: 3035864
2021-10-05 02:51:27 -07:00
Yeshwanth Sriram Guntuka
ccb6664db1 qcacmn: Dump flow pool stats as part of periodic stats display
Dump flow pool stats even for low verbosity level as
part of periodic stats display.

Change-Id: Iea59d20b0a81cfd0bfdac65ad54a11fa33f30f2f
CRs-Fixed: 3031168
2021-09-13 13:04:58 -07:00
aloksing
ca013a2078 qcacmn: Add enhanced stats flag
Add enhanced stat flag in dp pdev to make independent of monitor ko

Change-Id: I6da989db54829e28ce680fc9671eb9b866e4b2b1
CRs-Fixed: 3020454
2021-08-31 05:39:42 -07:00
Shivani Soni
d06d841dc6 qcacmn: Add support for VOW Reo and Rxdma error statistics
Support for Rx REO and Rxdma error statistics for version 3

Change-Id: I2a558f62d6d7b66658bb064810d0ea13528d9a28
2021-08-29 00:54:41 -07:00
Jeevan Kukkalli
8fd6fe32e8 qcacmn: Conditionally compile scan radio special vap stats
Conditionally compile scan radio special vap stats.
Also rename spcl_vap to scan_spcl_vap to better reflect
funtionality.

Change-Id: I7d7f636209f6aa12cca0a3e808d7ae1fac9f397d
CRs-Fixed: 3009837
2021-08-15 01:53:08 -07:00
aloksing
b158abe417 qcacmn: API renaming for monitor module
Add prefix dp for all monitor APIs
Add mon_debug/mon_info/mon_err for logs

Change-Id: I71d49f6bcacd77f5695269817fed83337169227b
CRs-Fixed: 3006497
2021-08-12 05:32:47 -07:00
Pavithra R
4a84bdb2ad qcacmn: Add dp_update_msdu_to_list function to dp_mon_ops struct
This patch adds the function dp_update_msdu_to_list to dp_mon_ops
struct. This is needed for supporting tx capture module in NSS
offload.

Change-Id: Id36aa6d1442eed4112585807e8798fc28ccdc424
2021-08-09 15:37:16 -07:00
Jeevan Kukkalli
1665e7c8e5 qcacmn: Scan radio special vap stats support
-Add flag to inidicate special vap configuration
-Add frame type counters while processing tlv
 WIFIRX_MPDU_START_E
-Add function to update special vap rx stats
-Add dp pdev param to enable/disable special vap
 stats reset
-Add function to reset special vap stats
-Add fucntion to get special vap stats
-Add CDP function to retreive special vap stats

Change-Id: Ia5de6743e472dc86c9e66b9e789c909a57025e35
CRs-Fixed: 3005425
2021-08-07 11:31:43 -07:00
Jeevan Kukkalli
2536fbaf5c qcacmn: Add function to reset mon interrupt mask
Add function to reset monitor interrupt mask.

Change-Id: If40093cc87dc02432645ec687b00fe856894238d
CRs-Fixed: 3007273
2021-08-05 08:29:02 -07:00
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
c4796962ca qcacmn: Monitor vdev and peer attach/detach
PATCH[5/7]:
This patch consists following changes:
 -Monitor vdev context allocation while vdev attach and free
  while vdev delete
 -Monitor peer context allocation while peer create and free while
  peer delete
 -Move monitor vdev timer function to monitor file
 -Move monitor reap timer handler function to monitor file
 -Move monitor timer related variables to monitor file
 -Add timer init/deinit and start/stop in monitor file.

Change-Id: I9c7910671d3678c53ca9ec44a57bc10e892008d9
CRs-Fixed: 2983994
2021-07-30 21:51:16 -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
aloksing
f20f31dc10 qcacmn: Move cdp_mon_ops initialization to monitor file
PATCH[3/7]:
This patch consists following changes:
 -Move struct cdp_mon_ops to dp monitor file
 -Add new function for dp monitor soc cfg initialization
 -Move full monitor mode function to dp monitor file
 -Move vdev set monitor mode function to dp monitor file
 -Move config debug sniffer function to dp monitor file
 -Move set advance monitor filter function to dp monitor file
 -Set monitor delayed replenish entries for target types

Change-Id: If8dac4eedc0c8eb4e956df34c7c3adae8712c840
CRs-Fixed: 2983939
2021-07-30 21:51:07 -07:00
aloksing
420c5b3e6f qcacmn: monitor soc/pdev attach and detach
PATCH[2/7]:
This patch consists following changes:
  -Allocate monitor soc context and initialize monitor ops
   for pdev attach/detach and init/deinit functions.
  -Move monitor rings alloc/free/init/deinit to dp monitor file

Change-Id: I97c24f28cfdad10fa1c22e5978224db196bbdd74
CRs-Fixed: 2983970
2021-07-30 21:51:01 -07:00
Karthik Kantamneni
8c19a927bf qcacmn: Skip sending WMI REORDER_QUEUE_SETUP for BAR frames
When host receives BAR frames with OOR/2K jump in sequence
number it updates REO HW with new starting sequence number
and requests F.W to setup peer reorder queue. But REORDER_QUEUE_SETUP
is already requested to F.W as part of initial add BA in host.

So while handling OOR/2K jump BAR frames don't send
REORDER_QUEUE_SETUP to F.W

Change-Id: Idc3657e901dc792f699b53c45e4ae5133d286891
CRs-Fixed: 2981280
2021-07-01 22:18:37 -07:00
Mohit Khanna
c9bcf7e494 qcacmn: Handle BUF_ADDR ring desc in dp_rx_err
Currently dp_rx_err_process expects ring descriptor to be only
LINK_DESC_TYPE. In certain cases BUF_ADDR_TYPE ring descriptor is
observed in reo_exception ring. Add logic to handle the same.

Change-Id: I5baecc3f8eafc0830672b91bc9d9607b568a6cda
CRs-Fixed: 2954653
2021-06-09 23:38:08 -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
Mohit Khanna
e135b3e106 qcacmn: DP changes to create li/be TX files
Move DP TX target specific functionality to dp/wifi3.0/be
and dp/wifi3.0/li folders. DP Functionality common to both lithium and
beryllium targets stays in dp/wifi3.0.

Change-Id: I3497284153e2ea30a9cb1faf05bd41422329b804
CRs-Fixed: 2891038
2021-06-07 01:51:15 -07:00
Yeshwanth Sriram Guntuka
df22eee823 qcacmn: Register API to flush frags in dp peer ops
Register dp_peer_flush_frags API in dp peer ops
for flushing fragments for a particular peer.

Change-Id: Ia179d3160bdc306ec965c465134042c66a0c40a6
CRs-Fixed: 2874366
2021-05-13 06:20:05 -07:00
Chaithanya Garrepalli
970948916a qcacmn: print backpressure stats in work queue context
Avoid backpressure event prints in irq context and
defer work queue context

Change-Id: Ib68237d6a9930ead38f53aa89ec1d9e9a2f4147d
2021-04-29 14:29:33 -07:00
Vevek Venkatesan
07c4fc98d1 qcacmn: add lockless SRNG access support for Rx Rings
Add lockless SRNG access support for Rx rings.

Change-Id: Ia44f612cc5f6e50255aafaaf895044dea7a88aa7
CRs-Fixed: 2868991
2021-02-09 19:56:53 -08:00
Nitin Shetty
71e3244d46 qcacmn: skip MEC ast entry creation in wlan fw
MEC ast entry will be created only in software
and adding MEC entry to wlan fw is skipped.

Change-Id: I6991f9f12ceb22a7c599cdf3cc2a13c996d93671
2021-02-09 15:35:27 -08:00
Jianmin Zhu
6ef2047d56 qcacmn: Fix long ping delay after enable RTPM
Issue1: Driver RTPM state is ON/NONE, Kernel state is RESUMING.
cdp_runtime_resume is already complete,
hif_pm_runtime_get return -E_INPROGRESS,
dp_tx_hw_enqueue will set the flush event,
but cdp_runtime_resume is already done,
this flush event will be handled only on next pkt tx.

Issue2: Driver RTPM state: Resuming
hif_pm_runtime_get returns -EBUSY,
dp_tx_hw_enqueue is interrupted by any IRQ,
cdp_runtime_resume is completed,
dp_tx_hw_enqueue will set the flush event,
This flush event will be handled only on next pkt tx.

Fix:
Introduce a link_state_up atomic variable in hif to track the link state
change by pld_cb.
Set atomic variable link_state_up=1 in pmo_core_psoc_bus_runtime_resume
just after pld_cb. pld_cb brings the PCIe bus out of suspend state.
Set atomic variable link_state_up=0 in pmo_core_psoc_bus_runtime_suspend
just before pld_cb. pld_cb puts the PCIe bus into suspend state.

Introduce dp_runtime_get and dp_runtime_put.
dp_runtime_get get refcount with increment of an atomic variable.
dp_runtime_put return refcount with decrement of  this atomic variable.

If hif_pm_runtime_get returns -EBUSY or -EINPROGRESS,
take the dp runtime refcount using dp_runtime_get,
check if the link state is up, write TX ring HP,
return the dp runtime refcount using dp_runtime_put.

cdp_runtime_suspend should reject the suspend, if dp_runtime_get is non
zero.
cdp_runtime_resume should wait until dp_runtime_get becomes zero or time
out, then flush pending tx for runtime suspend.

Change-Id: I5b97d50cba710082f117f3845f7830712b86cda7
CRs-Fixed: 2844888
2021-01-14 07:46:48 -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
Manikanta Pubbisetty
a5c11aabcb qcacmn: avoid FSE cache flush messages during runtime suspend
When runtime power management is enabled, until the system is fully
resumed, we do not post any message to CE, instead they will be queued
in HTC. Once the device is fully resumed, all HTT messages in the queues
will be downloaded to CE at once. In some corner cases, it is found that
too many FSE caches flush messages getting queued during the runtime
resume; once the device is fully resumed, all these would be downloaded
to the FW/HW at once causing unintended crashes.

Avoid posting FSE cache flush messages until the device is fully resumed
to fix the issue.

Change-Id: I2be21406e8c7a9dcd86df3e93c2568797defcad0
CRs-Fixed: 2843541
2021-01-05 18:14:39 -08:00
Ananya Gupta
a660173209 qcacmn: Pre allocate pdev during attach
Pre-allocate pdev context as size exceeds dynamic allocation
threshold (4KB).

Change-Id: Ida866275ed1ddea5a9b6aa1cf114ccd226ed0f22
CRs-Fixed: 2825110
2020-12-08 01:12:27 -08: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
Naga
71b1eaed3e qcacmn: Add stats support for wds ext peer
Add logic to exclude dp peer stats from
dp vdev stats if wds extended is enabled.

Change-Id: I1a5a1794e04f90877916f92b7f4216a525ce6cce
CRs-Fixed: 2778199
2020-09-19 10:25:22 -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
Debasis Das
c1184913b7 qcacmn: Ensure nbuf count is less than no of segs
While preparing raw packets for transmission, the count
of nbuf belonging to one mpdu must be less than the
number of segments.This makes sure the frags array inside
seg_info does not go out of bounds.

Change-Id: I7fffba7f64da274aa73c558cfc63d90f4419a04d
2020-09-17 21:09:07 -07:00
Manikanta Pubbisetty
2db8a92735 qcacmn: add FSE CMEM HTT response
CMEM FSE details like offset into CMEM where flow search table(FST)
is allocated and the size of the FST will be sent by the firmware
in response to FSE setup message. Adding the logic to parse the
response message and update the CMEM parameters in the SW FST.

Change-Id: Id1dd4b59be02c175da3fc6fcb5ed56e6f491133a
CRs-Fixed: 2771187
2020-09-17 10:18:19 -07:00