Commit Graph

679 Commits

Author SHA1 Message Date
Basamma Yakkanahalli
9def5df14a qcacmn: device ID and target type checks for ipq5018 target
Initial changes for ipq5018 compilation.
Added device ID and target type checks for ipq5018 traget.

Change-Id: Ib86a371fbe66749fcb6d114e7a4a9931b684e03d
2020-03-20 23:45:43 -07:00
Amir Patel
925a7d389c qcacmn: Add full monitor mode changes
Add following changes:
	a. Add CDP API to config full monitor mode
	b. HTT configuration changes
	c. Init/Deinit changes for full monitor mode resources

CRs-Fixed: 2632442
Change-Id: I06db5194031b3ea0f0c1e5deda20df4bc0faa0b9
2020-03-20 22:16:00 -07:00
Vevek Venkatesan
a62641c747 qcacmn: add synchronous timer stop to avoid race condition
Change the qdf_timer_stop to qdf_timer_sync_cancel (synchronized
timer stop), so it can wait till previous handler is completed
and then stop/delete the timer, to avoid race condition.
Also, call this qdf_timer_sync_cancel in dp_vdev_detach_wifi3,
to be symmetry with timer start in dp_vdev_attach_wifi3.

Change-Id: I3e975554b5492ccfc684ffe8b021c62ef39bf4d7
CRs-Fixed: 2644432
2020-03-19 22:25:27 -07:00
Pavankumar Nandeshwar
9b0c1271ed qcacmn: Initialized pdev id with default value 0xFF
pdev_id is being initialized with 0. Since 0 is valid pdev_id, though
pdev is not present for that id, it is being accessed.

Initialized pdev_id to 0xFF by default. Added checks on API to
detect valid pdev_id value corresponding to lmac_id

Change-Id: I2b2a38783615494ccc08e265702815f7e562214b
2020-03-17 03:11:13 -07:00
Pavankumar Nandeshwar
9afaef18bf qcacmn: Assign soc to dp_pdev soon after allocation
Assign soc to dp_pdev soon after allocation, since the
soc pointer is required during deinit if pdev attach fails.

Change-Id: I87789deb82efe9f554b3310a904dd340c5eb9f7a
CRs-fixed: 2638378
2020-03-17 01:06:23 -07:00
Mohit Khanna
b4429e8278 qcacmn: Add delayed register write support in HAL
In case the bus is in low power mode, the register writes (followed by a
memory barrier) may take a long time (~4ms). This can cause the caller
to block till the PCIe write is completed. Thus, even though PCI
writes are posted, it can still block the caller.

Hence, in case the bus is in low power mode (not in M0), or not in high
throughput scenarios, queue the register write in a workqueue. The
register write will happen in the delayed work context. In other cases,
i.e ,when the bus is not in low power mode or in high thoughput
scenarios, do the register writes in caller context.

Change-Id: Idf218e4581545bc6ac67b91d0f70d495387ca90e
CRs-Fixed: 2602029
2020-03-09 20:58:23 -07:00
Ankit Kumar
2bf9b7a18a qcacmn: Initialize command/credit ring for qca8074 & qcn9000
Initialize command/credit ring for qca8074 & qcn9000.

Change-Id: I28087dd4d8f4afddd954c764c2e85da43eaf78f1
CRs-fixed: 2562649
2020-03-01 05:25:24 -08:00
Adwait Nayak
48d23f29a1 qcacmn: CFR: Update RCC specific debug statistics
Move RCC specific debug statistics to Data path
to avoid allocating nbuf for the PPDUs for which
MAC has not sent a Freeze TLV. Instead just update the
debug statistics at an earlier point irrespective of
MAC sending Freeze to PHY, to gather below information:
Status of number of PPDUs being captured by PHY
Status of MAC sending freeze TLV for the PPDUs
Update freeze reason for the number of PPDUs received

Add support to clear debug statistics at user's will.

