Commit Graph

136 Commits

Author SHA1 Message Date
Neha Bisht
6064df8467 qcacmn: Update code with peer_extended_stats instead of rdk_stats
With new configuration changes for enable_peer_extended stats, update
code to peer_extended_stats naming for clean codebase.

Change-Id: I97a7ee331042232098382683fefebd05e6b099c3
CRs-Fixed: 3149920
2022-04-20 01:37:59 -07:00
Shwetha G K
d7046ba026 qcacmn: Add API to flush peers in recovery case
Add cdp wrapper API to flush the peers in recovery case.

CRs-Fixed: 3153535
Change-Id: I58869bf118f0aea487e63865300ba8e7462651ac
2022-03-26 01:10:50 -07:00
Subrat Dash
20b758944f qcacmn: Decouple FEATURE_PERPKT_INFO from MESH_MODE_SUPPORT
The per packet info feature can be enbaled to support enhanced
stats independent of mesh mode.

Change-Id: I852e7a958c520901b6f418d30deb53fa2f68fb68
CRs-Fixed: 3079000
2022-03-08 05:37:52 -08:00
Pavankumar Nandeshwar
4e487c5c45 qcacmn: Fix QUIC Copyright Markings
Fix QUIC Copyright Markings

Change-Id: I9f14871bfc89f7d9a4340cd9c412d519e145687c
2022-01-27 06:59:24 -08:00
Pavankumar Nandeshwar
c9f584b99f qcacmn: Handle failure cases in txrx_peer allocation
Handle failure cases in txrx_peer allocation and
return appropriate errors to the callers.

Change-Id: I51fb519af86344e078eabfcc3f2883522361e1d9
2022-01-13 13:04:29 -08:00
Himanshu Batra
f49b3a1753 qcacmn: Cfg changes for IPA offload support
Cfg changes for IPA offload support.

Change-Id: If477db8e958b22634e1505f3e4319c7aa0cc6ef4
2021-12-20 22:45:22 -08:00
Chaithanya Garrepalli
31281aab2b qcacmn: Changes for MLO pdev attach
Changes for MLO pdev attach to get MLO_link_id
information.

Change-Id: Id9e6932138e314dfeb93417fce690329ec7d6ab8
2021-11-23 03:55:41 -08:00
Mohit Khanna
81e29163db qcacmn: Add throughput based RTPM API support
Add support to invoke HIF runtime PM APIs in TX packet path based on
throughput level. Essentially at high throughputs, where runtime PM is
not expected to provide power gains, invoking the APIs is deterimental to
performance.
Hence invoke runtime_pm APIs based on throughput level.

CRs-Fixed: 3059712
Change-Id: I49d111bffa8a37c68abbdd54911f9ecc22430562
2021-11-08 05:19:41 -08:00
Rakesh Pillai
32046ad850 qcacmn: Vdev attach changes for MLO
Add mld mac address info during datapath
vdev attach.

Change-Id: I0ea22025d19be82be0c56809871e8513c3ce7962
CRs-Fixed: 3039326
2021-10-15 13:13:17 -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
Yu Tian
112813c1b7 qcacmn: Add API to get TX pending in WoW state
This change is used to provide an API for PMO module to
check whether there are pending TX frames before HOST sends
wake up indication to FW. PMO module uses this to indicate
FW whehter to discard HWDTIM.

Change-Id: Icc3271e87e376e3313fddc5f4f99e39daeaf6af7
CRs-Fixed: 3046947
2021-10-11 00:30:47 -07:00
Surabhi Vishnoi
449ae318e0 qcacmn: Add cdp api to update the packet capture mode
Add a CDP api to update the packet capture mode in dp_soc
when it get updated by user using vendor command.

Change-Id: Id0856aeeb5e1a77e1ce6fb23562fdbff4a2fb320
CRs-Fixed: 3048344
2021-10-06 02:07:05 -07:00
Pavankumar Nandeshwar
6b1d142d98 qcacmn: Enable wds changes in Beryllium
wds in Beryllium is managed by hardware.
Make use of hardware managedwds and disable
the corresponding wds handling done in host
for Beryllium.

Change-Id: I39f23cb40c6c5f85ada8ce59c92ff2855bb18da3
2021-09-30 15:15:25 -07:00
Balaganapathy Palanisamy
71d4ce6cb0 qcacmn: Add support to get free descriptor pool size
Add a function in cdp to get free descriptor pool size.

CRs-Fixed: 2984773
Change-Id: Iac5aca801255e5ba5460ea09c88fc4573c1a7055
2021-07-26 06:55:34 -07:00
Manikanta Pubbisetty
14d38b77fb qcacmn: disable EXT grp irqs and drain TXRX during suspend
Any update to the SRNG TP/HP when the device is in low power
state would result in system errors. It is recommended to disable
EXT grp irqs and drain TXRX before sending power save enter command
to the FW. This will ensure that no interrupts are received while
in power save mode and as a result there wont be any HP/TP updates.

