Commit Graph

314 Commits

Author SHA1 Message Date
Prakash Manjunathappa
017ad75e08 qcacmn: Set per_tid_basize_max_tid so that BA size is configured per TID
Set per_tid_basize_max_tid so that BA size is configured per TID.
Accordingly fix dp_check_ba_buffersize to ba_window_size to incoming
buffer_size. Assert for any BA window size above 1024.

Change-Id: I40cb2aac012c50e253c3ef22d44cf5db3abfb7bb
CRs-Fixed: 3182601
2022-05-17 13:50:32 -07:00
Surabhi Vishnoi
ecaa0f1f6c qcacmn: Allow rx UDP packets during roaming before peer map is received
In VoIP cases, no or minimal packet drop is expected during
roaming. Currently, data packets are dropped in host if they
are received after roam sync indication from firmware and before
peer map indication is received due to invalid peer.
This change allows rx UDP data packets during roaming before
peer map indication is received from FW if peer's auth_status
received in roam_sync_indication from FW is authorised.

Change-Id: Ic518b7cd0aef48a2b0f8c923a2e20838b07f3d1f
CRs-Fixed: 3168603
2022-05-12 23:34:21 -07:00
Rakesh Pillai
f74f73dc68 qcacmn: Add API to update DP rx tid BA window size
Currently, in case where AP advertizes BA window size
which is different than our max supported BA window size,
the HW gets configured for BA window size advertized by
the AP, whereas the ADDBA response indicates the window
size of the STA, which is less than the AP.
This mismatch leads to the BA bitmap to be incorrect.

Fix this by exposing an API from datapath for the update
of the final BA window size which is populated in the
ADDBA response.

Change-Id: I81a039f47a775990b426e9aca1daaaa9bdb6e88f
CRs-Fixed: 3187941
2022-05-11 09:41:23 -07:00
Jinwei Chen
691ffe9f3f qcacmn: Fix AST index for STA Vdev overwritten issue
For KIWI, STA AST index lookup search is enabled and remote
AP peer's AST index will be stored in STA Vdev if receive
AP peer htt peer map msg. but if STA TDLS connection happened,
host will receive another peer map msg for remote TDLS STA peer,
this remote TDLS STA peer's AST index will overwrite original AP's
AST index. if TDLS disconnected, STA vdev will still use remote
TDLS STA's AST index for TX, then TX to AP might fail.

Add is_tdls_peer flag in dp peer and configure this value by
cdp_peer_set_peer_as_tdls() from control path right after TDLS peer
created. if is_tdls_peer is true, do not store this TDLS peer's
AST index to STA Vdev, skip bss_peer flag setting as well.

Change-Id: I7b5df1caca6a0b5305a6e867cd92099b5f6a4890
CRs-Fixed: 3151035
2022-05-06 16:43:13 -07:00
sumedh baikady
5d0d6db673 qcacmn: Clear HW REO cache for shared reo qref entries
Clear HW REO cache when new entry is written to shared
REO qref table.

Change-Id: I43cffb66b3e7fdf62afb7ffc1729275b868b9888
CRs-Fixed: 3189158
2022-05-06 16:42:57 -07:00
Pavankumar Nandeshwar
96c227a65d qcacmn: Check if ast hash table is populated before accessing
Check if ast hash table is populated before accessing it,
as some calls from ecm can try to access the hash table when it
is down

Change-Id: I6d38359c3cf13f578671794db61c8eb845245d6d
CRs-Fixed: 3186437
2022-05-03 08:40:48 -07:00
Abishek Ganapathy
e79a7628e6 qcacmn: Find peer using mld_addr for MLO case
For MLO, try to find peer by comparing the MLD MAC
addresses.

Change-Id: Ib109da957d5c330385688a4e91e04cda91a51f30
CRs-Fixed: 3140866
2022-04-22 07:27:02 -07:00
sumedh baikady
52181cceb1 qcacmn: Fix Reo qref issues
1. Since peer id is reused for reconnection in MLO case,
old entries for queue desc addr is cleared. Clear the reo
internal storage and reset it back on client connection.