Change-Id: I8def3ce1f3ecc0b169030704db3fb1fb1c0a20ee
CRs-Fixed: 2609604
2020-02-28 00:20:49 -08:00
Sumedh Baikady
d188789876 qcacmn: Enhancement in Minidump feature
Handle minidump logging using dynamic
configurablity options. Data structures
to be logged in minidump can be configured
using internal INI file.

Change-Id: I99f12b3f98c4a9c0e15c3e5d611019e6b8d0909a
2020-02-26 08:35:46 -08:00
Linux Build Service Account
b5bc05ee3f Merge "qcacmn: Ignore rx hw stats reo command status callback" 2020-02-21 15:10:09 -08:00
Jeevan Kukkalli
e795cc17aa qcacmn: Add NULL check for peer mac
Add NULL check for peer mac before accessing it.

Change-Id: I039aa22d81c0e6a192c816c395cebefa4eaf3b82
CRs-Fixed: 2622011
2020-02-20 12:25:14 -08:00
Himanshu Batra
7e8e1a229c qcacmn: Move _ol_ath_param_t enum out from CDP
Add code to move enum _ol_ath_param_t out from common DP code
and move it into OL layer

Change-Id: I92fa5f52c581a18449ab42da41ff5f6f1a2bc595
Crs-Fixed: 2560866
2020-02-20 08:32:47 -08:00
Sravan Goud
5fd5cf65e2 qcacmn: In case of peer reuse set valid flag
Currently if peer reference is reused valid flag is not set.
In peer delete function if valid flag is not set, function
returns with out decrementing the ref count and also not
releasing the local id. This leads to local id exhaustion if
back to back peer reuse happens which is common in case of back
to back roaming to same AP. As a result connection to AP fails
due to unavailability of local id. In this change set valid flag
if peer reference is reused.

Change-Id: Ibeccbc4d33aac9e4285b48a4b8abdd2276fd7ede
CRs-Fixed: 2624798
2020-02-19 22:18:47 -08:00
Nisha Menon
3e5b005e4e qcacmn: Break up DMA mem alloc for HW desc banks in multi pages
Break up the 2MB descriptor bank memory allocations for WBM
idle link ring. Use multiple page allocation and populate the
WBM idle link descriptor ring with physical addresses of each
DMA page allocated in the descriptor bank.
This is to ensure that no requests for contiguous memory
allocations are made that might result in allocation failures.

For MCL set the page size to 4KB and leave it to max_alloc_size
cfg ini param for WIN specific code.

Change-Id: Iec30321044827c0174366cc02df25a42d38309e0
CRs-Fixed: 2565817
2020-02-18 16:38:43 -08:00
Sravan Goud
b2c1b4a49b qcacmn: Ignore rx hw stats reo command status callback
Host queries for reo hw stats by sending reo queue status command
on all the rx tids. After sending host waits to receive for all the
rx tids reo hw stats. If the hw stats reo status is not received for
all the rx tids with in the specified timeout value corresponding
peers's reference is released. In parallel if disconnect happens
from userspace, there is always a chance to access the freed rxtid
reference in rx hw stats callback. So in case of rx hw stats event
timeout ignore processing the reo command status rx stats callback.

Change-Id: I0aba346a25564a3c29751f1f5a1d4e9204b93d33
CRs-Fixed: 2619720
2020-02-17 11:46:43 +08:00
Linux Build Service Account
67ef957780 Merge "qcacmn: Rename cmd ring to cmd_credit ring" 2020-02-15 11:08:15 -08:00
Ankit Kumar
f63aaef3d3 qcacmn: Rename cmd ring to cmd_credit ring
Command ring is now renamed to credit ring on QCN9000
and used for credit based flow.
Renaming the ring to give meaningful name.