Change-Id: Ibf952bbc2c6d13fb3e4ca6b4845bc9cc887fa694
CRs-Fixed: 2883135
2021-03-11 19:41:34 +05:30
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
Yu Tian
76fdb54e96 qcacmn: add an ini field to control rx frame pending check
Add a ini control field to control rx frame pending check
logic in WoW case. In some cases, power consumption is more
important than rx frame ping loss, so add a control flag

Change-Id: I8c4d3725edddb82a0f06dc70c22a8dd5243209f2
CRs-Fixed: 2806786
2020-11-02 01:47:07 -08: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
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
phadiman
dbb0787de4 qcacmn: Modify wlanstats context to RDK stats context
peer wlanstats context is used only for RDK Plume stats
but the name is misleading as wlan statistics

Hence rename peer's wlanstats_ctx to rdkstats_ctx and
the APIs the APIs around the same

CRs-Fixed: 2767192
Change-Id: I9e8955554b94fa29a3964fed729a95a4db67c8f6
2020-09-03 04:04:17 -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
Yu Tian
dabf6e13ee qcacmn: Add RX frame pending check for WoW
Sometimes frames are queued to dp_rx_thread wait queue
during WoW suspend in progress. At this time dp_rx_thread
is in SUSPEND state and these frames can't deliver to Linux
Stack, for ICMP case, if no other frames come to wake up
system, ICMP timeout will happen. Add a RX suspend check
in WoW to avoid suspend when frame comes before WMI_WOW_ENABLE
sends to FW

Change-Id: I756d3127f75da8f0e6e303c1250c01ce0c6ac573
CRs-Fixed: 2756263
2020-08-21 14:48:05 -07:00
phadiman
3df84438dd qcacmn: Add CDP API to get peer wlanstats ctx
Peer wlanstats context was accessed directly from
PPDU cookie, with this approach the cookie pointer
may become stale if peer goes for deletion

Hence access the wlanstats context using CDP API
with stats context protection

CRs-Fixed: 2740261
Change-Id: I54c785325f8852ad422f05527b98ebca6e4d6cf0
2020-08-14 14:44:25 -07:00
Prathyusha Guduri
dcb2fc98f6 qcacmn: Add Tx desc limit check for exception packets
Soc level exception descriptors limit is sent from FW in WMI service
ready TLV. Using that to check for exception packets limit

Change-Id: I99d20ecbb6a5bfd61b5a8a205775d34749eae880
2020-05-13 06:46:01 -07:00
phadiman
1f3652debc qcacmn: Datapath init-deinit changes
Do a logical split of dp_soc_attach and
dp_pdev_attach into Allocation and initialization
and dp_soc_detach and dp_pdev_detach into
de-initialization and free routines

Change-Id: I23bdca0ca86db42a4d0b2554cd60d99bb207a647
2020-05-02 21:59:42 -07:00
Amir Patel
925a7d389c qcacmn: Add full monitor mode changes
Add following changes:
	a. Add CDP API to config full monitor mode
	b. HTT configuration changes
	c. Init/Deinit changes for full monitor mode resources

CRs-Fixed: 2632442
Change-Id: I06db5194031b3ea0f0c1e5deda20df4bc0faa0b9
2020-03-20 22:16:00 -07:00
Pavankumar Nandeshwar
9b0c1271ed qcacmn: Initialized pdev id with default value 0xFF
pdev_id is being initialized with 0. Since 0 is valid pdev_id, though
pdev is not present for that id, it is being accessed.

Initialized pdev_id to 0xFF by default. Added checks on API to
detect valid pdev_id value corresponding to lmac_id

Change-Id: I2b2a38783615494ccc08e265702815f7e562214b
2020-03-17 03:11:13 -07:00
Yu Tian
0c6d94dd3e qcacmn: cdp: Implement API cdp_set_key_sec_type
Peer key security type is set in cdp_set_pn_check,
this API is called in key install step, but only
update Ucast field even if in Mcast key install.
This may be set wrongly if Ucast and Mcast security
modes are different. Add a new API to set security
modes of differ key types separately.

Change-Id: Icaa63139d117de75633ca1f81eb618c6b9294b53
CRs-Fixed: 2617461
2020-02-14 07:40:04 -08:00
Pavankumar Nandeshwar
61ec40476d qcacmn: Avoid exchanging dp handles with non dp modules
Corresponding changes in datapath for avoiding storage
of dp handles in umac objects.

Change-Id: I61ba9cca9a10cc7e3d618c7f1ec384dda2e85132
2020-01-23 14:28:38 -08:00
Chaithanya Garrepalli
b543c23ae2 qcacmn: Create new CDP API for mode change
Add new CDP API for mode change instead of reusing
map_pdev_to_lmac API

