Graf commitů

257 Commity

Autor SHA1 Zpráva Datum
aloksing
c60b9619a3 qcacmn: Conditionally compile monitor related features and issue fixes
PATCH[7/7]:
This patch consists following changes:
 -Conditionally compile all monitor destination ring related code
  Macro used QCA_MONITOR_PKT_SUPPORT
 -Add QCA_ENHANCED_STATS_SUPPORT macro to conditionally compile
  enhanced stats support
 -Use QCA_MCOPY_SUPPORT and QCA_TX_CAPTURE_SUPPORT macros
  to conditionally compile MCOPY and Tx capture features
  respectively
 -Use QCN_IE macro to conditionally compile BPR
  feature
 -Use QCA_ADVANCE_MON_FILTER_SUPPORT macro to conditionally
  compile advance monitor filter feature
 -Fix vdev attach issue for special and smart monitor vap
 -Fix status ring initialization issue.

Change-Id: I0deaa28a9a54bf34b0f41e6dd510fdd8d4992db2
CRs-Fixed: 2983780
2021-07-30 21:51:26 -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
Manoj Ekbote
190ff6c23e qcacmn: Retrieve BSS color from TLV
In Tx monitor code, BSS color needs to be retrieved
from the PPDU TLV so that it matches the value in
transmitted packet.

Change-Id: I6e1dce3992264ebea2db37b2d9c8f156a23df028
2021-07-11 02:15:44 -07:00
Vinay Adella
d86a4a60a2 qcacmn: Move NAPI stats to workqueue
When back pressure event comes from FW print NAPI stats in worker
theread to avoid cascading the issue by causing more latency in
processing the CE rings, due to the prints.

Change-Id: Ic846e06ae4b47f8ad46b269c8a175db7ed46b9bf
2021-07-06 11:55:17 -07:00
sandhu
9dc81d7965 qcacmn: Add HTT HTC tx completion based packet free
Add CE4 tx completion for htt htc packets. current logic
uses htt htc misc list to free packets.

Change-Id: Iea15d0dba544d3cc7581b11aa7ab7e5c0024133a
CRs-Fixed: 2630768
2021-05-17 18:56:02 -07:00
Yu Tian
73de559075 qcacmn: avoid of HTC buffer double free in HTC send failure case
HTC buffer is freed in enqueue failure case. Then it is requeued to
htt_htc_pkt_misclist also. In deinit flow, misclist entry should be
cleared, so buffer double free is hit in this stage. Make a change
to not requeue this frame to misclist.

Change-Id: I0211c4b548d7df7176ee72a83e21f8fcf7fa464c
CRs-Fixed: 2942972
2021-05-16 22:47:56 -07:00
Amir Patel
770ebeb20f qcacmn: Reduce log level to suppress print
For every channel change, a print is displayed onto console.
reduce log level to suppress print.

CRs-Fixed: 2921656
Change-Id: Ib300ecc17c09412aa6502cc45ec1c4b7da3b54ce
2021-05-11 05:54:28 -07:00
Chaithanya Garrepalli
970948916a qcacmn: print backpressure stats in work queue context
Avoid backpressure event prints in irq context and
defer work queue context

Change-Id: Ib68237d6a9930ead38f53aa89ec1d9e9a2f4147d
2021-04-29 14:29:33 -07:00
Ruben Columbus
5708cdac6f qcacmn: remove preamble from peer delayed stats
delete copy preamble from ppdu_desc to peer in data type case.
this will give mu_bar preamble of a data frame instead of ctrl frame.

this will not affect tx_capture given that preamble is copied to
phy_type in ppdu_desc from ppdu_desc preamble itself.

this should fix issue with pulling information from ppdu descriptor by
having data frames with low mcs. mcs was correct but preamble gave
impression that frame was a data but it was a ctrl frame.

Change-Id: Id82e6eb98af0e9488227bff43fc77f188eee77e3
2021-03-31 19:06:27 -07:00
Ruben Columbus
2216aa520b qcacmn: lock on queue
Adding lock for dp_txrx_ppdu_stats_handler given
that insertion and deletion happen in different cores.

