Revīziju grafs

277 Revīzijas

Autors SHA1 Ziņojums Datums
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
c4796962ca qcacmn: Monitor vdev and peer attach/detach
PATCH[5/7]:
This patch consists following changes:
 -Monitor vdev context allocation while vdev attach and free
  while vdev delete
 -Monitor peer context allocation while peer create and free while
  peer delete
 -Move monitor vdev timer function to monitor file
 -Move monitor reap timer handler function to monitor file
 -Move monitor timer related variables to monitor file
 -Add timer init/deinit and start/stop in monitor file.

Change-Id: I9c7910671d3678c53ca9ec44a57bc10e892008d9
CRs-Fixed: 2983994
2021-07-30 21:51:16 -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
Vevek Venkatesan
723721e67f qcacmn: add CDP reason code support for send_delba
Add CDP reason code support for sending DELBA request,
so protocol layer can make decisions for special cases.

Change-Id: I4e4b2e7f7232a8ab12d4c7838f97908f481dc787
CRs-Fixed: 2983553
2021-07-06 02:16:09 -07:00
Karthik Kantamneni
8c19a927bf qcacmn: Skip sending WMI REORDER_QUEUE_SETUP for BAR frames
When host receives BAR frames with OOR/2K jump in sequence
number it updates REO HW with new starting sequence number
and requests F.W to setup peer reorder queue. But REORDER_QUEUE_SETUP
is already requested to F.W as part of initial add BA in host.

So while handling OOR/2K jump BAR frames don't send
REORDER_QUEUE_SETUP to F.W

Change-Id: Idc3657e901dc792f699b53c45e4ae5133d286891
CRs-Fixed: 2981280
2021-07-01 22:18:37 -07:00
Vevek Venkatesan
e5b0e7e3a0 qcacmn: add debug logs around peer AST cleanup
Currently there are no sufficient debug logs during
AST cleanup of peers, to conclude in which context
the AST got freed up, hence adding more debug logs.

Change-Id: I5603d856aed8cc3860a78d24d51cd8b5386d38bb
CRs-Fixed: 2956910
2021-06-08 03:16:42 -07:00
Manikanta Pubbisetty
2359af8cea qcacmn: defer reo queue descriptor free
In some RX backpressure cases, we see the HW accessing REO
queue descriptors of a deleted peer(after the queue descriptors
are unmapped/freed), this is leading to SMMU faults. There are
cases where the HW is accessing the stale REO queue descriptors
after ~12seconds after the queue descriptors were freed.

In order to avoid the problem, HW team has suggested to defer
unmapping/free of REO Queue descriptors. Add the logic for the
same.

Change-Id: I5b1fb966dc75b963ccc9d22c40272c8d1d8d6026
CRs-Fixed: 2939223
2021-05-13 12:32:59 -07:00
Yeshwanth Sriram Guntuka
df22eee823 qcacmn: Register API to flush frags in dp peer ops
Register dp_peer_flush_frags API in dp peer ops
for flushing fragments for a particular peer.

Change-Id: Ia179d3160bdc306ec965c465134042c66a0c40a6
CRs-Fixed: 2874366
2021-05-13 06:20:05 -07:00
Ananya Gupta
0561c4ce02 qcacmn: Change log level of error prints
Logs are printed inside a spinlock which was held for
losing more than 2 seconds.
To fix this, reducing log level so it is not printed
in the console and instead in driver logs.

Change-Id: Ib510ddc1b5bff63db012b45ffa0280eedc356cc6
CRs-Fixed: 2938590
2021-05-07 20:51:55 -07:00
Karthik Kantamneni
26086e7971 qcacmn: Add history for REO queue descriptor events
Add history to log REO queue desc update and free events.

Change-Id: If2992ff1256fad49ea4ea6bd90b6dfe4a63d2bc4
CRs-Fixed: 2926919
2021-04-27 09:14:12 -07:00
Nisha Menon
5d7e26e27f qcacmn: Dump the rx reo queue descs in ddr
Add iwpriv option 34 to dump the reo rx h/w descs
in DDR for debugging. This cmd will first send cache
flush cmd to REO for all rx tids and invalidate the h/w
cache. Henceforth ensuring that the reo status tlvs and
the DDR values are in sync.
iwpriv wlan0 txrx_stats 34 0
Add fix to ensure bar frame with 2k jump err code is
processed correctly using the REO error code instead of the
REO push reason.