Change-Id: Ie0bcf9a9faec96b633986c64a43b8eeae813e78e
2020-01-22 16:26:34 -08:00
Pavankumar Nandeshwar
0ce3870654 qcacmn: Modify set 2 of ctrl_ops in dp to for umac-dp decoupling
Change set 2 of ctrl_ops APIs to replace pdev, vdev and peer
dp handles with pdev_id, vdev_id and peer mac address
along with dp soc handle

Change-Id: I3f180c9c360d564f0b229b447074ad23b7c0a737
2020-01-20 17:52:06 -08:00
Pavankumar Nandeshwar
6c83405439 qcacmn: Modify set 1 of ctrl_ops to acheive umac-dp decoupling
Change set 1 of the ctrl_ops APIs to replace pdev, vdev and peer
dp handles with pdev_id, vdev_id and peer mac address
along with dp soc handle

Change-Id: Iedf6dea2215d3d04b2212c71c8ec8c7328c559e8
2020-01-20 17:51:36 -08:00
Himanshu Batra
21ade1514e qcacmn: Componentize Multicast Enhancement
Remove dependency of ME on VAP layer and radio(ic) layer data
structure.

Change-Id: I4d0c8e11a4049c01cd355b794d650cd3342293bf
CRs-Fixed: 2580388
2020-01-17 04:18:48 -08:00
Amit Shukla
1edfe5ae7c qcacmn: Data path changes for Dynamic Mode Change FR. Changes include-
1. Move all LMAC rings to SOC from pDEV
	2. Dynamically obtain lmac->pdev mapping while handling LMAC interrupts

Change-Id: Ib017d49243405b62fc34099c01a2b898b25341d0
2020-01-16 17:14:39 -08:00
Vevek Venkatesan
27e7bb4d79 qcacmn: cdp: Converge cdp_cmn_ops
Currently cdp ops are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev_id or vdev_id or peer mac address,
which will be used to get the respective handles,
and hence avoiding the unwanted access of the
handles if it has been deleted.

- txrx_peer_unmap_sync_cb_set
- txrx_fw_stats_get
- txrx_get_ctrl_pdev_from_vdev
- txrx_get_mon_vdev_from_pdev

Change-Id: I4472dc0905edb7700acb4401b117c8876ba455f3
CRs-Fixed: 2541460
2019-12-27 03:25:49 -08:00
Pavankumar Nandeshwar
a234716d1d qcacmn: cmn_ops changes in datapath for umac-dp decoupling
Change cmn_ops APIs to replace pdev, vdev and peer
dp handles with pdev_id, vdev_id and peer mac address
along with dp soc handle

Change-Id: I5716a87cad56b1dfe8dd56f193bbb6ff923a6af1
2019-12-27 03:24:59 -08:00
Jinwei Chen
5bd952ce05 qcacmn: fix srng lock hold long time due to logging
when lot of fragment frame with invalid peer_id indicated to
host through reo exception ring, excessive logging cause srng
lock hold long time.
  degrade log level as a WAR to avoid excessive logging.

Change-Id: Iffb18ad723d1ac5955868cc8ec99bb0198785ee5
CRs-Fixed: 2584610
2019-12-19 03:05:15 -08:00
Pavankumar Nandeshwar
4c7b81b540 qcacmn: removal of cp handles and changes for ol_if_ops
Remove pdev and vdev control path handles from data path.
Instead send pdev_id and vdev_id along with opaque soc
handle in ol_if_ops.

Change-Id: I6ee083f07e464f283da0d70ada70a4e10e18e1b2
2019-12-04 07:45:10 -08:00
Pavankumar Nandeshwar
715fdc32ec qcacmn: remove ctrl_peer handle from dp peer
Remove ctrl_peer handle from dp peer and instead
use peer's mac address

Change-Id: I9e24fa94248749f9b4859bce4a1d79d70f32507e
2019-12-04 07:44:21 -08:00
Rakesh Pillai
dce01374cd qcacmn: cdp: Convergence of cdp_flowctl_ops
Currently the cdp apis are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev/vdev id or peer mac address, which will be
used to get the respective handles, and hence
avoiding the unwanted access of the handles if
it has been deleted.

Converged flowctl_ops
- flow_pool_map_handler
- flow_pool_unmap_handler
- dump_flow_pool_info
- tx_desc_thresh_reached

CRs-Fixed: 2539812
Change-Id: I084d3878df84778622340e87bddf90acd3e669d6
2019-11-11 23:08:22 -08:00
Rakesh Pillai
e5430cb03e qcacmn: Handle vdev_id as parameter for txrx stats handler
The datapath vdev handle is not to be used outside
datapath layer. So the cdp api for getting txrx stats
will pass vdev_id instead of the vdev handle.

