Commit Graph

37 Commits

Author SHA1 Message Date
Tiger Yu
9fc47f763e qcacmn: Add cfg_dp_sg_enable to get ini key dp_sg_support
Add cfg_dp_sg_enable to get ini key dp_sg_support by cdp_cfg_get.
And add some comments for CFG_DP_SG to clarify more.

Change-Id: I34de242eacbdcf55398afe64b91f5534f205fa22
CRs-Fixed: 2822536
2020-11-20 10:43:43 -08:00
Manjunathappa Prakash
93aff9ee1f qcacmn: Add DP INI to tune netdev features at runtime
Add INI to modify the HW checksum capability advertisement.
Add hook to update enable/disable of HW checksum for vdev.

Change-Id: Idd0bad1d39c8411c7b4ef19483aa2c75a756791b
CRs-Fixed: 2732099
2020-08-20 23:08:11 -07:00
Mohit Khanna
42a8d7ef31 qcacmn: Add P2P UDP/TCP checksum offload INI entry
Add support to enable disable TCP/UDP checksum offload for P2p modes.

CRs-Fixed: 2725395
Change-Id: Id482649e501a8f9a8900a92e3e03a48f0e99603c
2020-07-12 01:49:34 -07:00
Mohit Khanna
97200aab9c qcacmn: Add NAN TX checksum offload INI entry
Currently there is a single INI item tcp_udp_checksumoffload to enable
or disable this feature for all the adapters. In some cases, we want to
be able to enable this feature selectively for NAN mode.

Add nan_tcp_udp_checksumoffload ini item to enable or disable checksum
offload feature specifically for NAN mode. If
nan_tcp_udp_checksumoffload is 'true' and tcp_udp_checksumoffload is
false, hardware checksum offload will be enabled only for the NAN
adapter and not for other adapters.

CRs-Fixed: 2693638
Change-Id: I6e255ce68ddc7b01ebdefe4e5e8d2c985388fefe
2020-06-16 12:20:20 -07:00
Saket Jha
a4a994242f qcacmn: TX Optimization
Memory optimization of unused TX rings by not configuring rings that are
not being used. Configure 2 rings for host in the case of IPA, instead
of configuring 3. If IPA is disabled then configure only 1 set of TX
rings for host.

Change-Id: I251606c728f3020a13e45e8c8386970c8a641f0a
CRs-Fixed: 2530572
2020-02-12 02:38:17 -08:00
Alok Kumar
fef1078ed0 qcacmn: DP change to get buffer size from INI file
DP layer change to read the packet log buffer size
from INI file.

Change-Id: If307ad5abfd0360c3f39247ccc62abd32095303f
CRs-Fixed: 2611406
2020-01-30 23:24:11 -08:00
Sravan Goud
d207ff2e28 qcacmn: Provide vendor extended stats from host
Currently in lithium FW is not always in datapath. As a result
can not provide all the wlan vendor extended stats. So as part
of this host provides some of the extended stats.

Change-Id: I876b6e905f7e25b7088f80f07e55e26a7a409241
CRs-Fixed: 2594797
2020-01-12 06:24:30 -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
Nirav Shah
aa6ca443db qcacmn: Add logic to bundle packets for HL
Add logic to queue and bundle packets before
giving it to scheduler to ensure predictive HTC
bundling for improvement in TX throughput.

Change-Id: Iab5066a46235ce7e41fd29c44a2ce0cfb04b1505
CRs-Fixed: 2574530
2019-12-01 17:43:11 -08:00
Mohit Khanna
c42d8036c9 qcacmn: Donot forward MDNS packets for NAN vdev
MDNS packets if forwarded for a NAN vdev can lead to potential flooding
of the air interface. Hence donot forward them.

Change-Id: Idfdedfb0b5b553745440587448230013f3b56a7d
CRs-Fixed: 2503360
2019-08-16 08:23:00 -07:00
Rakshith Suresh Patkar
b3bc8abbd6 qcacmn: Add peer mac address in struct ol_txrx_desc_type
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.

Change-Id: I3a141d0a1e549fcbb587373f1e0d57dfd031911f
CRs-Fixed: 2503144
2019-08-09 07:37:57 -07:00
Mohit Khanna
7a200e764d qcacmn: Enable ENABLE_DP_HIST_STATS macro
This macro ENABLE_DP_HIST_STATS is needed for histogram information in
DP layer for both TX and RX. Add support for this macro.