Change-Id: Ic0102d615f02cbfed70acc1114a314426466638e
2021-03-18 13:47:18 -07:00
nobelj
5144f963ef qcacmn: Added field to get valid sequence number
sequence number populated from tlv are incorrect for some frames.
Firmware populate correct sequence number for management and control
frame either in payload or tlv itself.

added field to get valid sequence number.

Change-Id: I21b1c34c0d66cb46c3a0baaaa231c952de065534
2021-02-15 22:33:03 -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
Kai Chen
2667f112d8 qcacmn: Add CBF support for pktlog
Fix issue on enabling packet log.
Fix issue on logging CBF pkt in AP/STA mode.
Fix issue on setting data length 4 bytes aligned in pktlog header
, htt stats indication message header and Rx management TLV header.
Add CBF support for pktlog WMI enable command for firmware to enable
CBF receive.

Change-Id: Ib0067f32d7414be96503c4c67846c1312a59586e
2021-02-10 20:27:29 -08:00
Vijay Krishnan
4427314322 qcacmn: Setting up filters and destination ring for CBF logging
This change will set up monitor mode status and destination ring
filters for enbale CBF logging and will enable destination ring to
capture CBF frame. This change will get the CBF frame from the
destination ring and send it to the pktlog module for post processing
through WDI event. CBF is a compressed beamforming report.

Change-Id: I4cc419440ba8d60446dd1f01747340a89f023171
2021-01-29 16:48:58 -08:00
Ruben Columbus
2864444839 qcacmn: copying over mcs for delayed frames
mcs is copied over to already in used ppdu_desc
this prevents ppdu_desc to increase lower mcs counts during stats
process

Change-Id: Iec68438a86359ec791302ecf2eeaec4fbd941632
2021-01-26 01:36:40 -08:00
Surabhi Vishnoi
01c8d3f45f qcacmn: Add support for RX offload packets in packet capture mode
Add support to process RX offload packets in packet capture mode.
To distinguish rx offload packets from normal rx packets,
DP_PEER_METADATA_OFFLOAD bit is set in peer metadata, based on value
of this bit rx packet is delivered to stack or packet capture
component.

Change-Id: Ice656a0bc14efd0382c4949d695daa8e926ce41e
CRs-Fixed: 2856792
2021-01-22 16:12:18 -08:00
Tallapragada Kalyan
3ae6e993b4 qcacmn: add support for multi soc htt logger
add support for multi soc htt logger

Change-Id: Ic007fb2cdf8a504991b3e1b98cc49cb2a8246c52
2021-01-08 01:37:33 -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
Vulupala Shashank Reddy
86566328a2 qcacmn: Add WDI event for offload tx data for packet capture mode
Add WDI event and call wdi event handler to deliver offload tx
packets to packet capture mode.

Change-Id: I064ffaaebd13bcf2060d91c58a07b93ec741b133
CRs-Fixed: 2844731
2020-12-28 17:17:45 -08:00
Shikha Bakshi
f429625c5b qcacmn: Modify logs for QDF_MODULE_ID_DP_HTT
Add macros dp_htt_info, dp_htt_debug, dp_htt_err,etc. to define logs

Change-Id: I9226f3f7cabb4e861ff279ab239c6bc400a6c8cf
CRs-Fixed: 2830387
2020-12-18 09:36:38 -08:00
Neha Bisht
0e390d9bab qcacmn: Provide support for avg. phyrate stats
Provide support for average tx and rx phyrate statistics

Change-Id: Ib1c2d2c90ca6a8a0f1ac1bc08d9e1f89537cbb4d
2020-12-17 05:11:54 -08:00
Nandha Kishore Easwaran
1a0bc1efc4 qcacmn: Data path changes for big endian platform
Add reo ring descrptor swap in case of big endian platform.
Convert msi_data into little endian format before writing into
MSI_DATA register. Also change into little endian format while accessing
the shared LMAC registers.