2. Send Qref feature WMI cmd to FW to enable the feature.

Change-Id: I6705ce121c8c25d9a2ace039dab21312fa5ea4b1
CRs-Fixed: 3156642
2022-04-12 06:31:36 -07:00
Subrat Dash
b657bc4223 qcacmn: Bypass cds to create AST entry for WDS station
The qcacld driver does not register ol_if_ops callbacks
to handle wds AST request.

Call target if APIs directly to add, delete, and update
the AST entries for the WDS stations.

Change-Id: Ib4d5e1fdd6598e3390dbd2be0f24a72ccf01f202
CRs-Fixed: 3133839
2022-03-01 14:55:35 -08:00
Vinay Adella
381d67a7a2 qcacmn: Add support to get reo qdesc size for li & be platforms
Bifurcate the hal_get_reo_qdesc_size to corresponding lithium
or Berillium platforms.
This can handle difference, if any between them and later enhance
to set the qdesc size based on peer negotiation.
Currently for NON_QOS_TID, the BA window size is hardcoded as
256 for Li and 1024 for Be.

Also modify hal_reo_cmd_update_queue_params to accommodate higher
Block-Ack Window size. For this steal bits from pn_size and use
pn_size values as macros PN_SIZE_XX which is only 3 bits,
instead of 8bits.

Change-Id: If310175da579aa3a47a8b031a1774c6c8982d4b2
CRs-Fixed: 3125986
2022-02-22 16:04:01 -08:00
Pavankumar Nandeshwar
24c089c678 qcacmn: Add the missing tid value in rx_tid_defrag
Initialize the rx_tid_defrag with correct tid value
which was missing

Change-Id: Ib01d9692352e56f62d1338f353afac11b175d710
CRs-Fixed: 3130846
2022-02-18 15:32:08 -08:00
Pavankumar Nandeshwar
e157e0df4e qcacmn: Flush dp cached frames only for mld peer
Flush dp cached frames only for mld peers and legacy peers, as
link peers don't need it.

Change-Id: I19a27c5810a1fec6a62bfe5a6377073dc382fb4c
CRs-Fixed: 3131405
2022-02-17 09:40:38 -08:00
Santosh Anbu
83d13e1ffd qcacmn: Support multi AST delete WMI command
Add change to support multi ast entries deletion.

Change-Id: I74b9000c6949d7455da5eb54678e976ab1b9bb20
CRs-Fixed: 3124258
2022-02-11 22:30:17 -08:00
Harsh Kumar Bijlani
d8e05be641 qcacmn: Changes for vdev and pdev stats
Changes for vdev and pdev stats as per the new peer stats
re-organization architecture.

Change-Id: I48f9fb4b0915c40f4add83f2e2dd074cc97874fd
CRs-Fixed: 3092123
2022-02-09 11:55:12 -08:00
Harsh Kumar Bijlani
27e9e64532 qcacmn: Changes for delay and jitter stats
Delay and jitter stats are placed in struct dp_txrx_peer.
Make changes accordingly for allocation, fetching and clearing
operations of these stats.

Change-Id: Ic9b9e48467741072806000f4d1b3aa8e5c65d508
CRs-Fixed: 3092123
2022-02-09 11:54:23 -08:00
Harsh Kumar Bijlani
eee813ad02 qcacmn: Initialization of stats in txrx_peer and monitor_peer
* Initialize stats in dp_txrx_peer and dp_monitor_peer as per
  the stats re-organization.
* Update peer calibrated stats on every timer expiry of 1 second.
* Define APIs to reset monitor_peer stats and to fetch rdkstats_ctx
  from monitor peer.
* Place check to make sure that monitor peer related APIs are
  are called only for legacy peer or MLO Link peer.
* Update peer based pktlog flag, tx and rx capture feature flags
  in monitor_peer.

