Commit Graph

131 Commits

Author SHA1 Message Date
Vevek Venkatesan
4a07e3949d qcacmn: cdp: Converge cdp_ctrl_ops
Currently cdp ops are given pdev/vdev 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/vdev_id which will be used to get the
respective handles, and hence avoiding unwanted
access of the handles if it has been deleted.
Also deleting few ops which stores and retrieves
such handles and adding ops to set/get pdev params.

- txrx_get_psoc_param
- wdi_event_sub
- wdi_event_unsub

Change-Id: Id089d9b6b4737d700d2436e2081291a3741affb5
CRs-Fixed: 2541658
2020-01-20 17:52:48 -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
Ankit Kumar
53581e92fd qcacmn: Update counter in mutipass rx packet drop
multipass_rx_pkt_drop is peer level stats counter
used to count multipass rx packet dropped frame.
Accumulate this counter at vdev and pdev level.

It also initializes multipass_en flag to false at
vdev attach.

Change-Id: Idaa85a71c80eefb9359abb026402b71aa28ad6a2
CRs-Fixed: 2595551
2020-01-17 19:50:47 -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
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
nobelj
4771edbadc qcacmn: support for tx capture stats
added support to print debug stats for tx capture

Change-Id: Id5533e076f9b5d3f15a392f61b4af5fdffa9efb0
2019-12-19 10:25:35 -08:00
Mohit Khanna
82382b32e9 qcacmn: Handle BAR OOR/2K_JUMP REO errors
Currently in dp_rx_wbm_err_process, we donot handle
HAL_REO_ERR_BAR_FRAME_2K_JUMP and HAL_REO_ERR_BAR_FRAME_OOR REO errors.
Add support for the same.

Change-Id: I22147fcd2d531c1e08214626796994593ffeb3a6
CRs-Fixed: 2580876
2019-12-16 14:20:15 -08:00
Yeshwanth Sriram Guntuka
65d547730f qcacmn: Cleanup local peer id from DP APIs
Local peer_id is being cleaned up across DP, HDD and PS/WMA.
So, any references to local peer_id/sta_id will be replaced
by peer mac address and all interactions between the layers
will be based on peer mac address.

Cleanup local peer id usage from DP APIs.

Change-Id: I930e1c6a09092a373c093239632d6f310fee18e2
CRs-Fixed: 2529041
2019-12-06 01:52:16 -08:00
Yeshwanth Sriram Guntuka
92aa901f84 qcacmn: Cleanup unused DP APIs [PEER_ID_PHASE2]
Local peer_id is being cleaned up across DP, HDD and PS/WMA.
So, any references to local peer_id/sta_id will be replaced
by peer mac address and all interactions between the layers
will be based on peer mac address.

Cleanup unusued DP APIs which are based on local peer_id.

Change-Id: Idd95bc640ca7e36a427be7202935034d4ed58979
CRs-Fixed: 2529026
2019-12-06 01:52:01 -08:00
Rakesh Pillai
d295d1e81d qcacmn: cdp: Convergence of cdp_misc_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 misc_ops
- tx_non_std
- get_opmode
- get_tx_ack_stats
- set_ibss_vdev_heart_beat_timer
- hl_tdls_flag_reset
- set_wisa_mode
- txrx_post_data_stall_event
- update_mac_id
- pkt_log_init
- pkt_log_con_service
- get_num_rx_contexts
- set_wmm_param
- flush_rx_frames
- bad_peer_txctl_set_setting
- bad_peer_txctl_update_threshold
- txrx_data_stall_cb_register
- txrx_data_stall_cb_deregister
- vdev_set_driver_del_ack_enable
- get_intra_bss_fwd_pkts_count
- mark_first_wakeup_packet
- register_pktdump_cb
- unregister_pktdump_cb
- pdev_reset_driver_del_ack
- runtime_suspend
- runtime_resume

CRs-Fixed: 2539811
Change-Id: I3080df033d6411d7078a322224b914bda2fddc0e
2019-11-21 06:12:31 -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
Venkata Sharath Chandra Manchala
8a4812f7fc qcacmn: Enable TSO Stats for Lithium based products
Add support to account for TSO jumbo packets on the
Tx path and print the statistics using dumpStats 3.

Change-Id: I6cc446df5c84e3ac436d922935fcd559e0704ec5
CRs-Fixed: 2356244
2019-10-28 07:11:53 -07:00
Rakesh Pillai
7bce1f0332 qcacmn: Add ol soc context
Add the soc context for ol_txrx,
The soc layer is used to hold the ol_pdev context.

