Commit Graph

269 次程式碼提交

作者 SHA1 備註 提交日期
Aniruddha Paul
f9d2c0f54e qcacmn: Add common framework for mon filters
A framework is added where the filters for every
mode are stored on a radio instance. Whenever a mode comes
up, it stores the filters in the radio and calls a
common API which iterates through all the enabled
mode filters and loops through them to create a
superset of filters which is sent to HTT.

This framework can be extended for new feature addition
which set filters for the monitor status and monitor
destination rings.

Change-Id: I9b739af2086bbe261b65c57af0a5bd867294f30f
CRs-Fixed: 2585872
2020-02-03 04:23:05 -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
Tallapragada Kalyan
fa6f80fcad qcacmn: use proper HAL abtraction APIs to get WBM internal error
the current HAL API is to read the WBM internal error
bit from the wbm release ring descriptor is always taking
HKv1 HW structure. But the wbm_internal_error bit
placement has changed from HKv2, for this reason we have
to use target specific HAL API.

Change-Id: I44789180754ca21ae59650b6d8620321a1f12569
2020-01-15 01:30:23 -08:00
Jinwei Chen
0181445b71 qcacmn: fix dp_tx_desc invalid accessing due to race condition
crash scenario:
  a. dp_tx_vdev_detach will reset the vdev of TX desc to NULL
by dp_tx_desc_flush.
  b. in the meantime, if TX completion is coming and when all TX desc
is recycled, the pool will be freed if pool status is invalid before.
  c. invalid TX desc accessing will happen in (a).

add TX desc pool lock protection in dp_tx_desc_flush.

Change-Id: I65c570aa6a3044a478dbe51bbf396cf24612f675
CRs-Fixed: 2595755
2020-01-04 22:12:21 -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
Tiger Yu
dc29b1f9d7 qcacmn: Limit logging when handling tx comp status if vdev is NULL
Use dp_info_rl instead of QDF_TRACE when handling tx completion status to
avoid excessive logging when vdev is destroyed in the another thread.

Change-Id: I1044c6d747ba1c7036664fe0265ec4855b7b4c47
CRs-Fixed: 2591486
2019-12-25 01:51:21 -08:00
Venkata Sharath Chandra Manchala
d62af87cc1 qcacmn: Increment/Decrement num_tx_outstanding
Increment pdev->num_tx_outstanding when
tx_desc is allocated and decrement tx_desc when tx_desc
is released. During runtime pm suspend, WOW PAUSE
is sent to firmware only if there are no
pending num_tx_outstanding descriptors.

Change-Id: I54aaa4d8a37b8cd47de1701a315bb0735c9739d2
CRs-Fixed: 2567689
2019-12-01 19:17:39 -08:00
Jinwei Chen
a9d46ad930 qcacmn: remove assert for invalid release source case
Remove host assert when receiving invalid release source entry from
WBM2SW0 ring.

Change-Id: Iae62ce3008024c55c1dde79e4dd0cd93d7e6f5a4
CRs-Fixed: 2571826
2019-12-01 19:17:10 -08:00
Mainak Sen
8bc9b42eb3 qcacmn: Loopback check for ucast frame after hmmc
Add a check to drop unicast frame being sent to same originating
VAP after hmmc conversion of IGMP control packets

Change-Id: Ic25812a7848af793075a0cb483100ebcf59d85b2
2019-12-01 19:16:31 -08:00
Rakesh Pillai
74368919c5 qcacmn: Ratelimit the tso descriptor alloc failure
In cases were all the tso tx descriptors are outstanding,
the alloc for any subsequent tso packet will fail.
This failure to get a tso tx descriptor floods the
console with failure logs.

Ratelimit the tso descriptor allocation failure and
increment the alloc failure in stats to get the exact
number of times the allocation failed.

CRs-Fixed: 2572580
Change-Id: I789788b917421be99df5435ad858d715ef0f5c8e
2019-12-01 17:42:07 -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
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
Pavankumar Nandeshwar
b86ddaf205 qcacmn: Handle wbm_internal_error in tx completions
Handle wbm_internal_error in tx completions by releasing
associated descriptors and buffers.

Change-Id: I94d334c90c0514674323430fe53da72fb5424576
2019-10-23 10:32:33 -07:00
Himanshu Batra
2c5c1e9a43 qcacmn: Resume HW enqueue for TX desc for ME case if HW enqueue fails
In the present scenario, in case of Multicast Enhancement when
the multicast packet is received the packet is converted to
unicast packet and send to list of clients in the hyfi table.
During conversion descriptors get allocated from ME pool
for each client and the Tx MSDU descriptor is send to HW
for transmit. On TX completion descriptors are freed and
added back to ME pool.

But if the HW enqueue is failed then the current TX descriptor
is freed and added back to ME pool. But the remaining descriptor
are neither retried nor freed thus resulting in Host Asserted
Crash.

So, adding a fix that if the HW enqueue is failed for ME packet,
free that descriptor and retry HW enqueuing for the remaining
descriptors.