Change-Id: I726aed19477fcfb256e4e0cca8ddb9389035b58c
CRs-Fixed: 2562640
2020-02-15 00:32:25 -08:00
Yu Tian
0c6d94dd3e qcacmn: cdp: Implement API cdp_set_key_sec_type
Peer key security type is set in cdp_set_pn_check,
this API is called in key install step, but only
update Ucast field even if in Mcast key install.
This may be set wrongly if Ucast and Mcast security
modes are different. Add a new API to set security
modes of differ key types separately.

Change-Id: Icaa63139d117de75633ca1f81eb618c6b9294b53
CRs-Fixed: 2617461
2020-02-14 07:40:04 -08:00
Venkata Sharath Chandra Manchala
0094761c88 qcacmn: Take peer reference before requesting for rx queue status
Increase the peer ref count before requesting for reo
queue stats and release the ref count after receiving
the queue stats on the reo status srng.

Change-Id: Ife3b87951e767414efa1bfb45486cd364578d2a7
CRs-Fixed: 2604862
2020-02-13 13:05:54 -08:00
nobelj
7cc67e504f qcacmn: Support mgmt packet peer filter based on mac address
RA mac address is used to support tx capture mgmt peer filter.

Change-Id: I895034723d4b75557ad33f55adc017d1caa3a40d
2020-02-13 10:19:49 -08:00
Linux Build Service Account
71dccc8bc2 Merge "qcacmn: Set DBS scan if ndp peers are active" 2020-02-13 04:38:15 -08:00
Manjunathappa Prakash
5d73e075e8 qcacmn: Add support to deliver the packets to FISA
Hook FISA specific callback to deliver the Rx packets to
FISA frame work.

Change-Id: Ia16c857764c0c3bf99c3855eac01659eb03c7608
CRs-Fixed: 2599917
2020-02-12 11:58:59 -08:00
Manjunathappa Prakash
44aeb7256a qcacmn: Allocate and Initialize the FST for FISA feature
1) Allocate the FISA software flow search table
2) Allocate DDR flow search table
3) Send HTT command to program DDR flow table in FSE module.

Change-Id: I6d6084343d1a9c0298b1cf8a1ba033b2b46e6a82
CRs-Fixed: 2599917
2020-02-12 11:58:35 -08: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
Radha Krishna Simha Jiguru
89a6c08c9b qcacmn: Avoid entry free only based on WDS feature flag
Allow AST entry deletion from del_ast call for HTT V1 cases

Change-Id: If7cd1dfe59680b29c8664a460a236e608c00b158
2020-02-11 12:41:15 -08:00
Rakesh Pillai
fc60b6d73b qcacmn: Do not try to delete a peer if already deleted
Currently if any layer tries to delete a peer which
has already been deleted, there is no check to stop
the delete operation. Deleting an already deleted peer
is incorrect.

Check if the peer is valid before we try to delete
the peer.

Change-Id: Icc280554a652e0ee3f1ea38c98fb130ea3c1ae80
CRs-Fixed: 2613595
2020-02-06 00:47:25 -08:00
Adil Saeed Musthafa
bbc4de06d7 qcacmn: per-peer protocol count tracking
Maintain packet counters for each peer based on protocol. Following 3
protocols are supported
* ICMP (IPv4)
* ARP (IPv4)
* EAP

Change-Id: I56dd9bbedd7b6698b7d155a524b242e8cabd76c3
CRs-Fixed: 2604877
2020-02-04 14:17:14 -08:00
Linux Build Service Account
7425efbdbe Merge "qcacmn: Add common framework for mon filters" 2020-02-03 09:38:34 -08:00
Linux Build Service Account
da64f244ea Merge "qcacmn: Stop the monitor reap timer at dp suspend" 2020-02-03 09:38:26 -08:00
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
phadiman
89b6d79dff qcacmn: Fix incorrect access to lmac_id
pdev_id and mac_id were incorrectly passed
as arguments to dp_get_lmac_id_for_pdev_id