CRs-Fixed: 2539807
Change-Id: I751ad61de55db9d86624b8b5e18b0981ffb0338d
2019-10-24 21:42:20 -07:00
Pavankumar Nandeshwar
2e435f1452 qcacmn: Add an api to get pdev from pdev_id
Add an API to fetch pdev using pdev_id from soc.

Change-Id: Id9f480d8e3546cde3930c9f1179d60d470e17051
2019-10-24 21:42:15 -07:00
Pavankumar Nandeshwar
5d3171d70e qcacmn: Add vdev_id to vdev_handle map in dp
Add a vdev_id to vdev_handle map in dp for faster
retrieval of vdev using vdev_id.

Change-Id: Ie19e09dd2e2b3d99317146d1b4cecdb5147a3cdd
2019-10-24 21:42:11 -07:00
Chaithanya Garrepalli
8b58459630 qcacmn: remove unused rx_opt_proc from dp_peer
Cleanup unused rx_opt_proc from dp_peer

Change-Id: I83401689f408f04c6f084dd83eb40dfacb295919
2019-10-22 12:46:13 -07:00
Karunakar Dasineni
13abde98f1 qcacmn: CDP interface to deliver Tx mgmt frames
Add CDP interface to pass on host generated mgmt
frames to DP, to be included in Tx capture.

Change-Id: Ic1a63c137ca546b0ad2b94d92fd5d489e9512a6f
2019-10-07 16:38:23 -07:00
Tallapragada Kalyan
d92f598f75 qcacmn: Pass pdev to dp_peer_stats_notify API
Pass pdev to dp_peer_stats_notify API instead of de-referencing
this from peer structure.

Change-Id: I5dc679283f5822f44b4140aefb3aee44a826c720
CRs-Fixed: 2500647
2019-09-04 11:31:12 -07:00
Rakshith Suresh Patkar
fb42ec3909 qcacmn: Cleanup dp_get_vdev_by_sta_id [PEER_ID_PHASE1]
Cleanup dp_get_vdev_by_sta_id to be peer mac address based
from local peer id based.

Also, modify the API cdp_peer_get_vdev_by_sta_id with additional
argument for peer mac address.
Rename cdp_peer_get_vdev_by_sta_id to cdp_peer_get_vdev_by_peer_addr.

Change-Id: I889538b5ea7ebac8973dcaaa5ebdad1ac495e791
CRs-Fixed: 2504569
2019-08-15 20:38:29 -07:00
Rakshith Suresh Patkar
0375108ffa qcacmn: Cleanup dp_clear_peer [PEER_ID_PHASE1]
Cleanup dp_clear_peer to be peer mac address based
from local peer id based.

Also, modify the API cdp_clear_peer with addition argument
for peer mac address.

Change-Id: I1bd3fab1b9510b5f1d4476e11b617fcb6417f2c4
CRs-Fixed: 2503774
2019-08-13 04:17:32 -07:00
Sravan Kumar Kairam
1e8591a2a0 qcacmn: Dont destroy rx_tid lock for peer reuse
In case of peer reuse case rx_tid locks are destroyed as
part of peer cleanup and are not initialized again. So while
deleting this peer as part of unref delete peer cleanup is done
which again tries to destroy the rx_tid locks which were already
destroyed. This leads to assert complaining destroying lock with
out initialization. So dont destroy the rx tid locks in case of
peer reference reuse.

Change-Id: I860de558950009cae6f62385dd665badfe9964e0
CRs-Fixed: 2504973
2019-08-11 00:47:32 -07:00
Sumeet Rao
c4fa4df717 qcacmn: Add a new feature to support tagging of IPv4/v6 flows
Tags are programmed using wlanconfig commands. Rx IPv4/v6
TCP/UDP packets matching a 5-tuple are tagged using HawkeyeV2 hardware.
Tags are populated in the skb->cb in the REO/exception/monitor data
path and sent to upper stack

CRs-Fixed: 2502311
Change-Id: I7c999e75fab43b6ecb6f9d9fd4b0351f0b9cfda8
2019-08-07 11:28:21 -07:00
nobelj
1453164d24 qcacmn: add per user RX stats in Rx PPDU struct
1)Add per user RX stats in Rx PPDU struct
2)Add per RU size counters in wifistats/iwpriv txrx_stats 10
3)Modified RX ppdu indication structure.

CRs-fixed: 2458732
Change-Id: Id8f3d6cce97503c0529642c4f5d66f3bbc59785d
2019-08-05 23:27:05 -07:00
nobelj
7b0e27336e qcacmn: Fix OFDMA stats counter
user info with delayed ba stats are stored and stats are updated later
on receiving BAR.