Change-Id: Iffcb93c5e19d667bae35ce562c7ef12d063fb659
CRs-Fixed: 2492090
2019-07-21 16:56:38 -07:00
hangtian
04f0ad4935 qcacmn: Set stop_th and start_th for QCA_LL_PDEV_TX_FLOW_CONTROL
Use same stop_th and start_th as QCA_LL_TX_FLOW_CONTROL_V2 for
QCA_LL_PDEV_TX_FLOW_CONTROL which allows pausing/unpausing
netif queues to avoid frame drop in driver.

Change-Id: Ifa649e31a41d1bf89eadc8cc7e9520f0e27b9fe4
CRs-Fixed: 2466999
2019-06-18 22:27:45 -07:00
Tiger Yu
6f1fc0070f qcacmn: Add support for TCP delayed ack in driver
qcacld-2.0 to qcacmn propagation

This change adds support for driver supported TCP
delayed ack to increase TCP RX performance in
third-party platform which don't support kernel
TCP delayed ack feature.

TCP delayed ack is dependent on count and timer
values. Whatever is achieved first will trigger
sending TCP ack.

This feature can be controlled through ini values.
gDriverDelAckTimerValue - timer value in ms
gDriverDelAckPktCount - delayed ack count
gDriverDelAckEnable - enable/disable feature

Change-Id: I8105bbb90965295b5a4aefeb00d344a90155974d
CRs-fixed: 2414231
2019-05-28 03:46:49 -07:00
hangtian
cedfac0a1d qcacmn: Add stop_th and start_th for tx flow control V1
Add stop_th and start_th for QCA_LL_TX_FLOW_CONTROL_V2 disabled
platform, which is pdev based tx_desc pool. Change pdev tx_desc pool
size from 1056 to 900, default stop_th is 15% start_th is 25%, this
setting is exactly same as QCA_LL_TX_FLOW_CONTROL_V2. Pause netif tx
queues for all vdevs when stop_th reached instead of dropping frames.
Reduce pdev pool size could significantly reduce firmware wmm drop. Both
of host and firmware frame dropps lead to bad TCP throughput.

Change-Id: I77daf8c9fdef624f8ec479885b7705deb1fef142
CRs-Fixed: 2437471
2019-04-28 18:46:42 -07:00
Mohit Khanna
6d22eeb468 qcacmn: Tx desc alloc: remove default wakeup action
When the status is FLOW_POOL_ACTIVE_PAUSED, all queues are expected to
be paused. Still some on the fly packet can make it to the driver. In
such a case, the function dp_tx_desc_alloc takes a default action of
WLAN_WAKE_NON_PRIORITY_QUEUE. This is incorrect, since it will wake all
non priority queues, when they should be paused.
Make default action as WLAN_NETIF_ACTION_TYPE_NONE. If this is the
action to be taken, donot call the pause_cb from dp_tx_desc_alloc.

Rate limit log levels in case dp_tx_desc_alloc fails.

Change-Id: I1ef3018e90576d2c3aaa0d10d56e9b155681271b
CRs-Fixed: 2421813
2019-04-08 22:01:47 -07:00
Srinivas Girigowda
2751b6d2b3 qcacmn: Consolidate multiple MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
Consolidate multiple (redundant) MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
CDP_MAC_ADDR_LEN
OL_TXRX_MAC_ADDR_LEN
DP_MAC_ADDR_LEN
HTT_MAC_ADDR_LEN
IEEE80211_ADDR_LEN
DEFRAG_IEEE80211_ADDR_LEN
ETHER_ADDR_LEN
HAL_MAC_ADDR_LEN
WLAN_MACADDR_LEN

CRs-Fixed: 2406591
Change-Id: I4a87f8ff556920c7b341bdbba99ec43c97b873f4
2019-03-28 16:50:32 -07:00
Manjunathappa Prakash
09387ef63c qcacmn: Add peer debug ID for unmap_timer_work peer reference
There is race when unamp_timer_work and peer is deleted. Hold the
reference to peer while handling the peer_unmap_timer_work.
Add new peer debug_ID for unmap_timer_work.

Change-Id: Ibfd5de602883d3219d1e634ef74ff04e7914efb4
CRs-Fixed: 2383778
2019-01-22 02:37:56 -08:00
jitiphil
60ac9aa036 qcacmn: Add legacy DP CFG items and APIs
Add the basic infra for legacy DP CFG items and the APIs to be used from
other components.