Change-Id: Ibfeb1b07ee8fab4bf066689d0258bb23fb2aa9f8
CRs-Fixed: 2545818
2019-10-22 10:57:32 -07:00
Venkata Sharath Chandra Manchala
38e84d2722 qcacmn: Add hal_tx_desc_set_mesh_en API
Implement hal_tx_desc_set_mesh_en API
based on the chipset as
the macro to set mesh_en value is
chipset dependent.

Change-Id: I43c85e4ed6fd4f9992de5b71857cdb8becd1dd36
CRs-Fixed: 2522133
2019-10-17 15:10:04 -07:00
Sravan Kumar Kairam
78b01a1e1b qcacmn: Flush srng tp and hp only for flush event
Currently after runtime resume all SW2TCL data and reo cmd
srng rings hp and tp value are flushed. In case of IPA
offload case SW2TCL3 righ hp value will be updated by IPA
and not by host. In case of runtime pm enable host is
setting the value to zero as part of runtime resume which
results in incorrect hp value of SW2TCL3. As part of this
change set flush event for rings which are accessed by host
during link down state and after runtime resume flush the
rings for which flush event is set.

Change-Id: I5c9afa708277cf3a6e6d5ef99447bc21f88cfdcf
CRs-Fixed: 2514621
2019-10-12 22:16:04 -07:00
Ruben Columbus
da4d1b37e3 qcacmn: tx completion handler with invalid release source
added stats counter to check invalid release reason other than
FW and TQM in tx completion path.
added assert to make sure host is not releasing descriptors with NULL
address.

Change-Id: I3a30bd0f0c3954ed6435489d9b21f16201d1b840
2019-09-29 04:50:13 -07:00
Chaithanya Garrepalli
0e8f23f3a4 qcacmn: fix double free of ME ext buffer
Fix double free of ME buffer in enqueue failed
case

Change-Id: Idf79bff6bd0ffea92dba39a2f7ec6da64a4e193d
CRs-fixed: 2532803
2019-09-28 23:40:48 -07:00
Subhranil Choudhury
5985716a66 qcacmn: Add correct ast-idx in the Tx Descriptor
Add ast-index instead of ast hash value in the transmit
descriptor as specified by Hardware team.

Change-Id: Id5965d6f41aa89af7680ad6f45d1611631ffcff4
2019-09-23 10:40:23 -07:00
Subhranil Choudhury
4ee1b5e28d qcacmn: Add cache-set-num in HKv2 Tx path
Add the infrastructure to add cache-set-num field in
tx descriptor of HKv2.

Change-Id: Iec9423c3c90f868341b56ced795cd0bb73c9766a
2019-09-15 22:48:47 -07:00
Mainak Sen
f3053eb1d1 qcacmn: Add fields for Tx TQM and FW exception drops
VoW stats should contain fields to count TQM and FW exception
drops

Change-Id: I71a81b8e9cc9428b5c727d77c0eeec5bb23a2b42
2019-09-09 07:08:34 -07:00
Prathyusha Guduri
fafd2480fb qcacmn: Fix tx_errors interface stats
tx_failed is not updated from ppdu completions owing to HW limitation.
Hence update tx_failed from data path

Change-Id: I808223005047af9b474ce423caac27fd9a83677e
2019-08-21 02:59:41 -07:00
Varsha Mishra
06b91d3db8 qcacmn: Make send_msdu_single a non-static function
send_msdu_single is required in other files, hence making it
non-static.

Change-Id: I7cf876fe7a940c90aeafce15b0112bbe93a8760b
2019-08-11 14:09:34 -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
Jinwei Chen
752e4917f1 qcacmn: add DMA address validity checking for TX data
HW access to MSDU link Ext descriptor with NULL address,
whie from host MSDU Ext pool and related ring entry history,
not find NULL address recorded. In case the MSDU Ext descriptor
has been overwritten before issue happened, add DMA address
validity checking in MSDU Ext descriptor filled from TSO
segment fragments and also buffer address in ring entry.

Change-Id: I11dc1d0211530a5f01b515473b2458df15a5f4cc
CRs-Fixed: 2498359
2019-08-05 06:13:01 -07:00
Varsha Mishra
1530697064 qcacmn: Define new lock to access special peer list
Define new lock to access special peer list and make
a function static.

Change-Id: If2ddfc4ad3384a78c96618f79bebfd9f6192f50c
2019-08-02 00:43:53 -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
Prathyusha Guduri
f1f12acb9c qcacmn: Add tx desc device limit
Limit the total number of tx descriptors allocated using tx_device_limit
ini configurable parameter.

Change-Id: I00b4aa089b235e45bc6c445c57ce32b977d872c3
2019-07-29 04:31:09 -07:00
Akshay Kosigi
8eda31cab3 qcacmn: Remove void ptr usage in HAL
Add code to replace usage of void pointers from
HAL layer and instead use appropriate opaque pointers