Change-Id: I574dd94d5a7db2160953b5d5d302eff18f4f8648
2019-08-05 16:46:06 -07:00
Varun Reddy Yeturu
8119e1236e qcacmn: Do not setup peer reorder queue if roaming in progress
Do not send the WMI command WMI_PEER_REORDER_QUEUE_SETUP_CMDID
to target if roaming is in progress, as there is a discrepancy
in peer information between the host and firmware when roaming
is in progress

Change-Id: I8e91635b56257bb29972898a29c454123f7cdb8e
CRs-Fixed: 2490238
2019-08-05 06:13:05 -07:00
Akshay Kosigi
a870c6181a qcacmn: Change to clean up of void pointers
Add code to cleanup usages of void pointer usages
in DP code.

Change-Id: I0736bcc0a547d858ed02f1ee59084a44e5fe4bec
CRs-Fixed: 2487249
2019-07-27 13:43:04 -07:00
Akshay Kosigi
4002f765f1 qcacmn: Change to remove void pointer usage for HIF handle
Add code to remove void pointer usage for hif_handle
and use opaque pointer hif_opaque_softc and also use
cdp_soc for opaque DP soc handle

Change-Id: I2896f7704ffb809214c5b08756c4b8673307fd9e
CRs-Fixed: 2487247
2019-07-27 13:43:00 -07:00
Akshay Kosigi
67c8bb9e06 qcacmn: Remove void ptr usage in DP cal client
Make change to remove void pointer usage in DP cal client
instead use cdp opaque pointers.

Change-Id: Ie966ebb7b6bb937d4ee1d6dce3b040804e61ac37
Crs-Fixed: 2484412
2019-07-27 13:42:56 -07:00
Akshay Kosigi
8a753147b7 qcacmn: Change to remove void pointer usage for DP soc
Add code to remove void pointer usage for dp_soc
and use original dp_soc structure inside htt_soc

Change-Id: Icdc26ecdb33d565c43dbc101584069808b31c1a0
CRs-Fixed: 2484403
2019-07-27 13:42:53 -07:00
Akshay Kosigi
0bca9fb200 qcacmn: Change to remove void pointer usage for HAL SRNG
Add code to remove void pointer usage for hal_srng
and use opaque pointer dp_hal_ring_t instead.

Change-Id: I6907f7376d7fe3c9180b8795bd96f49fead2ec64
CRs-Fixed: 2484404
2019-07-27 13:42:41 -07:00
Akshay Kosigi
6eef9e3c6e qcacmn: Clean up DP API's
Remove DP API's which are not being used/defined.

Change-Id: I8a1ee7e3156873227131b526793f464ff4444312
CRs-Fixed: 2483400
2019-07-27 13:42:28 -07:00
Akshay Kosigi
c74162c269 qcacmn: Add code to remove void pointer usage
Add code to use cdp_vdev instead of void pointer for
API dp_tx_send_exception and dp_tx_send_mesh

Change-Id: I63ca5a62c2a8cd6feb906181702888814650dfce
CRs-Fixed: 2480836
2019-07-27 13:42:24 -07:00
Akshay Kosigi
aefbe07345 qcacmn: Add change to remove void usage
Add code to remove void pointer usage for
API dp_peer_unref_delete

Change-Id: If346ea8c174c1fbf705aa52598e703424be943a2
CRs-Fixed: 2480828
2019-07-17 04:49:54 -07:00
Akshay Kosigi
283e2358f4 qcacmn: CONFIG_WIN Macros to be moved out of DP/HAL
Remove CONFIG_WIN usage from Lithium DP and HAL module.

Change-Id: If388e45cb3e7e31493edd422a2f4c40f0dd4a799
CRs-Fixed: 2474613
2019-07-15 06:39:40 -07:00
Venkata Sharath Chandra Manchala
2b8a2a0648 qcacmn: Avoid using freed pdev in dp_rx_bar_stats_cb
dp_reo_cmdlist_destroy frees any pending reo_cmds.
Each reo_cmd is associated with a handler which takes
reo_cmd->data as an input. This reo_cmd->data is a pdev
for dp_rx_bar_stats_cb. So validate pdev before
accessing it further.

Change-Id: I1c2d46d3e3f5ede4491500978153f501ebdeee87
CRs-Fixed: 2478910
2019-07-10 02:56:32 -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
Mainak Sen
95101bb281 qcacmn: Remove CONFIG_WIN flag for VoW stats
Use V3_STATS_ENABLED flag instead of CONFIG_WIN