Change-Id: Iec1718f0a93fcb91061892b96ae6ae88174df9ee
CRs-Fixed: 2328481
2018-10-11 08:56:51 -07:00
chenguo
f44ac20b0c qcacmn: AC based TX flow control
Implement per access category flow control. Make sure lower AC
traffic, such as BE, will not starve higher AC, such as VI and VO,
traffic inside a single vdev.

This change is part of FR49094

Change-Id: I6aa15832eb48e8f3ada00eb29a7bc00999edaafd
CRs-Fixed: 2304436
2018-10-02 15:37:17 -07:00
Manjunathappa Prakash
d0fc0ea364 qcacmn: Add more debug_ids and reduce the dump log level
Add more debug IDs to narrow down further funciton who is holding peer
reference. Reduce the peer debug dump log level to avoid side effects of
console logging.

Change-Id: I9820c72bcde8a0c2b0e779cf322e1133ef8a43e6
CRs-Fixed: 2303069
2018-09-01 01:42:42 -07:00
Jinwei Chen
4673310fba qcacmn: add rx data invalid peer indication
Currently there is no callback for MCL DP to do further action
when receiving data with invalid peer, add it for further processing.

Change-Id: I07c93b5119f0c1a46abba587b6b18c7b691683c7
CRs-Fixed: 2299489
2018-08-28 09:15:02 -07:00
Abhishek Singh
46cb680595 qcacmn: Add cdp peer debug id type for ccmp replay detection
Add PEER_DEBUG_ID_WMA_CCMP_REPLAY_ATTACK, to be used during
ccmp replay detection to get the peer ref count.

Change-Id: I6159556db959f447edcf75a5f64d398cbe544a80
CRs-Fixed: 2264963
2018-06-22 17:29:09 -07:00
Manjunathappa Prakash
9eaa6f099b qcacmn: Remove redefinition of *tx_flow_control_fp
ol_txrx_tx_flow_control_fp and ol_txrx_tx_flow_control_is_pause_fp are
redefined dp/inc/cdp_txrx_mob_def.h, original definition is in
dp/inc/cdp_txrx_cmn_struct.h. Remove duplicate redefinition.

Change-Id: I2c2af59d8b24360cd09efeb12ea19c0340771bb8
CRs-Fixed: 2215678
2018-04-04 04:02:08 -07:00
Sravan Kumar Kairam
58e0adfb53 qcacmn: Add support for WLAN-IPA WDI2 with SMMU Stage 1
Update WLAN-IPA WDI-2 datapath for DMA buffer sharing with SMMU
Stage 1 translation support. When SMMU Stage 1 is enabled DMA
APIs return IO virtual address(IOVA) instead of physical address.
This IOVA need to mapped to physical address by IPA module
before accessing them.

Change-Id: I33082bc74760b0f12c348238c6f48f5ce5750172
CRS-Fixed: 2072953
2018-03-19 09:34:39 -07:00
Jiachao Wu
5c20975544 qcacmn: Wrapping remove_peers_for_vdev_no_lock
* Wrap ol_txrx_vdev_peer_remove_cb, so that upper layer can invoke it.
* Remove roam_synch_in_progress from ol_txrx_vdev_peer_remove_cb.
  roam_synch_in_progress is a parameter of ol_txrx_vdev_peer_remove_cb,
  But invoker cannot pass value to it. And it is concept of wma, it's
  improper in cdp.

Change-Id: I6fa6c1b2df4919ad34ec931c4217bec0eefb2eac
CRs-Fixed: 2176165
2018-02-05 01:31:28 -08:00
Jingxiang Ge
7081c12040 qcacmn: Add PEER_DEBUG_ID_OL_RX_THREAD
Add PEER_DEBUG_ID_OL_RX_THREAD to track caller from
rx thread.

Change-Id: I0e0086e264fa2a6f4879f5c6aa90e7ffb6272416
CRs-Fixed: 2169630
2018-01-19 03:55:17 -08:00
Mohit Khanna
adfe908a35 qcacmn: Add peer APIs to get and release peer ref
The existing peer API cdp_peer_find_by_add does not maintain any peer
references. So a peer which is returned by the API may get deleted in a
different context. This may lead to access to a already deleted memory.

Fix the issue by introducing new APIs "peer_get_ref" and
"peer_release_ref" which make sure the peer is valid until it is
"released" (peer_release_ref is called).

Change-Id: Id04d13bc6a1b8a55c1ae9246077f64ffb86de3d8
CRs-Fixed: 2146742
2017-12-12 17:57:32 -08:00
Venkata Sharath Chandra Manchala
5fd835b44b qcacmn: Cleanup unused typedef variables
Remove unused typedef rx_callback_fp in
datapath flow.