Change-Id: Ia05be668343f3a5d4b3262b8d6a367a50875add5
CRs-Fixed: 2895965
2021-04-13 14:50:51 -07:00
Tiger Yu
f7f01e0c10 qcacmn: Add sanity checking before removing ase from soc AST hash table
Add sanity checking before removing the ase from soc AST hash table to
avoid potential stability issue if ase is not found in the table.

Change-Id: I97b756cd5bdb052b0ce797cca5d96c6bac8f844e
CRs-fixed: 2912024
2021-04-09 00:37:52 -07:00
Pavankumar Nandeshwar
4ae78ae165 qcacmn: Update the vdev id while updating the ast entry
In client roaming scenarios, when the ast entry is
updated, make sure the ast entry is updated with
new vdev id.

Change-Id: I0bd5235eeb28909cabe48f577d4477789d7be9e8
2021-02-16 17:02:41 -08:00
Nitin Shetty
71e3244d46 qcacmn: skip MEC ast entry creation in wlan fw
MEC ast entry will be created only in software
and adding MEC entry to wlan fw is skipped.

Change-Id: I6991f9f12ceb22a7c599cdf3cc2a13c996d93671
2021-02-09 15:35:27 -08:00
Yeshwanth Sriram Guntuka
f16765d8bd qcacmn: Set authorize flag when peer state is updated to auth
Set authorize flag when peer state is update to
authenticated state.

Change-Id: I303bb9e32f72176e73bbdc2861468cf0fd1a43c6
CRs-Fixed: 2869537
2021-02-03 22:40:14 -08:00
Chaithanya Garrepalli
76d4ea4287 qcacmn: fix use after free in WDS aging timer
In case of pdev attach failure reset pdev reference in
soc->pdev_list to NULL before free to avoid use after
free

Also initialize WDS aging timer only when ast hash is
allocated

Change-Id: I6a406bd94aa46a95d9e5bb970ae83b3dfde29d0a
2021-01-18 23:52:21 -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
Shikha Bakshi
c1e00a21ba qcacmn: Modify logs for QDF_MODULE_ID_DP_PEER
Add macros dp_peer_info, dp_peer_info_low,
dp_peer_info_high, dp_peer_alert, dp_peer_err,
dp_tx_capture_debug to define logs.

Change-Id: Icf71595c10b1a4f0dca53f6953af4df19210e924
CRs-Fixed: 2832004
2020-12-22 06:40:31 -08:00
Yu Tian
abb64b561e qcacmn: Add ini config for force using 64 blockack
Some AP disables AMSDU in BA256 mode, this has draw back
with KPI in HE mode, so leave a config field to use 64 BA
forcibly to make high KPI with these types of AP

Change-Id: Ia69ffe118fd5bbda78cfb98126a483fcf305294e
CRs-Fixed: 2828304
2020-12-07 02:04:36 -08:00
Rakesh Pillai
904ad769a0 qcacmn: Skip setting rx tids for monitor mode self peer
Currently the rx tids are getting setup for the
self peer in monitor mode. This leads to sending
commands to the reorder-hw and the hardware generates
its responses.
In Monitor mode, none of these rings are reaped, since
the reorder-hw is not used. This opens up a possibility
of backpressure on the reorder-hw rings.

Skip setting up the rx tids for monitor mode
self peer, since they are not used.

Change-Id: I37bade9ef5c8bd536a01371cc059ebbcfb85ee5a
CRs-Fixed: 2815866
2020-11-18 12:04:04 -08:00
Abhinav Kumar
85bc644bb6 qcacmn: Resolve compilation error
Resolve compilation error by enabling
CONFIG_WLAN_TRACE_HIDE_MAC_ADDRESS := y