Change-Id: Id950bd9130a99014305738937aed736cf0144aca
CRs-Fixed: 2487250
2019-07-27 13:43:07 -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
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
Shashikala Prabhu
ae2a8a6d88 qcacmn: Fix compilation errors for mesh mode feature disable
Fix compilation errors for mesh mode feature disable.

Change-Id: I8dfb401791109099a84d9c40417afddc9be6c7c7
CRs-Fixed: 2495095
2019-07-24 21:43:32 -07:00
Ankit Kumar
0ead45c2d7 qcacmn: Call log handler in case of HTT command/event
htt_command_record, htt_event_record, htt_wbm_event_record
function is used to log command,event, wbm event to
in-memory data-structure.
We call these function from htt path.

Change-Id: Ib3e18b895485c84f0010f8c3ba95c2da85b00bde
CRs-Fixed: 2428742
2019-07-09 18:51:21 -07:00
Prathyusha Guduri
1ad9ff9026 qcacmn: Correct tx_encap_type check
In exception path correct tx_encap_type check

Change-Id: I777202f593d4f37b2d51f5c4c9d6cd3e183e911a
2019-07-03 08:56:17 -07:00
Chaitanya Kiran Godavarthi
8c880d3fd2 qcacmn: Handle AP and STA Tx stats separately
AP and STA stats need to be handled separately.

Change-Id: I105856d6d4ee39a116966eb3ff47775b54f08ef4
2019-07-01 22:30:58 -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
Tallapragada Kalyan
f3af8bb319 qcacmn: unmap raw mode nbufs in failure cases
currently we are not unmapping the nbuf which was
already mapped in dp_tx_raw_prepare in failure cases
We always need to unmap and free the nbuf if its mapped.

Change-Id: Ia5e6a31a7aac356a934ff2496d0542039bc3ece7
CRs-Fixed: 2462518
2019-06-14 18:19:45 -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
Ankit Kumar
2972a24c55 qcacmn: Ignore raw frame if is not of type Data
Non raw traffic gets enqueued to VAP in raw mode
and incorrect fc.type causes HW fault.
Lets proceed only if raw frame is of type data.

Change-Id: I9f0d608cd1b319feb9af642969b258aab813645f
CRs-Fixed: 2434391
2019-06-04 02:42:23 -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
Amir Patel
cb99026ade qcacmn: Move WDS feature out of common code
Move WDS feature specific APIs out of common code
as these features are WIN specific. Keep the usage inside
common code under feature specific flags.

Change-Id: Id907a5e22c27fc47e8314449e154525684a27e85
2019-05-29 11:08:21 -07:00
Chaithanya Garrepalli
ab234e56f6 qcacmn: Add Cached Descriptor support for DP SRNGs
Add support to configure any HAL SRNG descriptor to
be allocated from cached memory area. This is to
optimize of CPU cycles spent on uncached
memory accesses. Also added prefetch of cached
descriptors

Change-Id: I2544e8596d48e2f5549bf687a764c16d73397545
CRs-fixed: 2267945
2019-05-29 11:08:12 -07:00
Sravan Kumar Kairam
9d6aceacb4 qcacmn: Retain the correct file copyright years
As part of Change-Id: I0dc410ae2e7c9df58ef53e3f20ca7979d086659e
for file dp_tx.c copyright years changed wrongly. So retain the
original copyright years.

Change-Id: Ib3e918744183bc59250590bc33dc7de75b1c38fb
CRs-Fixed: 2451733
2019-05-21 06:14:25 -07:00
Chaithanya Garrepalli
ef40fec41d Revert "qcacmn: Flush ME desc while mcast enhancement disable"
This reverts Change-Id: Ieeaab082d09135b4c803d68041ebf9b4bf7bb144

Change-Id: I4d4b07ae357cffea24c2975445120df79cbddc0d
CRs-fixed: 2444484
2019-05-20 16:55:49 -07:00
Pamidipati, Vijay
480c931d7e qcacmn: Raw mode AMSDU check
Add check for AMSDU for raw mode HW WAR

Change-Id: I4c6bfbed9f01c1d28a9e7ab75a0181d1d18635e6
CRs-Fixed: 2266916
2019-05-20 13:40:51 -07:00
Jinwei Chen
79b4fc80bf qcacmn: Fix TX Desc invalid accessing when process TX completion
In some corner case, host has done Vdev destroy and TX desc flush
since there is pending outstanding TX data on this vdev, but later
FW/HW still indicate the TX completion to host and which likely
these TX completion get delayed, conflict happened due to same TX
Desc accessing.

To fix it:
(1) Only reset TX desc Vdev to NULL in dp_tx_vdev_detach().
(2) Do more enhancement in dp_tx_comp_handler() to avoid
    invalid Vdev accessing.
(3) Do TX desc flush in dp_tx_pdev_detach().

Change-Id: I44cce9451e4f07fed6e21a9cd3fc0eaefa3d54c2
CRs-Fixed: 2441455
2019-05-20 13:40:48 -07:00