Графік комітів

380 Коміти

Автор SHA1 Повідомлення Дата
Chaithanya Garrepalli
49e18cfe2a qcacmn: DP Tx changes for QCN9224
Changes for DP tx for QCN9224

Change-Id: I7010aef55dc6e8bedfa1c44fe6baa1baa55c32c9
2021-08-13 12:04:02 -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
Harsh Kumar Bijlani
43da5b8892 qcacmn: Add API for unmap with physical and virtual addr of nbuf
Tx data transfer in host mode with nbuf map_unmap debug frmwk
enabled and enhanced stats disabled results in an assert.
This is because on Tx completion path, nbuf unmap is done using API
qdf_mem_unmap_nbytes_single which takes physical address of nbuf
for unmap and does not remove nbuf from map_unmap tracking list and
when nbuf is freed, it results in assert as the tracking list still
contains that nbuf entry.

In order to fix this, define a new API for nbuf unmap passing physical
and virtual address of nbuf as arguments. Physical address is passed
as an argument in order to avoid cache miss in per packet path which
eventually helps in improving the KPI.

Change-Id: I77ab6ac3ac98556b9caff8aa3ee82bc23cd26de7
CRs-Fixed: 3006671
2021-08-09 22:25:29 -07:00
Chaithanya Garrepalli
386738a312 qcacmn: fix the tx desc leak issue
Fix the tx desc leak issue in case of hw enqueue failure
with ME and TSO

Change-Id: Id142a3522ec6c9e25d2cc19f373e1a92de425e5a
2021-08-04 18:04:28 -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
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
Jia Ding
9304c2d00e qcacmn: Add support to calculate uplink delay
Add support to calculate uplink delay on a per vdev basis.
The delay calculated excludes bus delays, where packet
enqueueing time and complete time are fetched from HW release
ring.

Change-Id: I4bbcbf28b197f7a87cb822a841f1f957ebcf063b
CRs-Fixed: 2958833
2021-07-21 21:08:48 -07:00
Ruben Columbus
1be92c16c8 qcacmn: correct tid boundaries on error
add >= sign on values of tid where DP_MAX_TIDS is missused

Change-Id: Ib50f65705835f69ff3ca5c2b2a3edb7f8064adeb
2021-07-02 11:44:12 -07:00
Mohit Khanna
af887c113d qcacmn: Changes to Init TX Rings for BE
DP/CFG changes to initialize extra TX/TX Comp Rings in BE.

CRs-Fixed: 2937302
Change-Id: Ia8a8ed717eb0e1bfa9d2e1ff917941a7ea91bc28
2021-06-30 13:49:03 -07:00
Rakesh Pillai
813b3bb474 qcacmn: Add near-full irq handler for TX completion ring
Add the handler to process the near-full condition
on the tx completion ring.

Change-Id: I547cd27d2a8a347fca1cebc6b27072f2d1d8a99d
CRs-Fixed: 2965081
2021-06-30 13:48:13 -07:00
Chaithanya Garrepalli
9988a35c3f qcacmn: do not process tx comp after quota is exhausted
If number of entries available in tx comp ring are more
than quota then process number of entries as per quota

Change-Id: I6345cb6f7cee62c343d152f42beb15460ce02ef1
2021-06-16 16:51:03 -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
27212c73fe qcacmn: Fix possible OOB access for tx_hw_desc_history
Memory allocated for tx_hw_desc_history uses incorrect
size parameter resulting in much lower memory to get
assigned. This will result in OOB access and corruptions
in memory, regions post the trailing boundary when updating
tx hw desc events via dp_tx_hw_desc_update_evt.

Fix is to use the appropriate memory size for tx_hw_desc_history
and add NULL check in dp_tx_hw_desc_update_evt.

Change-Id: I97af7898cf8bf1b24978d559f84a2a3d00227ed8
CRs-Fixed: 2952859
2021-05-27 13:41:49 -07:00
Karthik Kantamneni
28ef474a07 qcacmn: Fix compilation error for modulo operator
In some of the targets modulo operator assembly API's
are not defined causing compilation error.
To avoid this use qdf based API's for modulo operations.

Change-Id: Ibc69b69aa38cadff5daa8dee8b65ceaacfe997b7
CRs-Fixed: 2940281
2021-05-10 09:03:07 -07:00
Vevek Venkatesan
97c53c4877 qcacmn: add Tx descriptor history in Tx and comp rings
Add the history support to log Tx descriptors programmed
in Tx and completion HW rings.