Change-Id: I336cd48db05e2e785ae1234ee5d135b68c532b77
CRs-Fixed: 2797225
2020-10-21 16:54:40 -07:00
Chaithanya Garrepalli
650f0ffd7d qcacmn: avoid updating peer stats under SOC AST lock
In teardown API update logical delete state to peer
before deleting AST entries of peer. Also in delete
AST API use __dp_peer_get_ref_by_id to get the peer

Change-Id: I6db227a284cf3726cc241ebc98386230eca58fcf
2020-10-06 19:31:36 -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
Chaithanya Garrepalli
3ac6dedea7 qcacmn: update peer reuse logic and add peer state lock
With new design, peer is deleted from hash table in
cdp_peer_delete. Hash table search in dp_peer_can_reuse
API at cdp_peer_create will always fail

Update the peer reuse logic to search from inactive list.

Insert peer to inactive list from cdp_peer_delete() and
in peer reuse case search in inactive list to get
peer.

Also add a new lock to protect peer state transition

Change-Id: I2e672fc4a9346c95d67716d437538dd0f96b2207
2020-09-11 13:55:42 -07:00
Yeshwanth Sriram Guntuka
004e29eceb qcacmn: Don't take peer ref by id on AST cleanup in unmap handling
In the scanerio where peer teardown and peer map happen
in parallel, AST entries could get added to the peer AST
list after cleanup happens as part of peer teardown. AST
cleanup as part of peer unmap handling would not remove
the entry from the peer AST list. This is because
dp_peer_get_ref_by_id returns NULL as peer state is moved
to logically deleted state.

Fix is to not take peer ref by id and use the peer
argument passed in which already holds ref in the
peer unmap handling.

Change-Id: I844d3f07e9eec962d44bbfba851ad46f350e4f97
CRs-Fixed: 2766779
2020-09-02 13:51:40 -07:00
Rakesh Pillai
351a71f1d3 qcacmn: Destroy rx tid spinlock when peer is freed
Currently the rx tid spinlock is destroyed from
peer delete (based on peer state) or peer unmap handler.
This can lead to a race condition when the peer is
deleted before the peer map command is processed/received.

Fix the above race condition by destroying the rx tid
spinlock only when the peer handle is destroyed/freed.

Change-Id: Iaf7ccea11a95732c1aa20e66af6dd4a9a66517c5
CRs-Fixed: 2763533
2020-08-28 08:54:13 -07:00
Yeshwanth Sriram Guntuka
4c12885407 qcacmn: Delete peer AST entries as part of peer unmap
In roam HO failure, peer unmap indication is processed
even before Host initiates the peer cleanup. In the cleanup,
as part of cdp_peer_teardown, AST entries are freed up without
removing it from the peer AST list since get_peer_by_ref_id
returns NULL peer pointer as peer is moved to inactive state.

Fix is to delete peer AST entries as part of peer unmap
indication so that the entries are removed from the AST list.

Change-Id: I1b04517e8cc392b33bb439501e61e3d5534d8307
CRs-Fixed: 2763825
2020-08-27 23:52:36 -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
e81a22ce9b qcacmn: add null check in dp_peer_find_hash_find API
In cdp_soc_deinit peer hash table is freed to add
check to avoid NULL access from CDP APIs which may do
peer hash find

Change-Id: I47c4126c34bb64d43112a4f8e268da1a98f4124d
2020-08-22 18:12:27 -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
1322dc7949 qcacmn: add state to data path peer
Add states to data path peer and appropriate
checks for transistion of states

Change-Id: Ieaadbf4b406351d48aece7fd3552abe42d61db1e
2020-08-15 01:26:20 -07:00
Chaithanya Garrepalli
f4701f13ec qcacmn: remove peer backpointer in DP ast entry
Remove the peer backpointer in ast entry and store
peer_id instead

Assign peer_id in AST entry in AST MAP event,
also add the ast entry to peers ast list

In AST map & AST unmap APIs use ast find by vdev_id