Fix passing the arguments in right order to
the API to access appropriate lmac_id

Change-Id: I42773a6ccae2f87f128d3c462e6a332fe658f45e
CRs-Fixed: 2611926
2020-02-03 00:07:04 -08:00
Linux Build Service Account
9cf6099bec Merge "qcacmn: Replace 8074_VP with WIFI_EMULATION_3_0" 2020-01-31 05:37:08 -08:00
Linux Build Service Account
f91621de73 Merge "qcacmn: Send val of separate iface support for NAN INI to Fw" 2020-01-31 05:37:07 -08:00
Nandha Kishore Easwaran
b7c18849ae qcacmn: Replace 8074_VP with WIFI_EMULATION_3_0
Replace QCA_WIFI_QCA8074_VP with CONFIG_WIFI_EMULATION_WIFI_3_0
since VP platform is not being used anymore.
Most of the parameters present inside QCA_WIFI_QCA8074_VP are related
to emulation timeouts. Hence replacing it with a more meaningful flag.

Change-Id: I22a0e5803e765333947f1613b376dcc6bd25b5af
2020-01-31 02:34:19 -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
Linux Build Service Account
665f64fe99 Merge "qcacmn: Set monitor mode interrupts" 2020-01-30 18:38:45 -08:00
Radha Krishna Simha Jiguru
64b4848aa0 qcacmn: Do cleanup related to peer_map_unmap_v2
AST entry delete logic has some conditional checks making code with respect
to HTT V1 and V2 messages making it tough to follow.

Change-Id: I229324446134b32021a956fb689e4726256fcc28
2020-01-29 23:02:57 -08:00
Shashikala Prabhu
03a9f5b19c qcacmn: Add framework to configure varying data/monitor buf size
Add a framework to configure varying buffer size for both data and monitor
buffers.
For example, with this framework, the user can configure 2K SKB for Data
buffers, monitor status rings, monitor descriptor rings, monitor
destination rings and 4K SKB for monitor buffers through compile time.

Change-Id: I212d04ff6907e71e9c80b69834aa07ecc6db4d2e
CRs-Fixed: 2604646
2020-01-29 18:08:33 -08:00
Sravan Goud
37c06b57a3 qcacmn: Stop the monitor reap timer at dp suspend
In case of wlan suspend if packet log is enabled stop the
monitor reap timer and reap the pending frames in the ring.
Also in case of FW target suspend ACK status reap monitor
status ring. During target suspend FW will disable the monitor
status ring. This change will make sure no pending frames in
the ring during start of system suspend and the target suspend.

Change-Id: I350fa508f3ddd125d5e00a7fc60e89507ce8fb4e
CRs-Fixed: 2604389
2020-01-29 20:01:02 +05:30
Mainak Sen
d13ed3e9e1 qcacmn: API support for AST flow override
Lithium HW can parse each MSDU when packets are enqueued to transmit
classifier and each MSDU can get enqueued to different MSDU-Queue.
By default, there are 2 queues per TID – UDP and NON-UDP. Based on
the flow parsing, packets will be queued to either of them.
Enterprise customers uses RAW mode frames which transmit classifier
would not be able to identify L4 protocol for  UDP or NON-UDP queue
for encrypted frames.
Customer can also have different application based packets which needs
to be enqueued to differently prioritized queues. They can choose to
tag each MSDU based on application DPI and derive the flow priority
as below –
•	UDP
•	NON-UDP
•	HI-PRIO
•	LOW-PRIO
Customer needs API support from host which will provide an ast-index
based on a particular flow id given peer mac address. Based on the mac
address, host will find the associated peer and return the ast_index &
cache set number corresponding to the flow id from peer flow based ast
entry table. Customer will then program this ast-index and ast override
in transmit classifier CMD ring to enqueue MSDU to a specific
flow-queuein TQM.
Host API:
Input parameter – uint8_t *peer mac address, uint8_t flow id
Output – uint16_t ast_index
Change-Id: I79557c31532514ad5ec0c1848827a3e5cd91cdf2
2020-01-27 17:37:43 -08:00
Pavankumar Nandeshwar
29c280ef73 qcacmn: Use lmac_id to get the rx_desc_pool instead of pdev_id
Use lmac_id to get the rx_desc_pool while freeing
the rx_desc_pool for rx_desc_buf.