Pass vdev id instead of vdev handle for the cdp api
used to get txrx stats. Use the vdev_id to retrieve
the corresponding vdev handle in the txrx stats handler.

CRs-Fixed: 2560364
Change-Id: I57b6c6b232d122583e85929fa972d68bc54e84e0
2019-11-08 01:45:26 -08:00
Venkata Sharath Chandra Manchala
ea6518b89e qcacmn: Record reo command srng events
Add debugging infrastructure to record every event posted to reo
command ring. The infrastructure maintains the record of the last
64 events posted to the ring.

Change-Id: Id56fc352050eb664a64b0abb767f3b4a6b4c3aa3
CRs-Fixed: 2552822
2019-11-07 19:50:09 -08:00
Rakesh Pillai
01b9b680fc qcacmn: Avoid REO destination change when IPA enabled in P2P mode
In cases where one of the interfaces is a P2P-GO and
IPA has been enabled, the P2P connection establishment
fails.

When IPA is enabled, the REO destination is changed to REO4
which can be reaped only by IPA module. But in case of P2P-GO
interface in operation, this change in configuration causes
all the RX packets to be stalled due to incorrect REO configuration.

Hence, to avoid this case, do not change the REO dest config
when the interface subtype is P2P.

CRs-Fixed: 2498315
Change-Id: Ie9f01c3b353c7c0503e1541d6c79c2f47c9782f3
2019-10-10 13:43:37 -07:00
Gyanranjan Hazarika
e8047269ee qcacmn: data-path changes for dynamic hw-mode config
This feature enables user to change HW mode dynamically
from DBS to DBS_SBS mode and vice-versa. Currently, HW
mode configuration is only possible through INI setting
requiring a subsequent reboot.

Relevant DP changes are:

1. Add API cdp_txrx_handle_pdev_status_change to pass
pdev 'up' or 'down' status to DP module
2. Add pdev-status check in dp_rx_process_invalid_peer
3. Add pdev-status check in dp_tx_comp_handler to free
buffer and release descriptor

Change-Id: I74b144abb1b0dc41a26a18ad28f872e6457e9653
CRs-fixed: 2490212
2019-08-07 16:22:32 -07:00
Varsha Mishra
6e1760c2c4 qcacmn: Handling vlan tagged frames for multipass phrase feature
1. Remove vlan tag in tx and enqueue to hardware.
2. Add vlan tag in rx after peer-vlan_id lookup.

Change-Id: I932202540ac03cabdd20ffd4849fe759ea8a7abb
2019-07-29 09:55:41 -07:00
Himanshu Batra
032d352263 qcacmn: Replace void * Host Target Communications handle with abstract type
Replace void * Host Target Communications handle with abstract type handles
provided by Host Target Communications component

Change-Id: I16ca87e4f9716791d340da2fda0a8a640fa2ec34
CRs-Fixed: 2487151
2019-07-25 00:25:49 -07:00
Vevek Venkatesan
de31ff656d qcacmn: add feature flags to featurize DP operations
Add feature flags DP_FLOW_CTL for DP flowctl ops,
DP_PEER_SUPPORT_OPS to support peer handling in DP,
DP_POWER_SAVE for power saving ops in DP, DP_CON_MON DP_MOB_DEFS
DP_INVALID_PEER_ASSERT DP_PRINT_NO_CONSOLE and DP_INTR_POLL_BOTH.

Change-Id: I01dafadf6578c0b5f36ab3ef56624912fb66b100
CRs-Fixed: 2467170
2019-06-21 03:09:23 -07:00
Nirav Shah
dd382b0d49 qcacmn: Add logging macros without function/line info
Add per module logging macros without function/line info
to avoid adding function/line info where it is not required.

Change-Id: I7621603b925e0762ef474c92e7b5cce641ceeefe
CRs-Fixed: 2468439
2019-06-12 16:15:08 -07:00
Aditya Sathish
8482a0c0fc qcacmn: Add support to update vdev stats through CDP
Add CDP support to update vdev stats from the higher
layers.

The CDP API takes a buffer which is then used to
update parts the cdp_vdev_stats structure depending
on the stats ID that is sent through the API.

This change adds support for vdev tx ingress stats
only. Extended support can be added as required
by adding a new stats ID.

Change-Id: I13d6fb946c8a3dbb0b499b7b026d83b080411d15
CRs-Fixed: 2384177
2019-06-01 05:09:23 -07:00
Pranita Solanke
05862964ab qcacmn: Identify WIN/MCC specific features
Identify the WIN/MCC specific features. Move the features under feature
specific flags. Get rid of WIN/MCC specific code.

Change-Id: Iaf4e5befd7d574a20bea5c078201adbeac3b762c
2019-05-20 09:58:47 -07:00