Commit Graph

657 Commits

Author SHA1 Message Date
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
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
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
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
Pavankumar Nandeshwar
df2c759d94 qcacmn: Do not check delete in progress in peer teardown
Since delete in progress for peer is set in roaming cases
explicitly, do not return from peer teardown after checking
this flag.

Change-Id: Icc514d9500075409d907546a26b2725b5334cbce
2020-01-19 15:59:04 -08:00
Rakesh Pillai
e3c018c0c7 qcacmn: Datapath changes for QCA6750
Add the datapath changes for supporting
the newly added IPCI bus type for QCA6750

CRs-Fixed: 2597326
Change-Id: I27e3e9f746eb383e85c7345150bda03320d041b9
2020-01-18 04:45:01 -08:00
Mainak Sen
03b82f7365 qcacmn: Support for dynamic mode chnge in NSS ofld
Update pdev id to lmac and target pdev id mapping in NSS

Change-Id: I111a975ad9ed3ef61753c8d9afe91083a8cca4aa
2020-01-18 00:19:28 -08:00
Ankit Kumar
53581e92fd qcacmn: Update counter in mutipass rx packet drop
multipass_rx_pkt_drop is peer level stats counter
used to count multipass rx packet dropped frame.
Accumulate this counter at vdev and pdev level.

It also initializes multipass_en flag to false at
vdev attach.

Change-Id: Idaa85a71c80eefb9359abb026402b71aa28ad6a2
CRs-Fixed: 2595551
2020-01-17 19:50:47 -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
2352b070f5 qcacmn: Fix for NSS interrupt mask issue in Dynamic mode change FR
Interrupt masking should use lmac id instead of pdev id
in NSS mode.

Change-Id: Ib5f974a18e6536249e4f422eb5c677947cb6e3be
CRs-Fixed: 2557902
2020-01-16 17:15:03 -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
Saket Jha
540da9a56c qcacmn: Add 6GHz Monitor Mode Support
Add monitor mode support to capture packets over 6GHz frequencies by
getting capture frequency from pdev.

Change freq type to qdf_freq_t.

Change-Id: I7b6edc43e254dc98a3c2939c369874bec9d16ddd
CRs-Fixed: 2568970
2020-01-15 11:30:21 -08:00
Padma Raghunathan
d2afc70e7c qcacmn: CFR: APIs to get/set CFR RCC mode
APIs to set/get cfr rcc configuration in DP layer.

Change-Id: I4f8740f5f4cc1dd3af0f8d5915639f2a17918359
CRs-Fixed: 2593416
2020-01-14 05:34:02 -08:00
Tiger Yu
685e960433 qcacmn: Move dp_rx_vdev_detach out of vdev list spin_lock protection
No need to protect with vdev list spin lock for dp_rx_vdev_detach and
which might wait event from dp rx thread when doing the RX GRO flash.
Do the same for dp_tx_vdev_detach.

Change-Id: I8f191ed62a174a9a88999c36d47ef18f39e8bd82
CRs-Fixed: 2600680
2020-01-14 02:02:26 -08:00
Ruben Columbus
073874c4aa qcacmn: tx peer capture filtering and discard
removing functions from cmn since they are used in component_dev

Change-Id: I3df5cf280a6922bb90284ee817e28009aa06db2b
2020-01-13 19:05:05 -08:00
Nandha Kishore Easwaran
3232a8d88b qcacmn: Process lmac rings in polled mode
Add code to process lmac rings in polling.
Lmac rings can be switched between polling and interrupts
by using lmac_polled_mode flag in dp_soc.

Change-Id: I231e906930c9b42100a2df3e52acac97deba1c34
2020-01-13 15:18:46 -08:00
Nandha Kishore Easwaran
bd98e6205e qcacmn: Create new interrupt mask for msi
Created a new interrupt mask for msi chipsets so that both ahb
and pci chipsets can work together.

Change-Id: I78d1b9641e58f07d1582152c691c5ae29e6ddb03
2020-01-13 15:18:31 -08:00
Nandha Kishore Easwaran
1d9464d4fa qcacmn: Setting interrupt mode in soc_init
Setting interrupt mode in dp_soc_init as setting it in
dp_soc_attach is resulting in interrupt mode not set on
subsequent wifi down/up. soc_attach is called only in case
of wifi unload/load and not in case of wifi down/up.
Adding interrupt mode setting in soc_init helps in setting
correct interrupt mode in case of wifi down/up.

Change-Id: I9e6ad94e42b7bc2bf84f832ece8dc8779e335905
2020-01-13 15:18:17 -08:00
Jinwei Chen
5d2b019ea4 qcacmn: WAR for monitor mode HTT msg sending failure
If two back to back HTT msg sending happened in short time,
the second HTT msg source SRNG HP writing has chance to fail,
this has been confirmed by HST HW.
  For monitor mode, HTT msg for monitor status ring configuration
is the last msg for sending, if the 2nd HTT msg for monitor status ring
sending failed, HW won't provide anything into 2nd monitor status ring.
  as a WAR, add some delay before 2nd HTT msg start sending, > 2us is
required per HST HW, delay 100 us for safe.

Change-Id: Id2a5a8798fde79267f9d6f9ba23d8ed54a400aa7
CRs-Fixed: 2597248
2020-01-12 13:21:06 -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
Padma Raghunathan
fe453dfd10 qcacmn: CFR: Monitor/Data ring filter settings
Channel Frequency Response(CFR) captures FFT bins corresponding to a PPDU
received and this is relayed to user space application. Since FFT bins
alone will not be meaningful, additional information about the PPDU such
as Peer addr, BW, NSS, etc are extracted from multiple PPDU status TLVs
and passed on to userspace along with CFR data.

Host RX monitor status ring is configured during CFR enable and the host
subscribes to relevant PPDU TLVs that provides all necessary information
for CFR data correlation.

Change-Id: Ia8080fe96c330db42d371634ba4363eb36c05402
CRs-Fixed: 2593416
2020-01-09 10:34:29 +05:30
Vevek Venkatesan
27e7bb4d79 qcacmn: cdp: Converge cdp_cmn_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.

- txrx_peer_unmap_sync_cb_set
- txrx_fw_stats_get
- txrx_get_ctrl_pdev_from_vdev
- txrx_get_mon_vdev_from_pdev

Change-Id: I4472dc0905edb7700acb4401b117c8876ba455f3
CRs-Fixed: 2541460
2019-12-27 03:25:49 -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
Ruben Columbus
1bec34c1e4 qcacmn: add ppdu_desc to cdp_tx_indication_info
ppdu_desc contains more information that is relevant to radiotap.

Change-Id: Ie2d0d53027958edf0a1032b270b7a8339b849924
2019-12-23 01:20:33 -08:00
phadiman
a73cc69157 qcacmn: Fix pool alloc issue in detach path
Memory is freed and allocated only during
wifi load and unload in case of WIN and not
during wifi up/down

Calling dp_tx_soc_detach unconditionally
was leading to memory free in wifi down
path and when wifi up was issued the
memory which was freed was never allocated

Call dp_tx_soc_detach conditonaly only for
MCL in dp_soc_cmn_cleanup and for WIN in
dp_soc_detach using dp_soc_reinit flag which 
is set for WIN during wifi unload

Change-Id: I9da34f7945d65a34e719c7db58da13e85ae3d228
2019-12-12 18:15:18 +05:30