Change-Id: I549e7f54b267d2c82dceb391a766297dfe18ceb7
CRs-Fixed: 2608209
2020-01-24 20:08:38 -08:00
Saket Jha
f0640bc083 qcacmn: Set monitor mode interrupts
Ensure monitor mode interrupt masks are set as they are DP_INTR_POLL
type. Move wlan_cfg_fill_interrupt() call to inside dp_soc_attach as it
is called before dp_soc_init.

Change-Id: Id9c49e3ed5c01e7c1bf641fa4c2f419d31381608
CRs-Fixed: 2608683
2020-01-24 14:45:19 -08:00
Venkateswara Swamy Bandaru
0605cde1f1 qcacmn: Fix issue in athstats
Incorrect size is given while copying pdev stats.
Fix this by properly passing pdev stats struct
while calculating size of pdev stats.

Change-Id: I4b4be2542d092c5c984252a62e2406cb1e83bcd8
CRs-Fixed: 2603674
2020-01-23 22:17:26 -08:00
Pavankumar Nandeshwar
61ec40476d qcacmn: Avoid exchanging dp handles with non dp modules
Corresponding changes in datapath for avoiding storage
of dp handles in umac objects.

Change-Id: I61ba9cca9a10cc7e3d618c7f1ec384dda2e85132
2020-01-23 14:28:38 -08:00
Chaithanya Garrepalli
b543c23ae2 qcacmn: Create new CDP API for mode change
Add new CDP API for mode change instead of reusing
map_pdev_to_lmac API

Change-Id: Ie0bcf9a9faec96b633986c64a43b8eeae813e78e
2020-01-22 16:26:34 -08:00
Pavankumar Nandeshwar
2771d985bc qcacmn: provide an API to fetch individual peer stats
Provide an API to fetch required individual peer stats
from the data path peer stats instead of copying the
whole peer stats structure.

Change-Id: I1c9619bc7d9bb0e3e3df6d38cc5f4570869e31fe
2020-01-22 14:58:29 -08:00
Padma Raghunathan
752b5a18a2 qcacmn: CFR: Adapt to changes made for dynamic mode change feature
As part of Dynamic mode change feature, rxdma_mon_status_ring
has been moved from dp_pdev to dp_psoc. Adapt CFR to this change.

Dynamic mode change feature change -
Ib017d49243405b62fc34099c01a2b898b25341d0

Change-Id: I43ee4e08ad70614d042be3e08c0add66e7e011f9
CRs-Fixed: 2606001
2020-01-22 09:25:35 -08:00
Vevek Venkatesan
af776988bf qcacmn: cdp: Converge cdp_peer_ops
Currently cdp ops 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_id or 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.

Also remove the ops which are used to store
and retrieve such handles, that no more needed.

- register_peer
- clear_peer
- change_peer_state
- peer_get_ref_by_addr
- peer_release_ref
- peer_state_update
- get_vdev_by_sta_id
- register_ocb_peer
- get_peer_state
- get_vdev_for_peer
- update_ibss_add_peer_num_of_vdev
- remove_peers_for_vdev
- remove_peers_for_vdev_no_lock
- copy_mac_addr_raw
- add_last_real_peer
- is_vdev_restore_last_peer
- update_last_real_peer
- peer_detach_force_delete

Change-Id: I4a41211464a30e018e8b73b8e9b91c7a509327b4
CRs-Fixed: 2541711
2020-01-22 02:46:27 -08:00
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