Commit grafiek

184 Commits

Auteur SHA1 Bericht Datum
Manikanta Pubbisetty
a5c11aabcb qcacmn: avoid FSE cache flush messages during runtime suspend
When runtime power management is enabled, until the system is fully
resumed, we do not post any message to CE, instead they will be queued
in HTC. Once the device is fully resumed, all HTT messages in the queues
will be downloaded to CE at once. In some corner cases, it is found that
too many FSE caches flush messages getting queued during the runtime
resume; once the device is fully resumed, all these would be downloaded
to the FW/HW at once causing unintended crashes.

Avoid posting FSE cache flush messages until the device is fully resumed
to fix the issue.

Change-Id: I2be21406e8c7a9dcd86df3e93c2568797defcad0
CRs-Fixed: 2843541
2021-01-05 18:14:39 -08:00
Ananya Gupta
a660173209 qcacmn: Pre allocate pdev during attach
Pre-allocate pdev context as size exceeds dynamic allocation
threshold (4KB).

Change-Id: Ida866275ed1ddea5a9b6aa1cf114ccd226ed0f22
CRs-Fixed: 2825110
2020-12-08 01:12:27 -08:00
Jinwei Chen
18989f8ede qcacmn: support multiple pages prealloc for descriptor
Support multiple pages prealloc for DP descriptor

Change-Id: I66d4cef3acf69acf4b6fc8e5a6d01c3d67921dca
CRs-Fixed: 2751338
2020-09-21 01:33:16 -07:00
Naga
71b1eaed3e qcacmn: Add stats support for wds ext peer
Add logic to exclude dp peer stats from
dp vdev stats if wds extended is enabled.

Change-Id: I1a5a1794e04f90877916f92b7f4216a525ce6cce
CRs-Fixed: 2778199
2020-09-19 10:25:22 -07:00
Varsha Mishra
c7789836fd qcacmn: Extended WDS solution RX
1. Register peer->osif_peer for per-STA netdevice delivery.
2. Wi-Fi 3-address frame packets received would be processed
   through AP netdevice.
3. Wi-Fi 4-address frame packets received would be processed
   through per-STA netdevice.

Change-Id: I102874ea1de9fba40ab7f0e2c32c9de1c9b4d075
2020-09-19 10:25:18 -07:00
Debasis Das
c1184913b7 qcacmn: Ensure nbuf count is less than no of segs
While preparing raw packets for transmission, the count
of nbuf belonging to one mpdu must be less than the
number of segments.This makes sure the frags array inside
seg_info does not go out of bounds.

Change-Id: I7fffba7f64da274aa73c558cfc63d90f4419a04d
2020-09-17 21:09:07 -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
Ankit Kumar
bdddeb7c22 qcacmn: Add frame vdev id check in tx
Drop frame if it is not for the vap, to which
client is connected.
Enable this check only for ap.

Change-Id: I33d7eb79267490bdb8697e4e45f789e9f6279f0e
CRs-Fixed: 2756304
2020-09-16 09:30:33 -07:00
Naga
c4cd90a9c4 qcacmn: FR-64492 WDS Extended support
- Added data structure for wds ext peer
- Enhanced DP peer structure to maintain
  wds ext peer data structure, which inturn
  maintain pointer to osif device.
- Enhanced DP vdev structure to maintain feature
  configuration, which will be updated during vdev
  creation when feature is flag is set at control
  psoc.
- Enhanced cdp_vdev_param_type and cdp_config_param_t
  to set wds ext configuration into DP vdev
- Enhanced cdp_cmn_ops structure and corresponding
  call back definitons to get peer id, which will
  be saved in osif private structure and to set
  wds ext peer rx.
- Enhanced cdp_ctrl_ops to send event to control
  path when 1st 4 address frame is received from
  backhaul.