Change-Id: I07f4ae4e6df4608201b63d325c2cbc37436d1592
2020-11-20 08:35:22 -08:00
Ananya Gupta
ea977dc41c qcacmn: Count htc packets failed or not freed in misclist
HTC packets were mapped but not unmapped or freed. As part of
hdd_wlan_stop_modules(), all nbufs will be freed in misclist
and TxQueue.
Adding debug change to count number of htc packets failed to
send and count number of nbufs in misclist are skipped when
freeing them.

Change-Id: I868621a67cf89d9b84e202843990f576973ec334
CRs-Fixed: 2807407
2020-11-09 00:57:56 -08:00
Shivani Soni
7eff827653 qcacmn: Update msg length for debugfs support for HTT stats
Update message length for debugfs support for HTT stats.
Max length will be 2048 to avoid mem leak issue.

Change-Id: I4688f4ae52d5dfc5317a1f8fe1ada334af2eb8c5
CRs-Fixed: 2792365
2020-10-14 03:25:13 -07:00
Yeshwanth Sriram Guntuka
b2fa2a1dbd qcacmn: Increment htc runtime cnt prior to hif_send_head
HTC runtime count is incremented after posting the HTT
ver req message to CE4. There could be possibility of
processing the ver response message from FW even before
htc_runtime_cnt is incremented. This can casue RTPM put
to not happen causing imbalance in get/put count.

Fix is to increment htc_runtime_cnt before enqueuing
the HTT message to CE.

Change-Id: Ib9b69910cd14193c41ecfee804b390f8a6cdef49
CRs-Fixed: 2794451
2020-10-12 15:06:33 -07:00
Yeshwanth Sriram Guntuka
478749a365 qcacmn: Do RTPM put during cleanup when HTT ver resp is not received
For HTT h2t message which has a response from FW, runtime
get is done in HTC layer and the corresponding runtime_put
is done as part of the HTT response processing. In a scenario
where the HTT response is not received from FW or not processed
by host, runtime_put is not done as part of cleanup and panic
is triggered due to get/put imbalance.

Fix is to do RTPM put as part of htc cleanup when the HTT
response from FW is not received or processed.

Change-Id: I17ccb7c3e2293c95f5f233d36c6ef38a75733cce
CRs-Fixed: 2779113
2020-10-02 10:37:14 -07:00
Manikanta Pubbisetty
2db8a92735 qcacmn: add FSE CMEM HTT response
CMEM FSE details like offset into CMEM where flow search table(FST)
is allocated and the size of the FST will be sent by the firmware
in response to FSE setup message. Adding the logic to parse the
response message and update the CMEM parameters in the SW FST.

Change-Id: Id1dd4b59be02c175da3fc6fcb5ed56e6f491133a
CRs-Fixed: 2771187
2020-09-17 10:18:19 -07:00
Yeshwanth Sriram Guntuka
fcdcc1005f qcacmn: Do not set pkt len to HTT_MAX_MSG_SIZE in PPDU ind handling
Skbs allocated for CE1 ring are of size 2048 bytes. On
receiving PPDU stats HTT message, skb is pulled for 8
bytes corresponding to the HTC header length. As part of
dp_ppdu_stats_ind_handler, skb len is set to HTT_MAX_MSG_SIZE.
In the case where skb allocation is exactly of 2048 bytes,
including HTC header length, the aforementioned set_len
causes the skb to be expanded due to lack of tailroom.
This causes the skb data pointer to be changed which results
in invalid memory access.

Fix is to remove the qdf_nbuf_set_pktlen as skb len is
appropriately set by HTC layer.

Change-Id: Ied68c30456dc0e263ccfd03102962233a0e43d9f
CRs-Fixed: 2777516
2020-09-17 00:21:57 -07:00
Srinivas Girigowda
a104d7b453 qcacmn: dp: Remove redundant __func__ from the logs
The logging macros implicitly takes care of embedding function name
in the log, hence there is no need to include __func__ again.
Getting rid of redundant __func__ reduces driver memory footprint.