Change-Id: I60954c93e2595e7dad1251c459eed8afc761e917
CRs-Fixed: 2924614
2021-05-06 13:49:54 -07:00
Karthik Kantamneni
c68ad7037a qcacmn: Add TX descriptor history support
Add history to log HW TX descriptors programmed in TX ring.

Change-Id: Ia17e5557115f20508ed22c045941c0645c46ef1d
CRs-Fixed: 2928996
2021-05-05 00:54:13 -07:00
Amit Mehta
4982427333 qcacmn: Rate limit excessive logging in case of HW enqueue failure
Currently, excess logging is causing a crash when enqueuing
of Tx MSDU descriptor to HW failed.

Rate limiting the log messages to avoid the crash.

Change-Id: Ibb230ce03c23518b6f7feda61a49bf155c7ddc69
CRs-Fixed: 2933002
2021-04-29 01:45:27 -07:00
nobelj
20a3940590 qcacmn: Add fix to support proxy arp function call
a call to osif_proxy_arp need to be invoked inside UMAC_SUPPORT_PROXY_ARP
as it was protected under build macro UMAC_SUPPORT_PROXY_ARP.

Change-Id: I6e165a328ac65fb659cb9fbc3a0ce39fcbb6744b
2021-04-14 18:08:30 -07:00
sandhu
30d75bfe8a qcacmn: Add Null check function pointer
Add NULL check for function pointer vdev->osif_proxy_arp .
Which is leading to a NULL pointer derefrence error.

Change-Id: I850d10da879231255970572487260e75fe2e3a78
CRs-Fixed: 2909911
2021-03-31 17:12:07 -07:00
Karthik Kantamneni
65b108ef77 qcacmn: Rate limit excess logs in Tx completion path
Rate limit excess logs in Tx descriptor completion path

Change-Id: I737e0e55c2032f89a002adb60fbb68932bef77e0
CRs-Fixed: 2893995
2021-03-13 03:36:10 -08:00
Chaithanya Garrepalli
76112c241f qcacmn: fix use after free of tx descriptor
In dp_tx_send_msdu_multiple API fix use after
free of tx_desc in case of HW enqueue failed

Change-Id: Iec0375e394c706fa0c39ee18728ac1c02090461c
2021-03-02 14:22:45 -08:00
Vulupala Shashank Reddy
1065dc8179 qcacmn: Refactor compilation flag of pkt capture mode
Refactor WLAN_FEATURE_PKT_CAPTURE_LITHIUM to WLAN_FEATURE_PKT_CAPTURE_V2
to remove hardware name from compilation flag.

Change-Id: I5a30b33d8bd6065d12e7c89c666c2f0cab66344e
CRs-Fixed: 2869827
2021-02-11 00:24:33 -08:00
Manoj Ekbote
01ce9c0032 qcacmn: Unmap before changing skb data
In cases like Tx capture or per packet info, need to unmap
before skb is touched. Add wrapper function to do the same.

Change-Id: I0d13b2d90c80972f346f85960b1297511771516b
2021-02-01 15:30:15 -08:00
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
Chaithanya Garrepalli
a912add6c3 qcacmn: Fix duplicate tx buffer issue in send multiple
In tx send multiple API stop processing of msdu_info
when next segment is NULL

Change-Id: I9bc6a90987bb03c86b110d9398bc0188218a348d
2021-01-28 04:18:24 -08:00
Chaithanya Garrepalli
b2a9c0155b qcacmn: set nbuf next to NULL before calling ME convert API
ME code calls dp_tx_send_msdu_multiple API for Tx the converted
unicast packets. Set nbuf next to NULL before calling ME
convert API to avoid Tx of nbuf->next multiple times

Change-Id: Id063e227b56c494108dc23bd2fdbdc9c085ba4ab
2021-01-28 04:18:19 -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
phadiman
e4eda79524 qcacmn: Move multipass deinit to vdev detach
Multipass init is called from vdev attach and
multipass deinit is called from tx vdev detach

To maintain symmetry between init and deinit
move multipass deinit to vdev detch

CRs-Fixed: 2840338
Change-Id: I18657497b9e09ec5cc75d245765f6d0fd7d061fd
2021-01-12 14:34:45 -08:00
Rakesh Pillai
6ee7aeb0bd qcacmn: Avoid logging in packet transmission path
Currently if the driver is in runtime suspend/suspending
state, any packet transmission will request for resume
via hif_pm_runtime_get.

Unfortunately there is a logging in the above API which
will lead to more time consumption in the NET_TX softirq
context. This can lead to other delay in processing other
softirqs in the system.