Change-Id: Ide0ea54e7b2d480ad646fb84b6e4e3108930f986
CRs-Fixed: 2773492
2020-09-15 07:19:50 -07:00
Guisen Yang
1eaa090cf2 qcacmn: Fix compilation error
There's no declaration for API dp_peer_qos_stats_notify().
Define the API  as "static inline".

Change-Id: Id6769d680b3304cebf00b2348fb5b9a3bc9c7368
CRs-Fixed: 2773655
2020-09-11 01:32:25 -07:00
Rakesh Pillai
21af5ba8cf qcacmn: Add data structures for SWLM
Add the necessary data structures for the
software latency manager.

Change-Id: Ibf55f0eef7ee6602b007de39a28f09c4622bd356
CRs-Fixed: 2769004
2020-09-10 01:04:20 -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
Mohit Khanna
83aab371c4 qcacmn: Add support to use pre-alloc mem
Add logic to pre-allocate DP consistent memory and reuse later
on wifi on/off. This prevents memory fragmentation.

Change-Id: I1e5eb0da39950a5d028dd46d38ff715f283e53ff
CRs-Fixed: 2740889
2020-08-31 03:32:45 -07:00
Pavankumar Nandeshwar
f0d2f53e32 qcacmn: stats VoW IGMP improvements
Add stats VoW IGMP improvements feature

Change-Id: I86b803e67f2cc3cfc01750f261f06590ff2b97c2
2020-08-28 02:01:25 -07:00
Pavankumar Nandeshwar
0eeac59b4e qcacmn: VoW IGMP improvements
As part of the VoW IGMP improvements, which deals with
conversion of igmp packets to unicast packets, the
following changes are done when the new feature is enabled:

1. IGMP/MLD packets with special addresses (addresses not
   part of any multicast group) will be converted to all
   existing clients of the AP. These packets will be
   directly fed to igmp multicast to unicast conversion
   module.
2. The IGMP/MLD packets with group specific addresses will
   first go to multicast enhancement module, where they
   will be allowed to pass and will be converted to unicast.
3. The new feature will be enabled only when multicast
   enhancement feature is enabled, which will be ensured
   at the configuration level.
FR : 61063

Change-Id: I2fd5a67766c806432fbe1a12cb9654a3600100f5
2020-08-28 02:00:48 -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
Neha Bisht
8ae1b8a9e3 qcacmn: Provide SON with per peer qos stats
Providing per peer QoS stats to SON via WDI event

Change-Id: Idd3cfbfec332269fdc8ad0ef273674e81d6ee92f
2020-08-24 05:55:22 -07:00
Srinivas Girigowda
b100ced3c7 qcacmn: dp: Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF
Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF.

CRs-Fixed: 2760938
Change-Id: Ib7999b69f79a65a67e1d9f7e24a04b7a7da0aebf
2020-08-23 23:09:31 -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
Chaithanya Garrepalli
e2b00339f3 qcacmn: add APIs to iterate the peers at vdev level
Add new APIs to iterate through the vdev peer list
by taking the peer reference.

A call back has to be passed to these APIs which will
be called for every peer in the lisst

dp_vdev_iterate_peer() -> iterates through peer_list of vdev
dp_pdev_iterate_peer() -> iterates through peer_list of all
                          vdevs in pdev
dp_soc_iterate_peer() -> iterates through peer_lists of all vdevs
                         in soc

Additonal APIs are added to for itearations where the callback
will be called outside the vdev->peer_list_lock, as these APIs
have additional memory allocations suggested to use only in case
the iteration need to happen outside lock

dp_vdev_iterate_peer_lock_safe()
dp_pdev_iterate_peer_lock_safe()
dp_soc_iterate_peer_lock_safe

Change-Id: I24632fe611355cc3e93b7f16d90913d4b8686ca9
2020-08-15 01:26:23 -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
Chaithanya Garrepalli
e253cee043 qcacmn: Peer refcount FR update DB as per new design
Update peer DB as per new design