Change-Id: Ie40f8ab02a1437d2c86aadb2f35f5f548f00f1bc
CRs-Fixed: 2123478
2017-10-12 14:22:00 -07:00
Rakesh Pillai
d339c2d2d7 qcacmn: Add netif action type for HI PRIO queue
ARP packets will not get chance to be transmitted if
netif queues are paused due to low tx descriptor availability.
Send ARP packets from HI PRIO queue so that it can be transmitted
in noisy environment.

Add netif action type for HI PRIO queue.

Change-Id: If3fea405bed07823f11b505f9a6627a3f14c343a
CRs-Fixed: 2083277
2017-09-28 01:57:30 -07:00
bings
4dcaf8b239 qcacmn: Fix race condition that Tx is paused by flow control forever
When hdd_get_tx_resource is called, if free Tx desc is lower than low water
mark, vdev->os_q_paused will be set as 1 and WLAN_STOP_ALL_NETIF_QUEUE will
be triggered after a while. Before WLAN_STOP_ALL_NETIF_QUEUE is triggered,
if ol_tx_flow_ct_unpause_os_q is called, WLAN_WAKE_ALL_NETIF_QUEUE will be
triggered and vdev->os_q_paused will be set as 0. In such case there will
be no flow control unpaused forever.

Tx should be paused by flow control when Tx desc is lower than low water
mark, and unpaused when Tx desc is bigger than high water mark or Tx is
already paused by flow control.

Change-Id: Ib60139fd94a4fb88c92a7f8aaf886ae9d3ca4c75
CRs-Fixed: 2090475
2017-08-23 22:07:26 -07:00
Yun Park
fde6b9e551 qcacmn: Enable WLAN host data path support for IPA WDI3.0
Change to support WLAN Napier host autonomy data path architecture.

Change-Id: I07f7592d547bb796a3c12bbc4745cee22e2c0022
CRs-Fixed: 2064810
2017-08-07 17:47:38 -07:00
Manjunathappa Prakash
ced7ea6cf2 qcacmn: Add changes for Napier flow control
Adds support for flow control on convergence branch.
Allocate Tx descriptors dynamically when vdev comes up.
Tx queue is paused and unpaused internally in host based on the
stop and start thresholds.
Changes are added under compilation flag QCA_LL_TX_FLOW_CONTROL_V2.

Change-Id: I0ccb80b0099f39efad52ccd7d47f2709fdee2a93
CRs-Fixed: 2040457
2017-07-18 23:35:05 -07:00
Venkata Sharath Chandra Manchala
a405eb741b qcacmn: Add dump stats feature for Lithium
Add support for dump statistics in Lithium.
Statistics include:
	1. Tx path packet flow
	2. Tx Histogram stats per interrupt
	3. Rx path packet flow
	4. Rx Histogram stats per interrupt

Change-Id: I7f399b717a9fb29a3d6ab672b669c6e323f61e27
CRs-Fixed: 2023386
2017-04-11 11:04:37 -07:00
Mohit Khanna
518eb5092e qcacmn: Add NAPI statistics to dumpstats
Currently NAPI stats are retrieved as a part of iwpriv getStats command.
The buffer available for this command is limited and NAPI stats get
trucncated.

Add a new dumpStats parameter (9) to dump NAPI stats.

Change-Id: Iaf52a3dcecac2f7b24fde2f8220fbfddc767965b
CRs-Fixed: 1076563
2017-04-11 11:04:27 -07:00
gbian
630ed5a9bc qcacmn: Add ini keys for WRR tx scheduler tuning
qcacld-2.0 to qcacmn propagation

Add below four keys to allow user to tune WRR TX scheduler params.
Each key is mapping to one AC defined in data path module through
OL_TX_SCHED_WRR_ADV_CAT_CFG_SPEC.
	gEnableTxSchedWrrBE
	gEnableTxSchedWrrBK
	gEnableTxSchedWrrVI
	gEnableTxSchedWrrVO

Change-Id: I5c34b604297d83673ea065243cc58c3f2180ff3e
CRs-Fixed: 1020141
2017-02-08 03:08:07 -08:00
Leo Chang
db6358c42f qcacmn: add cdp wrapper for mobile device compile
add cdp wrapper for mobile device data path compile

Change-Id: I05a6c58056f8884915580c074efa81a5a28f71be
CRs-fixed: 1075597
2016-11-17 19:13:02 -08:00