Fix this by skipping the logging in the packet transmission
path.

Change-Id: Icc9f5b67794f7666243eb059f2e07a06a987002e
CRs-Fixed: 2844126
2021-01-12 14:34:40 -08:00
Chaithanya Garrepalli
3ab152450d qcacmn: fix print format compilation errors
Fix print format compilation errors and remove
no-format compilation flag

Change-Id: I69cd0c2eedaa4f2b4189275bf639f48a2fa6b80b
2021-01-07 23:29:09 -08:00
Ruben Columbus
60e9a2d116 qcacmn: add extra stats pdev and vdev lvl
stats added for descriptor alloc fail and tx outstanding too many

Change-Id: Ie2c676979f21e8f0ab217e8c666a8cdf3efbf7f1
2021-01-04 13:51:41 -08:00
Vulupala Shashank Reddy
0366025b7f qcacmn: Add WDI event for tx completion for packet capture mode
Add WDI event and call wdi event handler for tx completion for
packet capture mode.

Change-Id: I99225dda53effc6ab5a80a32aa8aa082543855b2
CRs-Fixed: 2844724
2020-12-24 09:52:38 -08:00
Chaithanya Garrepalli
078584f12d qcacmn: fix vdev ref leak in tx exception path
Fix vdev ref leak issue in SG processing in Tx exception path

Change-Id: I8416b738f0c583276ec341e66685de947e419e6c
2020-12-21 04:49:57 -08:00
Shikha Bakshi
7ae3ccdc47 qcacmn: Modify logs for QDF_MODULE_ID_DP_TX and QDF_MODULE_ID_DP_TX_COMP
Add macros like dp_tx_info, dp_tx_comp_info,
dp_tx_debug, dp_tx_comp_debug, dp_tx_err,
dp_tx_comp_err, etc.  to define logs

Change-Id: If0eef8112db1f8e99fb95ee943d5ddbff94425b8
CRs-Fixed: 2830563
2020-12-19 12:46:07 -08:00
phadiman
d1bb528ae7 qcacmn: Host Static Memory Optimization (in NSS offload mode)
Low memory profiles like 256M and 16M profiles support
only NSS Wi-Fi offload mode and HOST data path APIs are
not used in NSS offload mode

Disable HOST data path APIs which are not used in both
NSS Wi-Fi offload mode and in HOST mode (in NSS offload mode)

CRs-Fixed: 2831478
Change-Id: I6895054a6c96bd446c2df7761ce65feef662a3cc
2020-12-15 13:34:26 -08:00
Tallapragada Kalyan
e6b821c40b qcacmn: get length of nbuf after pushing the meta data in mesh mode
get length of nbuf and set it in tx_desc after pushing the
meta header in mesh mode

Change-Id: Ide563a339eae392c7b3f512526d02f7ec2d6c1df
2020-11-27 08:51:34 -08:00
Varsha Mishra
d4463d47d9 qcacmn: Use vdev based ast_idx and hash for all tx frames
FW uses CCE rule to exception all mcast/bcast frames. Ast_idx
override does not help in sending them to TQM directly.

Change-Id: Iad6c1e8073f5c5d0513adb7097d5024177b7b7f5
2020-11-26 14:44:39 -08:00
Rakesh Pillai
e9899b2a2f qcacmn: Add support to send packet marked by upper layer to FW
Upper layer (OS_IF) can mark certain packets to be sent
to FW. Mark such packets as exception, so that it is sent
to the FW.

Change-Id: I44af2b06793712be7236f831b6b2604123d72bb1
CRs-Fixed: 2813172
2020-11-24 10:55:42 -08:00
Ananya Gupta
28998adf14 qcacmn: Changing log level in dp_tx_msdu_multiple
Excessive logging was detected in dp_tx_msdu_multiple.
To fix this, Reduce log level when tx_hw_enqueue fails.

Change-Id: I66d58d12aff037896c7623c6755a443092673a88
CRs-Fixed: 2823453
2020-11-23 15:22:33 -08:00
sandhu
f39a270b60 qcacmn: Add function to convert Hw to qdf status
Enhance qdf tx rx to hw tx completion status mapping .Function
to convert Hw to qdf status.Add a additional func arg to qdf_dp_trace_ptr.
Add dummy func argument to existing qdf_dp_trace_ptr func calls.