peer_hash_table: add at peer_create and delete at peer delete
peer_id_to_obj_map: add at peer map and delete at peer unmap
peer_list: vdev level peer list add at peer create delete at
	   peer delete

Call dp_peer_cleanup() at unmap event

dp_peer_cleanup -> dp_peer_tx_cleanup -> Tx capture cleanup
	|
	---------> dp_peer_rx_cleanup -> Cleanup Rx REO TID queues &
					 defrag queue free

Introduce ref_cnt variable per VAP which will be
incremented and decremented at peer alloc and free. This counter
will be used to delay the vdev free if there are any active
peers for vdev exist in system

Change-Id: Iec13bceed0db0db71655fdbf6f96df8795b5077b
2020-08-15 01:26:07 -07:00
Chaithanya Garrepalli
86d3df0605 qcacmn: use granular locks to protect peer structures
Remove the global soc->peer_ref_mutex lock to protect
peer access

Instead use granular locks to protect the individual
peer DBs

1) soc→peer_hash_lock : To protect peer hash table
2) soc→peer_map_lock : To protect id to objmap array
3) vdev→peer_list_lock : To protect vdev level peer list

Change-Id: I9f044c4d71fe1155817a2b22a5a050545ec37445
2020-08-15 01:26:03 -07:00
Jeevan Kukkalli
94c430da4a qcacmn: Notify HMWDS ast add status to upper layers
Notification is sent in following two scenarios.
 - After call to dp_peer_add_ast() if we are not expecting any
   peer map event.
 - When HTT peer map event is received.

Change-Id: Id926d1cec1ee64520b0368fcc5000988c24e0513
CRs-Fixed: 2745542
2020-08-03 11:23:43 -07:00
Rakesh Pillai
9beeaa95a7 qcacmn: Add history to track the entries in rx rings
The rx rings are relatively of smaller size. Any
duplicate entry sent by hardware cannot be back-tracked
by just looking at the ring contents alone.

Hence add a history to track the entries for the
REO2SW, REO exception and SW2REO ring.

Change-Id: I9b0b311950d60a9421378ce0fcc0535be450f713
CRs-Fixed: 2739181
2020-08-02 11:01:41 -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
nobelj
ab4338f749 qcacmn: Add support to get device name and tx capture debugfs init
Add support to get device name and invoke debugfs init
on post attach so that device name is updated at that point.

Change-Id: I0e0a06cae4bef4d6e43c0295f5db99220b185df2
2020-07-23 19:28:45 -07:00
Chaoli Zhou
7c40c9d475 qcacmn: Fix compile error while enable CONFIG_REMOVE_PKT_LOG
Cleanup the code to fix the compile error while setting
CONFIG_REMOVE_PKT_LOG=y & CONFIG_WDI_EVENT_ENABLE=n
with Hasting

Change-Id: I493fbddec865fe20789022445b0f155201772119
2020-07-09 09:24:09 -07:00
Rakesh Pillai
94c0917f49 qcacmn: Monitor mode improvements
Move the srng history to hif context.

Process the monitor ring only for the lmac
corresponding to the configured monitor channel.

Add the timer and srng history for monitor mode.

Change-Id: I4e5e49ad5e657b55bfafbb40ef5f59496277cb40
CRs-Fixed: 2690530
2020-07-01 07:50:55 -07:00
Balaganapathy Palanisamy
a497ea80aa qcacmn: Add peer isolation support per vap
Configure the client as isolated peer if part of isolation
list while creating/associating the node or adding the peer
to the isolation list.
Do not forward the packets to and from clients in isolation
list instead accelerate to upper stack.

CRs-Fixed: 2689868

Change-Id: I67fd4dee0fb76c993746cdd66c70c241d407239a
2020-06-03 08:08:13 -07:00
phadiman
1f3652debc qcacmn: Datapath init-deinit changes
Do a logical split of dp_soc_attach and
dp_pdev_attach into Allocation and initialization
and dp_soc_detach and dp_pdev_detach into
de-initialization and free routines

