Commit Graph

206 Commits

Author SHA1 Message Date
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
Ankit Kumar
bdddeb7c22 qcacmn: Add frame vdev id check in tx
Drop frame if it is not for the vap, to which
client is connected.
Enable this check only for ap.

Change-Id: I33d7eb79267490bdb8697e4e45f789e9f6279f0e
CRs-Fixed: 2756304
2020-09-16 09:30:33 -07:00
Naga
c4cd90a9c4 qcacmn: FR-64492 WDS Extended support
- Added data structure for wds ext peer
- Enhanced DP peer structure to maintain
  wds ext peer data structure, which inturn
  maintain pointer to osif device.
- Enhanced DP vdev structure to maintain feature
  configuration, which will be updated during vdev
  creation when feature is flag is set at control
  psoc.
- Enhanced cdp_vdev_param_type and cdp_config_param_t
  to set wds ext configuration into DP vdev
- Enhanced cdp_cmn_ops structure and corresponding
  call back definitons to get peer id, which will
  be saved in osif private structure and to set
  wds ext peer rx.
- Enhanced cdp_ctrl_ops to send event to control
  path when 1st 4 address frame is received from
  backhaul.

Change-Id: Ide0ea54e7b2d480ad646fb84b6e4e3108930f986
CRs-Fixed: 2773492
2020-09-15 07:19:50 -07:00
Guisen Yang
1eaa090cf2 qcacmn: Fix compilation error
There's no declaration for API dp_peer_qos_stats_notify().
Define the API  as "static inline".

Change-Id: Id6769d680b3304cebf00b2348fb5b9a3bc9c7368
CRs-Fixed: 2773655
2020-09-11 01:32:25 -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
Shivani Soni
466f147d05 qcacmn: Debugfs support for HTT stats
Debugfs support for HTT stats under compile
time flag "HTT_STATS_DEBUGFS_SUPPORT".

Change-Id: I44c4f11265fdb3b9d53a9ac545e2945854bb9a57
CRs-Fixed: 2760947
2020-08-31 17:21:22 -07:00
Mohit Khanna
83aab371c4 qcacmn: Add support to use pre-alloc mem
Add logic to pre-allocate DP consistent memory and reuse later
on wifi on/off. This prevents memory fragmentation.

Change-Id: I1e5eb0da39950a5d028dd46d38ff715f283e53ff
CRs-Fixed: 2740889
2020-08-31 03:32:45 -07:00
Pavankumar Nandeshwar
f0d2f53e32 qcacmn: stats VoW IGMP improvements
Add stats VoW IGMP improvements feature

Change-Id: I86b803e67f2cc3cfc01750f261f06590ff2b97c2
2020-08-28 02:01:25 -07:00
Pavankumar Nandeshwar
0eeac59b4e qcacmn: VoW IGMP improvements
As part of the VoW IGMP improvements, which deals with
conversion of igmp packets to unicast packets, the
following changes are done when the new feature is enabled:

1. IGMP/MLD packets with special addresses (addresses not
   part of any multicast group) will be converted to all
   existing clients of the AP. These packets will be
   directly fed to igmp multicast to unicast conversion
   module.
2. The IGMP/MLD packets with group specific addresses will
   first go to multicast enhancement module, where they
   will be allowed to pass and will be converted to unicast.
3. The new feature will be enabled only when multicast
   enhancement feature is enabled, which will be ensured
   at the configuration level.
FR : 61063

Change-Id: I2fd5a67766c806432fbe1a12cb9654a3600100f5
2020-08-28 02:00:48 -07:00
Rhythm Patwa
3a1d8d64f7 qcacmn: Add support for Punctured Preamble PPDU count in tx stats
Add support to update the count of number of Punctured Preamble
PPDU's transmitted by the AP.

Change-Id: Id85a490e9e80566e639f48190a96d3107c6e5c61
CRs-fixed: 2755288
2020-08-27 18:37:12 -07:00
Neha Bisht
8ae1b8a9e3 qcacmn: Provide SON with per peer qos stats
Providing per peer QoS stats to SON via WDI event

Change-Id: Idd3cfbfec332269fdc8ad0ef273674e81d6ee92f
2020-08-24 05:55:22 -07:00
Srinivas Girigowda
b100ced3c7 qcacmn: dp: Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF
Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF.