Change-Id: I38865d63dc7383c55686d2d0187a262b3b6d5acc
CRs-Fixed: 2810601
2020-11-19 20:39:12 -08:00
Tallapragada Kalyan
b9d5c7d2b7 qcacmn: move the TX notify comp flag to MCL specific cb structure
The TX notify comp flag is used only by MCL, hence moving
to the MCL this field to the MCL specific cb private structure.

Change-Id: I707ab9252dea705552df9678eedd8501f479672e
2020-11-19 06:58:26 -08:00
Nisha Menon
4677d5bdf5 qcacmn: Memory stats for SKB usage and Tx desc cnt in datapath
Add sysfs node for DP level memory stats:
/sys/kernel/wifi/wlan/wlan_dp_mem_stats
These include Tx, Rx SKB memory allocated, Tx/Rx
buffer count, outstanding Tx desc count.

Change-Id: I839a5f2ec4e763ca11cdea2093368ca6dc52d8cf
CRs-Fixed: 2724460
2020-11-18 16:23:53 -08:00
Tallapragada Kalyan
c0396e72ea qcacmn: use qdf_nbuf_headlen API to get the length in TX path
currently qdf_nbuf_len is being used to get the length of
the tx pkt, but this API also interprets the nbuf CB field
to adjust the length if extra_frags are present.
The concept of extra_frags is applicable only for legacy
drivers but in lithium as cb is not reset in the driver the
qdf_nbuf_len API is mis-calculating the length if extra_frag
field in cb is set by any network stack protocol.
To avoid this qdf_nbuf_headlen API is used to get the length
of the TX pkt.

Change-Id: Ie1e0b4b2168daf93ae77f4c995f5c3476a27b433
2020-11-15 23:15:52 -08:00
Tallapragada Kalyan
c0d82e2d46 qcacmn: remove the additional intra-bss check for NAWDS in tx path
remove the additional intra-bss check for NAWDS in tx path
as it is a redundant check.

Change-Id: I92be5c615ac396939e2a6542af41aea158ffc05f
2020-11-15 23:15:48 -08:00
Mainak Sen
9f9dfdc2b4 qcacmn: Get dp vdev from HTT vdev id in MEC notify
In HTT MEC notification, wifi vdev should be mapped from
vdev_id provided in HTT WBM completion status word

Change-Id: Ic0a440efdbdc1ee99f27fb4797ee068599d06268
2020-11-12 08:08:02 -08:00
Ananya Gupta
0973853fd4 qcacmn: Change log level of null check for peer
Update log level of peer null check from err to info
in dp_tx_comp_process_tx_status as excessive logging
is detected.

CRs-Fixed: 2811236
Change-Id: I1b0ae723adb90b4b915f11479b5408fde147864c
2020-11-10 00:58:25 -08:00
Yu Tian
e8889ab6b7 qcacmn: Refine code about ME buf's freeing
Part of change in 3382883 are deleted
unintentionally. Add them back

Change-Id: I2d806c800f0a238e154297c2e1c3b2fd56608252
CRs-Fixed: 2813756
2020-11-08 20:53:45 -08:00
Yu Tian
41dc191a51 qcacmn: Perform TSO seg unmap when HW enqueue failed
TSO segment struct is not unmapped and TSO buffer is
not got freed in HW enqueue failure case handler.
Implement similar unmap and free handling as TX comp
handling.
Change-Id: I83389fcc97a2e99497011e9e878f665be88f9f04
CRs-Fixed: 2795836
2020-11-04 22:46:47 -08:00
Debasis Das
a420fc8730 qcacmn: Dont unmap cloned ME buf's before freeing
For ME, cloned nbuf's are not mapped.Hence,these
should not be unmapped before freeing.

Change-Id: I998cd4924781944754a81df7d3675c0a34dc10a0
2020-10-28 05:05:35 -07:00
Rakesh Pillai
b91fda62d9 qcacmn: Increment skb users for TSO pkt before enqueue of first segment
TSO packet segments are enqueued to the HW individually.
The skb users count is incremented for each additional
segment, so that it is freed only when the TX completion
for the last segment is received.

Currently the skb users is incremented for the additional
TSO segments after the previous segment has been enqueued
to the HW. Due to this, there is a chance for the tx
completion for the first TSO segment to be received even
before the skb users is incremented to account for the
remaining TSO segments, thereby leading to use-after-free
scenarios.

Fix this by incrementing the skb users for additional
TSO segment before enqueueing the previous TSO segment
to the HW.

Change-Id: Idebc28719ba6f0223d5454e15c3cde349803816e
CRs-Fixed: 2801777
2020-10-22 22:10:52 -07:00