Change-Id: I1559d67f005c4cba2472970ea3bd49826c16a047
2019-06-20 14:45:24 -07:00
Rakesh Pillai
2529ae1c8a qcacmn: Add event history logs for datapath
Add support to log the important events in
datapath, which will help in debugging the
datapath issues.

IRQ handler, Napi poll and srng access start/end
are the events which are currently logged.

CRs-Fixed: 2457854
Change-Id: Iba105b0e79443b670a01a929f999f94e00ea92f2
2019-06-17 10:23:01 -07:00
Amir Patel
1d4ac98ffe qcacmn: Add rssi_chain support for lithium
Read rssi_chain per nss per bw and from rx status TLVs
and update to host data structures.

CRs-Fixed: 2445933
Change-Id: I275e9e502a0a724410fc189ac293cadc8f2981e0
2019-06-12 17:45:57 -07:00
Amir Patel
5dc47f56dc qcacmn: Move multicast enhancement feature out of common code
Move WIN specific multicast enhancement feature API/data
structure outside common code

Change-Id: I35b10d61bd969a4ab6a864a55dd215049981c0c9
2019-06-07 03:23:56 -07:00
Manjunathappa Prakash
85de96c698 qcacmn: Do not honor addba response Tx failure in roaming
Add callback to get the roaming status and do not honor addba
response Tx failure.

Change-Id: I148542fc3c629749fc08623f5041f6ca76fee298
CRs-Fixed: 2439721
2019-06-03 02:27:06 -07:00
Varsha Mishra
1f4cfb6c58 qcacmn: Fix tx completion and rx stats per wbm/reo ring
Tx completion stats should be counted per wbm ring on tx completion
and not globally. Similarly, rx stats should be counter per reo ring.
Change-Id: I1e4af0d38b23e60de78ca03316861db08ff0811a
2019-05-31 07:40:18 -07:00
Varsha Mishra
27c5bd3193 qcacmn: Handle tx_sniffer pakcets
Send tx_sniffer to firmware and handle ppdu completions accordingly.

Change-Id: Id19a8cba4fdcad88bca6ade8c30a587c2da26d19
2019-05-29 16:47:01 -07:00
Jeffin Mammen
1514e796b6 qcacmn: Update Peer rx/tx rate based on DATA packets
Packets sent/received at fixed rate were also considered to
update the client rates as displayed in wlanconfig command output.
An idle client transmits NULL packets at basic rate and hence
rx rate shows up the basic rate when an idle client is connected.
Consider only data packets to update rates. Do not consider
NULL packets for rate update.
CRs-Fixed: 2435447

Change-Id: Icbf9f2a656bb0d36e16d953952c529185c119f17
2019-05-23 09:31:11 -07:00
Venkata Sharath Chandra Manchala
c61826c476 qcacmn: Cleanup statistics
1. Move statistics API's to dp_stats.c
2. Move DP_TRACE_STATS to DP_PRINT_STATS
   as it is implemented based on target.

Change-Id: I62f3076a51ca35f0e12cdb0ff0230ea87c2baaf7
CRs-Fixed: 2453443
2019-05-20 20:53:27 -07:00
Mohit Khanna
e5a6e94464 qcacmn: Restrict RX softirq poll times
The following changes are made

-Yield dp_rx_process if poll time exceeds
-Yield dp_tx_comp_handler if poll time exceeds
-Interrupt statistics to track various interrupt contexts and
 corresponding interrupt masks
-Add poll times histogram buckets to NAPI stats

Change-Id: I8c7a6bbbb97c7b3dd1dde6ac3a97113c433086a2
CRs-Fixed: 2423879
2019-05-14 18:39:59 -07:00
Venkata Sharath Chandra Manchala
bedc0cd113 qcacmn: Move statistics to dp_stats file
Move dump_stats API to dp_stats.c file.

Change-Id: I7cc3f438c58bb8e2521b7042472dd8436f513e58
CRs-Fixed: 2451204
2019-05-14 18:39:54 -07:00
Ankit Kumar
b374429155 qcacmn: Use ENABLE_DP_HIST_STATS to enable histogram functions
At present, DP_STATS_XXX and DP_HIST_XXX can be disabled
or enabled at the same time using macro DISABLE_DP_STATS.
Make DP_STATS_XXX and DP_HIST_XXX under different macro
so that both can be enabled/disabled separately.

HIST_STATS are by default disabled and can be enabled by
enabling ENABLE_DP_HIST_STATS macro.

Change-Id: I4e7b817afef040407a496e268f2fd680791fc47b
CRs-fixed: 2449710
2019-05-13 03:31:52 -07:00