CRs-Fixed: 2760938
Change-Id: Ib7999b69f79a65a67e1d9f7e24a04b7a7da0aebf
2020-08-23 23:09:31 -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
e2b00339f3 qcacmn: add APIs to iterate the peers at vdev level
Add new APIs to iterate through the vdev peer list
by taking the peer reference.

A call back has to be passed to these APIs which will
be called for every peer in the lisst

dp_vdev_iterate_peer() -> iterates through peer_list of vdev
dp_pdev_iterate_peer() -> iterates through peer_list of all
                          vdevs in pdev
dp_soc_iterate_peer() -> iterates through peer_lists of all vdevs
                         in soc

Additonal APIs are added to for itearations where the callback
will be called outside the vdev->peer_list_lock, as these APIs
have additional memory allocations suggested to use only in case
the iteration need to happen outside lock

dp_vdev_iterate_peer_lock_safe()
dp_pdev_iterate_peer_lock_safe()
dp_soc_iterate_peer_lock_safe

Change-Id: I24632fe611355cc3e93b7f16d90913d4b8686ca9
2020-08-15 01:26:23 -07:00
Chaithanya Garrepalli
fdc6a808ae qcacmn: add module id for peer reference
Add support to get the peer reference with module id

To help debug the peer reference related issues

Change-Id: Ie20c7e710b9784b52f2e0f3d7488509282528a00
2020-08-15 01:26:14 -07:00
Chaithanya Garrepalli
113841906c qcacmn: increment refcount for peer find by id
Use unified version of dp_peer_find_by_id API
which will take peer reference

Also use unified peer ref release API dp_peer_unref_delete

Change-Id: Ibb516a933020a42a5584dbbbba59f8d9b72dcaa4
2020-08-15 01:26:10 -07:00
Chaithanya Garrepalli
e253cee043 qcacmn: Peer refcount FR update DB as per new design
Update peer DB as per new design

peer_hash_table: add at peer_create and delete at peer delete
peer_id_to_obj_map: add at peer map and delete at peer unmap
peer_list: vdev level peer list add at peer create delete at
	   peer delete

Call dp_peer_cleanup() at unmap event

dp_peer_cleanup -> dp_peer_tx_cleanup -> Tx capture cleanup
	|
	---------> dp_peer_rx_cleanup -> Cleanup Rx REO TID queues &
					 defrag queue free

Introduce ref_cnt variable per VAP which will be
incremented and decremented at peer alloc and free. This counter
will be used to delay the vdev free if there are any active
peers for vdev exist in system

Change-Id: Iec13bceed0db0db71655fdbf6f96df8795b5077b
2020-08-15 01:26:07 -07:00
Chaithanya Garrepalli
86d3df0605 qcacmn: use granular locks to protect peer structures
Remove the global soc->peer_ref_mutex lock to protect
peer access

Instead use granular locks to protect the individual
peer DBs

1) soc→peer_hash_lock : To protect peer hash table
2) soc→peer_map_lock : To protect id to objmap array
3) vdev→peer_list_lock : To protect vdev level peer list

Change-Id: I9f044c4d71fe1155817a2b22a5a050545ec37445
2020-08-15 01:26:03 -07:00
Jeevan Kukkalli
94c430da4a qcacmn: Notify HMWDS ast add status to upper layers
Notification is sent in following two scenarios.
 - After call to dp_peer_add_ast() if we are not expecting any
   peer map event.
 - When HTT peer map event is received.

Change-Id: Id926d1cec1ee64520b0368fcc5000988c24e0513
CRs-Fixed: 2745542
2020-08-03 11:23:43 -07:00
Rakesh Pillai
9beeaa95a7 qcacmn: Add history to track the entries in rx rings
The rx rings are relatively of smaller size. Any
duplicate entry sent by hardware cannot be back-tracked
by just looking at the ring contents alone.

Hence add a history to track the entries for the
REO2SW, REO exception and SW2REO ring.

Change-Id: I9b0b311950d60a9421378ce0fcc0535be450f713
CRs-Fixed: 2739181
2020-08-02 11:01:41 -07:00
Manoj Ekbote
3d34d90697 qcacmn: Set up user completion struct based on max users
Currently, per-user information in Tx PPDU completion is allocated for
37 users though FW may send information for fewer number of users. In
new scheme, FW provides number of users in USERS_INFO TLV and host can
allocate the per-user struct based on this number. This can save memory
while processing each completion message.

CRs-Fixed: 2730923
Change-Id: If04fd664a1ef6e77e8eb44c5d2bd1fa89fcaba72
2020-07-26 20:24:22 -07:00