Change-Id: I74d9828dc309149d98f6f577b5c8304cb087fd76
2020-08-15 01:26:17 -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
Yeshwanth Sriram Guntuka
acc1ea0d14 qcacmn: Break from the desc_freelist loop on REO cmd enqueue failure
UPDATE_RX_REO_QUEUE commands are queued in the REO_CMD
ring as part of peer cleanup for each tid. The cb
registered defers pocessing the entries in the
reo_desc_freelist based on either number of pending
entries or time threshold. In the scenario when
these entries from the freelist are processed as part
of next disconnection and if the REO_CMD enqueue fails,
the while loop over reo_desc_freelist does not exit
and will end up in a perpetual loop.

Fix is to break from the desc_freelist loop on REO
cmd enqueue failure.

Change-Id: I18ee31ec6a6150cd6952903cc154634b7de4ce60
CRs-Fixed: 2751223
2020-08-13 08:22:34 -07:00
Chaithanya Garrepalli
82eb94c989 qcacmn: remove bss and self peer back pointers from dp_vdev
Remove self and BSS peer back pointers and added APIs to
get self and BSS peer from VDEV

These new APIs will iterate through peer list and return
the appropriate peer by taking a reference

Caller has to take care of releasing the reference

Change-Id: I550ff83d665f3ad0a185bea1a1e6270c5474ff07
2020-08-06 14:37:19 -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
Chaithanya Garrepalli
59fc94ae9f qcacmn: Add API to check if peer exist on a PDEV
In add AST API check if peer with mac address exist
on a PDEV

Change-Id: Ied67e461faf769c444d29d1bce79405f51012ea2
2020-07-31 03:44:57 -07:00
Jeevan Kukkalli
30f2d61e6d qcacmn: Handle invalid HW ast index case inside dp_peer_map_ast()
Handle invalid HW ast index case inside function dp_peer_map_ast().
This change aids upcoming feature where status of HMWDS ast add is
reported to upper layer. This change eliminates extra peer ast list
traversal required for the new feature.

Change-Id: Ic6f45fedb53204c52719686aee9a90ae12695d09
CRs-Fixed: 2728611
2020-07-24 07:10:24 -07:00
Jeevan Kukkalli
659ecbabda qcacmn: Return appropriate QDF error codes
Modify functions dp_peer_add_ast(),dp_peer_map_ast() and
dp_rx_peer_map_handler() to return appropriate QDF error codes.

Change-Id: I582a5e68219fe25df5f46ae6044afa3bed880d2c
CRs-Fixed: 2728559
2020-07-22 11:55:41 -07:00
Aniruddha Paul
b07ed991ec qcacmn: Alloc/Dealloc the peer extended stats
Allocate/Deallocated the peer extended object in the
peer_create() and peer_del() paths respectively.

Change-Id: I3e93e1ec85aefb22d3fb40d1b01bbd07d660aff5
2020-07-15 03:52:18 -07:00
Chaithanya Garrepalli
eb6c7aa478 qcacmn: decrement num ast entries in hash clean up
In wifi down path decrement the ast count while force
freeing AST hash table

Change-Id: If98785eada2866c860ad4769fa744ca29d93dfbe
2020-06-29 02:38:40 -07:00
Chaithanya Garrepalli
1d144f88bd qcacmn: store peer_id instead of peer_ids array in dp_peer
In lithium a peer will have only single peer_id hence remove
peer_ids array from dp_peer structure

Change-Id: Ib98270b7fd98f1199b862e4608f990687914b7cc
2020-05-29 13:13:37 -07:00
Alok Kumar
e341157506 qcacmn: Avoid NULL pointer dereference of pdev
Suspicious dereference of pointer 'pdev' by passing argument
to function 'dp_find_peer_by_addr' in dp_register_peer.

Add NULL check before dereference of pointer 'pdev'.

Change-Id: Ibe2db784287ff1557aec983829781378578016c0
CRs-Fixed: 2668253
2020-05-07 03:44:50 -07:00
nobelj
01dcfedca1 qcacmn: Support MU in tx capture mode
Support fix for MU related data frame in tx capture mode.

Change-Id: I8b63eaf320463a3a068beb589089582cafe05001
CRs-Fixed: 2656346
2020-04-27 23:26:50 -07:00