Change-Id: Idadbe19e85d4a9fdf77fb6dabe0c8a4952b024b8
CRs-Fixed: 3092123
2022-02-09 11:54:14 -08:00
Pavankumar Nandeshwar
b9038e9d4e qcacmn: Move per packet stats params to txrx_peer
Move the stats parameters from the dp_peer which are used
in per packet path to txrx_peer

Change-Id: Ieb68b6950740791b37bbd2bfdc4815c3d7bc4834
CRs-Fixed: 3095637
2022-02-09 11:54:01 -08:00
Pavankumar Nandeshwar
9c6800383c qcacmn: Move per packet params to txrx_peer
Move the parameters from the dp_peer which are used
in per packet path to txrx_peer and params related
to monitor path to monitor peer.

Initialize txrx_peer and monitor peers.

Change-Id: I0449c67c1cd47deb76bc89b5ddc64174f6694eb0
CRs-Fixed: 3095637
2022-02-09 11:53:37 -08:00
Sumedh Baikady
e4d9b0c2d7 qcacmn: REO queue ref enhancement for Waikiki
In WIN BE chipsets, replace the REO tid
queue programming in FW via WMI with writing to a
Host managed table shared by HW and SW. REO HW will
pick the tid queue address from the table indexed by
peer id and tid number.

Change-Id: I8107ca5116425538329b11ae3519f02b32573bac
2022-02-02 12:06:29 -08:00
Pavankumar Nandeshwar
8f62ddf128 qcacmn: Fix QUIC Copyright Markings
Fix QUIC Copyright Markings

Change-Id: I396830ab402318cd2385a5bed8dc3af373b8148b
2022-01-14 11:53:34 -08:00
Chaithanya Garrepalli
5f1d523c46 qcacmn: Fix peer_id passed to mon peer API
Fix peer_id passed to dp_monitor_peer_tid_peer_id_update
API

Change-Id: I16516858abb64a1ff847197cf6a8cc4b64c0df52
2022-01-14 03:50:18 -08:00
Chaithanya Garrepalli
3d9c419f95 qcacmn: Fix ML peer refleaks reported in wifi down
Delete MLO peer from primary SOC while ML peer delete

Change-Id: Ideb78964718699397a1fb5da22c28ec787c5bd0c
2022-01-12 05:33:55 -08:00
Pavankumar Nandeshwar
d7908ff22a qcacmn: Add txrx_peer in dp peer
Add txrx_peer in dp peer which will be used in
per packet data path.

Change-Id: I91f10b1640430300f4c9f002ca54b3903c556d41
2022-01-06 07:55:43 -08:00
Jinwei Chen
61a06721b0 qcacmn: fix unmapped REO queue address for MLO roaming
During MLO roaming, first link peer has unmapped REO queue Desc
address due to roaming is in progress, but 2nd link peer still send
stale REO queue Desc address to FW, SMMU fault will be captured if
REO access to this stale REO queue Desc address.

Add roaming in progress and REO queue address check before
sending WMI PEER_REORDER_QUEUE_SETUP_CMDID

Change-Id: Ic868685d98b802fa904ed440cdbb3cef908c6d95
CRs-Fixed: 3101658
2021-12-29 10:35:36 -08:00
Chaithanya Garrepalli
0ead24e9f6 qcacmn: Correct ml peer_id check in partner chips map
In dp_mlo_partner_chips_map API correct the ML peer_id
check

Change-Id: I036e725571d922a3d01f3f07e16bda755f6f966e
2021-12-28 10:52:03 -08:00
Jinwei Chen
96a3c195c2 qcacmn: change parameter name 'is_assoc_link' in cdp_peer_setup_info
Currently is_assoc_link flag in cdp_peer_setup_info just means first
link peer during MLO connection, but usually assoc_link is the
link which initialize MLO association and it will be the primary_link.
this introduce confusion with another flag is_primary_link.

Change it to 'is_first_link' in cdp_peer_setup_info

Change-Id: I8d14da73e6a3bbc39a4a527d6c0aa5667255e995
CRs-Fixed: 3090270
2021-12-14 14:09:34 -08:00
aloksing
3637ac16b0 qcacmn: Move monitor mode HTT parsing from mon_1_0 to common
Moving HTT parsing to common file dp_mon.c
Initialize function pointer to stats ind handler for BE