Change-Id: I23bdca0ca86db42a4d0b2554cd60d99bb207a647
2020-05-02 21:59:42 -07:00
Radha Krishna Simha Jiguru
0750a7c7c2 qcacmn: Fix compilation issue in batched inval desc API
Fix compilation issue in batched inval desc API

Change-Id: Iedd0a7554006ce11aceed8d1949d25458c0c127b
2020-05-01 23:29:21 -07:00
Neha Bisht
9aa9221c98 qcacmn: Do Batched invalidate of tx completion descriptor
Do batched invalidate of tx completion descriptor to avoid
unnecessary D-cache miss for 32 byte size descriptor.

Change-Id: Ia580fe78dcef5b36f117aaad171a2df6d0e34966
2020-04-28 05:42:01 -07:00
Pavankumar Nandeshwar
d111e1ef43 qcacmn: Validate number of wds entries deleted during unmap
Validate number of wds entries deleted during peer unmap
handling with the number which firmware has sent in
peer unmap message, which indicates the number of
wds ast entries deleted by firmware after peer delete.

Change-Id: I09e1c41bab19cd023e7a83baf1e90d51aab4229e
CRs-fixed: 2667445
2020-04-22 06:23:30 -07:00
Nandha Kishore Easwaran
3e4379cdd8 qcacmn: Return DP_SW2HW_MACID if per_pdev_lmac
Return DP_SW2HW_MACID if per_pdev_lmac is set.
This is needed when we need to get target pdev_id without
doing pdev lookup.

Change-Id: If83f29bbcf23175708ba7eaf58e01e040ccb5a45
2020-04-08 13:43:56 -07:00
Nandha Kishore Easwaran
1039ae6642 qcacmn: Support for IPQ8074 2G PHYB mode 2/3
This mode is supported through hw_mode_id 7. A special mode for
IPQ8074 platform alone to bring up single pdev alone on 2G mode.
FW would advertise the mode 7 support through the WMI service
ready message and this mode will be the default mode for AP-HK10 alone.

Added preferred_hw_mode and target_pdev_id into dp structures so that
they can be used to configure the dp rings for this particular mode.
Also changed the lmac_id to target_pdev_id mapping for mode 7.

Change-Id: I3aae46fea13132eebaf7d37cff68ef517253d229
2020-04-08 13:43:30 -07:00
Rakesh Pillai
962dd74800 qcacmn: Reap more monitor ring entries before rescheduling timer
Currently, in monitor mode, once the status ring is reaped
we do not check again if there are new entries added in the
ring during the monitor ring descriptor processing. This
can cause backpressure on monitor rings when there is very
high throughput or a bursty inflow of packets.

Add the logic to continue reaping the monitor rings, until
the work budget or a time quota is not exhausted.

Change-Id: Iee95ac8aec92eabb3a8037b1dd9cf0c6e1dbe10b
CRs-Fixed: 2650480
2020-04-07 20:19:53 -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
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
Linux Build Service Account
b5bc05ee3f Merge "qcacmn: Ignore rx hw stats reo command status callback" 2020-02-21 15:10:09 -08:00
Manjunathappa Prakash
c4667b8b12 qcacmn: Save Rx TLV offset info so as to recover in FISA
Packets delivered to FISA via exception err path doesnot have TLVs.
FISA handling requires additional TLVs. dp rx core handling
skips TLVs, save TLV length info in nbuf->cb so that TLVs
are recovered back in FISA.

Change-Id: I53fab2e19abcbf82697ea6f53a4ddf3ea0dd0699
CRs-Fixed: 2620844
2020-02-20 06:39:48 -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
Radha Krishna Simha Jiguru
b4c0f1fe75 qcacmn: Add HTT message for sending 3 tuple configuration
Add HTT message for 3 tuple hash reporting in packet TLVs.
Change-Id: Iacdeee178838b490b3ad7e79c8bf27ca06b371a6
2020-02-15 21:49:27 -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
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