Change-Id: I26bfac840ac6732ac83fb008db8e1702996eb21e
CRs-Fixed: 2774457
2020-09-15 02:45:47 -07:00
nobelj
a5219e6980 qcacmn: modify ppdu desc print log level
modify ppdu desc print that flooding the console

Change-Id: I30342dfade7967ac3bc7cb9740697fc09e4ade03
2020-09-09 14:03:55 -07:00
Yeshwanth Sriram Guntuka
aefb2ac3d4 qcacmn: Free nbuf from htt misc list only when magic pattern is set
In the scenario where htt packets fail to be transmitted to
FW, they are added in both endpoint tx queue and misc list.
On receiving FW down indication before these packets are sent
to FW, endpoint tx queue is flushed and nbufs are freed. Post
this, the aforementioned nbufs would be unmapped/freed again in
htt_htc_misc_pkt_pool_free causing panic.

Fix is to free the nbuf via misc pool free only when the magic
pattern is set.

Change-Id: Ie523a7ca0054eb4104a107b3bddd50cb9b585275
CRs-Fixed: 2762829
2020-08-31 17:21:26 -07:00
Shivani Soni
466f147d05 qcacmn: Debugfs support for HTT stats
Debugfs support for HTT stats under compile
time flag "HTT_STATS_DEBUGFS_SUPPORT".

Change-Id: I44c4f11265fdb3b9d53a9ac545e2945854bb9a57
CRs-Fixed: 2760947
2020-08-31 17:21:22 -07:00
Rhythm Patwa
3a1d8d64f7 qcacmn: Add support for Punctured Preamble PPDU count in tx stats
Add support to update the count of number of Punctured Preamble
PPDU's transmitted by the AP.

Change-Id: Id85a490e9e80566e639f48190a96d3107c6e5c61
CRs-fixed: 2755288
2020-08-27 18:37:12 -07:00
Chaithanya Garrepalli
ddc9e59e8f qcacmn: Add VDEV refcount debug support
Add debug support for VDEV refcount to take
refcount by module id and decrement corresponding
refcount with same module id

Change-Id: I15c075816994ba70155fefbc0bce208b20fb9a59
2020-08-20 10:07:32 -07:00
Chaithanya Garrepalli
a718007f03 qcacmn: increment vdev refcount for search by id
Add new API dp_vdev_get_ref_by_id() which will return vdev
pointer by holding a reference. Caller of this API has
to ensure that this reference is released by calling
dp_vdev_unref_delete() API

New lock soc->vdev_map_lock is introduced to protect
vdev id to object array

Change-Id: I883e328932e35ef31254125492dbae20cebe0e00
2020-08-20 10:07:28 -07:00
Ruben Columbus
f1973b22d7 qcacmn: Add fix to support frame control for MU ctrl frame
frame control for second and subsequent user are zero which overide the
master frame control. Added fix to update master frame control from user
position zero.

Change-Id: Ic0331dd5d486fbffa44d29c74b4f1f15414d0a65
2020-08-18 14:43:39 -07:00
Chaithanya Garrepalli
3ecfd5005c qcacmn: used id based search instead of mac search
As index based search is protected with refcnt now
reverting the changes which are added as a WAR to protect
peer memory

Change-Id: Iac837d45d0d4b2509bbf7d60401d9497c0d998b0
2020-08-15 01:26:29 -07:00
Chaithanya Garrepalli
fdc6a808ae qcacmn: add module id for peer reference
Add support to get the peer reference with module id

To help debug the peer reference related issues

Change-Id: Ie20c7e710b9784b52f2e0f3d7488509282528a00
2020-08-15 01:26:14 -07:00
Chaithanya Garrepalli
113841906c qcacmn: increment refcount for peer find by id
Use unified version of dp_peer_find_by_id API
which will take peer reference

Also use unified peer ref release API dp_peer_unref_delete