CRs-Fixed: 3071271
Change-Id: I08fb98f8dbed075c3b49baebca399771bfb5077c
2021-12-09 11:17:17 -08:00
Chaithanya Garrepalli
97a1c8bff1 qcacmn: Changes to caluclate soc max peer id
Changes to caluclate max peer id in case
of MLO

Change-Id: Ib52cfb4f92eafb88689774e8e6c406751d30372a
2021-12-02 06:06:47 -08:00
Harsh Kumar Bijlani
6c7fcf1d61 qcacmn: Add logic for allocation and reset of vdev_stats_id
In BE architecture, HW provides basic vdev stats support for upto
48 vdevs. For each vdev, there is vdev_stats_id which represents the
id of this vdev on HW. This vdev_stats_id is assigned by host and
is conveyed to HW at the time of REO TID Queue setup for the peer.

Add logic for allocation and deallocation of vdev_stats_id and
convey this id to HW.

Change-Id: If5611bf54d057ccf71c6444b5c79a26eb28df87e
CRs-Fixed: 3067843
2021-11-30 00:57:49 -08:00
Chaithanya Garrepalli
bbe062b4b7 qcacmn: DP peer changes for multi-chip MLO
DP peer changes required for multi-chip MLO.
This change includes

1) Adding MLO peer to global peer hash at ML context
2) Add ML peer to all partner chips id to objtable

Change-Id: I230a6c1b14484c587b190a9a318fe9ffb1caea11
2021-11-23 19:28:15 -08:00
Yu Tian
2446f8ed54 qcacmn: Clean up force BA64 ini config
This force use BA64 ini config is no longer needed, because another
gRxAggregationSize can do the same settings and more flexible.
Change is used to remove this config.

Change-Id: Ie780489849f8b701481a628a9bca2b4112460bd8
CRs-Fixed: 3076982
2021-11-22 02:48:56 -08:00
Mohit Khanna
25652ed9d8 qcacmn: Return invalid peer state if peer is not found
Return an appropriate value in case a peer is not found.

CRs-Fixed: 3059712
Change-Id: I951d4dd900cde0606e8f03c2b8748f5e76fe5736
2021-11-08 05:19:36 -08:00
Rakesh Pillai
57e2c01e5e qcacmn: Peer id parsing changes for beryllium
Take care of the MLO peer bit indication to be
concatenated with peer_id to access the peer map
object.

Change-Id: Ia603a728101e83829a8906d1b847f42389e78ca6
CRs-Fixed: 3039326
2021-10-15 13:13:27 -07:00
Rakesh Pillai
2069fa6cdd qcacmn: Handle htt peer map/unmap v3
Add the handler for processing the htt
peer map/unamp v3 and MLO peer map/unmap msgs.

Change-Id: Ie2ab0b76e7aee566ca3b9637b83fd7a14718ab01
CRs-Fixed: 3039326
2021-10-15 13:13:22 -07:00
Jinwei Chen
5c85cfb5a0 qcacmn: cdp/dp peer change for MLO
cdp/dp peer change for MLO

Change-Id: I9b8eb741317a0dc7337aff7e773148892e531ba2
CRs-Fixed: 3031166
2021-10-15 13:13:12 -07:00
Pavankumar Nandeshwar
6b1d142d98 qcacmn: Enable wds changes in Beryllium
wds in Beryllium is managed by hardware.
Make use of hardware managedwds and disable
the corresponding wds handling done in host
for Beryllium.

Change-Id: I39f23cb40c6c5f85ada8ce59c92ff2855bb18da3
2021-09-30 15:15:25 -07:00
aloksing
b158abe417 qcacmn: API renaming for monitor module
Add prefix dp for all monitor APIs
Add mon_debug/mon_info/mon_err for logs

Change-Id: I71d49f6bcacd77f5695269817fed83337169227b
CRs-Fixed: 3006497
2021-08-12 05:32:47 -07:00
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