Change-Id: Ibb516a933020a42a5584dbbbba59f8d9b72dcaa4
2020-08-15 01:26:10 -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
Jia Ding
c07761e4cc qcacmn: Fix static code analysis issues in DP
In dp_srng_init, max_buffer_length and prefetch_timer are used
while uninitialized.

In dp_bucket_index, overrunning array cdp_sw_enq_delay leads to
out-of-bounds access.

In dp_rx_defrag_fraglist_insert, cur is first NULL checked but
cur is again set to qdf_nbuf_next and is accessed without
NULL check. Thus do a NULL check again before dereferencing
cur to avoid potential NULL pointer dereference.

In htt_t2h_stats_handler, soc could be NULL while cmn_init_done
is dereferenced. Thus fix it by NULL check soc first and then
dereference cmn_init_done.

Change-Id: Ie6a33347d34862f30ba04a10096d3892af7571d3
CRs-Fixed: 2751573
2020-08-12 13:56:42 -07:00
Subrat Mishra
9b715c34c5 qcacmn: Retrieve per PPDU phy tx duration
Add support to retrieve per PPDU phy tx duration without response time.
Add support to retrieve per User phy tx duration for MU-MIMO and OFDMA.

These metrics are useful for ATF stats feature. Stats processing done
only if atf stats flag is set.

CRs-Fixed: 2709102
Change-Id: I90db41aa45843808e07343a80750c154abbde9cd
2020-08-12 06:42:17 -07:00
Ruben Columbus
e762bb831e qcacmn: prevent double free on buffer
wdi event has to be called before dp_txrx_ppdu_stats_handler.
this will handle all pktlog htt messages including cases for mgmt frame

Change-Id: Iefba15b61278fe77cbb6d6df9190e66b46ed573c
2020-08-05 20:59:16 -07:00
Lin Bai
73f1205497 qcacmn: Print HTT version info in INFO_LOW level
Since HTT minor verison isback compitable, print it in INFO_LOW.

Change-Id: I4327d7b32f5ef9a876b5ad274e260406c8bb3169
CRs-Fixed: 2747669
2020-08-05 11:19:00 -07:00
nobelj
4dd08941dd qcacmn: add fix to send ppdu in sequential order
logic of holding ppdu info list is modified to store it
in sequential order.

Change-Id: I179e76f4bb1663e141e48df5f274ac5fd1b81bbc
2020-08-03 13:28:35 -07:00
nobelj
4e788e664c qcacmn: fix tx capture MU data and bar frame ctrl
copying mu data info is done inside schedule command status tlv
and handling based on completion status is added.

Change-Id: I2792d754a4fa3e2992d68f569c9ce40be8ff02e2
2020-07-31 20:16:09 -07:00
Manikanta Pubbisetty
f3a83d1757 qcacmn: support new htt interface changes for FISA
HTT interface to enable FISA has been modified to accomadate only
FISA enable and aggregation limit fields, rest of the fields will
be initialized by the firmware; this change is in accordance with
it.

Change-Id: Ia5950541b8d852029650c02e81c097bf049e54c5
CRs-Fixed: 2731543
2020-07-31 16:26:35 -07:00
Manoj Ekbote
3d34d90697 qcacmn: Set up user completion struct based on max users
Currently, per-user information in Tx PPDU completion is allocated for
37 users though FW may send information for fewer number of users. In
new scheme, FW provides number of users in USERS_INFO TLV and host can
allocate the per-user struct based on this number. This can save memory
while processing each completion message.

CRs-Fixed: 2730923
Change-Id: If04fd664a1ef6e77e8eb44c5d2bd1fa89fcaba72
2020-07-26 20:24:22 -07:00
Amir
990bafdd4d qcacmn: Set 'en' bit to true in full monitor mode register
As per MAC team's suggestion, While disbaling full monitor mode,
Set 'en' bit to true in full monitor mode register.

CRs-Fixed: 2722950
Change-Id: Idc891efde5f1fa625d59b7a193deeb38dca33e23
2020-07-17 01:51:39 -07:00