Commit Graph

16111 Commits

Author SHA1 Message Date
Amruta Kulkarni
c1e9855dd5 qcacmn: Add new api to get link and mlo vdev
Add new api's to get link and mlo vdev from psoc and vdevid.

Change-Id: I4c36baab6199dbc31ba11d1b9c547589a84c9625
CRs-Fixed: 3098600
2022-01-06 12:51:14 -08:00
Hariharan Basuthkar
d01c9ce923 qcacmn: Return center channel for 6G opclass 132
For a 6G radio, the API reg_get_channels_from_opclassmap currently
returns the 20 MHz IEEE channel numbers for the 40MHz 6G operating class
(132). As per the IEEE802.11 specification it should return the channel
center frequency index for the operating class 132.

To fix this issue, modify reg_get_chan_or_chan_center to return channel
center frequency index for 6G 40 MHz operating class 132.

For non-6G 40MHz channels the primary channel frequency is returned
as center. For 6G, however, the center of the entire 40Mhz band is
returned. Therefore, handle opclass 132 ( 6G band 40MHz channels)
as a special case for 40Mhz bandwidth.

Change-Id: I02f2fce418519a3e020d9b87d5ec401a73ad5ce8
CRs-Fixed: 3101303
2022-01-06 12:51:07 -08:00
Ashish Kumar Dhanotiya
47bc1e1781 qcacmn: Consider all power types to prepare client channel list
Currently driver prepares client channel list based on indoor ap
power type and this list is given to kernel. There are couple of
issues with this approach as mentioned below:
1. Based on this list kernel sends the scan requests because of
which there is a possibility that driver does not scan channels
which are not part of LPI channel list but are part of SP channel
list or VLP channel list.
2. Kernel sends start AP as well based on this channel list, since
all LPI channel are marked as NO_IR from driver and because of
which kernel dont send start AP on these chanels which leads to
SAP start failure even if there are VLP channels available.

Change-Id: I90174920df158c8b370e541034307a9a58448c29
CRs-Fixed: 3054543
2022-01-06 12:51:02 -08:00
Shiva Krishna Pittala
861c4e29aa qcacmn: Add support to extract sscan bandwidth capabilities
WMI_SPECTRAL_CAPABILITIES_EVENTID event will be sent by the FW to
indicate different capabilities of the Spectral HW.
Add support to extract the sscan bandwidth capabilities from this event.

Change-Id: I6ff6e5a8d80271fa62a430c986f53a321d46c66b
CRs-Fixed: 3098832
2022-01-06 10:40:06 -08:00
Neelansh Mittal
596c07c7e6 qcacmn: Add HAL TX PPE data structures
Add the PPE Tx HAL data structures. Also add
dummy functions for reo2ppe and ppe2tcl rings
intializations.

Change-Id: I31fa61a728535c32ea3678407da8ae39f0d9f48d
2022-01-06 10:40:01 -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
Amruta Kulkarni
951e13a2ea qcacmn: Add wlan_ api to get assoc vdev
- Add wlan_ api to get assoc vdev.
- Update mlo_update_connected_links_bmap() to
non static.

Change-Id: Ib7948023041481c27f1e98a6bd1ecfe583abd3ef
CRs-Fixed: 3098594
2022-01-06 07:55:37 -08:00
Edayilliam Jayadev
f08345f6f1 qcacmn: Add APIs to print without function and line number
Add APIs to print management rx reorder module logs without
function name and line number.

CRs-Fixed: 3103194
Change-Id: Idb450d5c93b66255b91901a3140ff2f17dd108b8
2022-01-06 07:55:32 -08:00
Edayilliam Jayadev
bcdefd9e61 qcacmn: Add APIs to output ingress frame stats
Add APIs to print the ingress frame stats.

CRs-Fixed: 3103193
Change-Id: I8b6199975f8513baddbce51ea5ef363183c03694
2022-01-06 07:55:27 -08:00
Edayilliam Jayadev
164f5d753e qcacmn: Add APIs to output egress frame stats
Add APIs to print the egress frame stats.

CRs-Fixed: 3102984
Change-Id: I845d36ce3eced9e75b3cd7eba6070f94b9f7fb68
2022-01-06 07:55:22 -08:00
Edayilliam Jayadev
920e70144b qcacmn: Enable Mgmt reo ageout timer
Enable the timer to ageout entries in the management rx reorder
list.

CRs-Fixed: 3102976
Change-Id: I55dd4b25e652ac881ba99b414f90bce5fb292dec
2022-01-06 07:55:16 -08:00
Edayilliam Jayadev
a4542e470f qcacmn: Use existing Mgmt Rx REO APIs for simulation
Use the existing management Rx reorder APIs for simulation
purposes.

CRs-Fixed: 3094903
Change-Id: Ib6989733579e248ad914d6828729bbe8487a7361
2022-01-06 07:55:10 -08:00
aloksing
d57064662f qcacmn: ratetable entries for 11BE
Add rates as per 11BE and
define valid mask for EHT mode.

Change-Id: I5551d2ea327d010d24abe0f52782fe5373883d79
2022-01-05 21:41:58 -08:00
aloksing
2491f91f55 qcacmn: ratetable changes for 11BE
modify dp_getmodulation and dp_getrateindex to pass puncturing mode
update DP_RATE_TABLE_SIZE to support 11BE

Change-Id: I7f59b29c18d882b541dca0477c7ed6c8cff4da59
CRs-Fixed: 3098366
2022-01-05 21:41:52 -08:00
Bapiraju Alla
fdaf4235b8 qcacmn: Update MLD mac address with ML dev ctx lock held
Currently MLD address is not being updated under lock. This may result
in unexpected behavior in racy scenarios.

To avoid this, update MLD address with ML dev ctx lock held.

Change-Id: I7c27edb0c02ebae0332f0498dfe1a1534d3d3379
CRs-Fixed: 3104028
2022-01-05 11:30:13 -08:00
Nandha Kishore Easwaran
18d2ccf267 qcacmn: Add pointer to platform dev in qdf_dev
Add pointer to platform device in qdf_dev.
This requirement is needed for enabling in Legacy interrupts
in QCN9224.

Change-Id: I99a0e1ec447315a342c9e22e3f2673f5af8c5893
2022-01-05 05:09:31 -08:00
Harsh Kumar Bijlani
84e111db2a Revert "qcacmn: Use atomic variant of qdf_mem_malloc for vdev stats"
This reverts commit Ia36a41deb5ba882adb0727538c085c33c7e38b7c.

Change-Id: I01b43f4552c4101e4d81ccc4ccb6c6d2405e5cdc
CRs-Fixed: 3103009
2022-01-05 00:34:18 -08:00
Yu Tian
9e61eb4514 qcacmn: Stop replenish timer during recovery
During recovery, when this timer is started, there is no
stop operation. If the timer is triggered and SSR is not
completed, it will visit re-inited data structure and lead
kernel crash.

Change-Id: I44a31d70ee80d59076e4121f6924faa470ce7575
CRs-Fixed: 3102029
2022-01-04 11:40:17 -08:00
Rakesh Pillai
5cc176837d qcacmn: Fix compilation error in FSE entry access
FISA is not supported by qca6390 and hence there are
compilation failure in FSE access.

Fix these compilation issues for qca6390.

Change-Id: I611b7e2068ad260a41add9b8bd5ab7a5345e8152
CRs-Fixed: 3103337
2022-01-04 10:33:04 -08:00
Jianmin Zhu
326f1015bc qcacmn: Add mpdu tx retries stats
Customer reported their HLOS LTE-WLAN transition algo sometimes go wrong
for wrong low layer stats, Txretry delta is bigger than Txtotal delta.
Txretry unit is msdu while Txtotal unit is mpdu.

Add vdev/peer stats for mpdu number of successfully transmitted after
more than one retransmission attempt, to align mpdu tx_packets, tx_failed.

CRs-Fixed: 3099490
Change-Id: Id4b9d8fd81af4bf0c141dad481bfd2b3f6c1db2a
2022-01-04 02:53:18 -08:00
Ashish
a48bfbce7c qcacmn: Remove get disconnect stats command from serialization
Currently in SAP mode, when host driver receives disconnect for
station, first it gets disconnect stats with serialization command
and then it sends delete peer command to fw. There is an issue with
this approach, if there are maximum number of clients are connected
to a SAP and all of these clients gets disconnected at the same
time, in that case there will be a disconnect stats command and
peer delete command in serialization, because of which serialization
queue gets full.
To address this issue, remove disconnect stats command from
serialization and send this command just before sending peer
delete command once peer delete command gets serialized.

Change-Id: Iab64e5dee8b0e2bb19b428a3c563a24b486250bc
CRs-Fixed: 3101553
2022-01-03 22:50:20 -08:00
Bapiraju Alla
3c40f95843 qcacmn: Add API to update MLD MAC address
Currently there is no provision to update MLD mac address in MLO manager.
MLD MAC address updation is required when MAC address randomization is
enabled.

To enable MLD address updation, add MLO manager API to update MLD address.

Change-Id: Ia2ccb1c32a3533748bda512e991e3d48d14c39f0
CRs-Fixed: 3103074
2022-01-03 15:02:52 -08:00
Shashikala Prabhu
3090d55051 qcacmn: Compute the remaining max channel switch time
As per the spec,
"A STA affiliated with a non-AP MLD, that operates on Link2, transmits a
(Re)Association Request frame to AP2 requesting Link1 as one of the links
for multi-link setup. Since the (Re)Association Response frame is
transmitted by AP2 after the last Beacon frame on the initial operating
class/channel on Link1 and before the first beacon on the initial
operating class/channel is transmitted, AP2 includes the Max Channel
Switch Time element in the per-STA profile corresponding to AP1 in the
(Re)Association Response frame it transmits. The value carried in Max
Channel Switch Time element provides an estimate of time until the first
TBTT on the new channel on Link1."

Hence, calculate the remaining max channel switch time using the below
steps.

When host receives the CSA complete event with the CSA count 1, calculate
the Max channel switch time for each vdev by adding the below values,
	a) Host triggers the channel switch when CSA complete event is
	   received with the CSA count 0. The time difference between
	   CSA count 1 and CSA count 0 is one beacon interval. Hence, add
	   one beacon interval.
	b) Add the channel change time. The total time required to receive
	   CSA event handler from FW with CSA count 0, plus, the time required
	   to process the CSA complete event, plus, the time required to send
	   multi-vdev restart request for all the vdevs in the new channel and
	   send updated beacon template (only for non-DFS channel) is
	   approximately 1 second (added a few milliseconds as delta and
	   considered 16 AP vaps here).
	c) Add DFS CAC duration of the new channel if the new channel is DFS.
	d) Add one beacon interval time (time required to send the beacon on
	   the new channel after VDEV up).
	e) Store the sum of the above time values in max_chan_switch_time of
	   the vdev_mlme object.
	f) Save the current time when host receives CSA complete event with CSA
	   count as 1 in the last_bcn_ts_ms of the vdev_mlme object.

Calculate the remaining channels switch time using the below formula.
- Remaining channel switch time is equal to the time when the last beacon
  sent on the CSA triggered channel plus max channel switch time minus
  current time.

Reset the max channel switch time and the last beacon sent time after
sending the VDEV UP command to FW.

Change-Id: I7c03bfae5e159419a6c9462591aeb2d6c5b4fb87
CRs-Fixed: 3076245
2022-01-03 09:04:19 -08:00
Disha Das
d162a849f1 qcacmn: Allocate mmie mic of size 16
Issue: On receiving robust bcast mgmt frames, for mmie
mic validation, mic of length 8 could be allocated.
The encrypt function however, always writes mic of length
16 resulting in memory corruption issue.

Fix: Allocate mic of size 16 for wlan_crypto_is_mmie_valid().
This is also corresponding to mic buffer size of 16 in
wlan_crypto_add_mmie().

Change-Id: I870251c0ed4224a7a974dad86f2808af7148be95
CRs-Fixed: 3091165
2022-01-03 06:34:01 -08:00
Neha Bisht
631d7e1a7d qcacmn: Prefetch tx desc and nbuf in lithuim Tx. send path
Prefetch tx desc and nbuf in lithuim Tx. send path.
This improves the UDP DL CPU idle% by ~1.5%

Change-Id: Ibd31d979c859824ed9f6b34a2685f8b9c4a7635d
2022-01-03 04:54:13 -08:00
Shashikala Prabhu
850aa79f06 qcacmn: Add changes to get the correct link info offset
With the existing offset calculation formula in util_get_link_info_offset
function, the calculated offset was always greater than the length of the
ML IE. Hence, the above function always returned the value 0 for the
offset. The reason is, for example, '(BIT (4) & multi_link_ctrl) * 6'.
We are expecting this calculation to return a value of 6, but it is
returning 96 (= 0x10*6).

Modified the util_get_link_info_offset() to use WLAN_ML_BV_CTRL_PBM_*
presence bitmap to get the link info offset.

Change-Id: Ic548361ac2e82bddaed574cf197c3523d47304d5
CRs-Fixed: 3091674
2022-01-03 02:19:56 -08:00
Ashish
0d31a3986e qcacmn: Add support to query BMISS stats from fw
Currently there is no support to read bmiss stats from fw.
With this change, add support to read bmiss stats from fw.

Change-Id: I75dee16fffac88303f22742eda1985dc15c6ec15
CRs-Fixed: 3097302
2022-01-03 02:19:51 -08:00
Chaithanya Garrepalli
2c1ccc9baf qcacmn: Fix NAWDS mcast loopback issue in intraBSS
For NAWDS intraBSS mcast traffic add check for SA
and DA peer to avoid loopback

Change-Id: Ifb987dbfe6d6f427cd8873315d4ffd67390b4e6f
2022-01-03 01:03:59 -08:00
Chaithanya Garrepalli
a4167759a9 qcacmn: Add QDF APIs for fctx and ftype
Add QDF APIs to set or get fctx and ftype

Change-Id: I4c752f7a5be8b01a11eec9775845384dc2a6a4c1
2022-01-03 01:03:54 -08:00
Yu Wang
384fc6eb86 qcacmn: hold large memory for DBR ring
To avoid memory allocation failure during idle restart,
hold the memories with large size for DBR ring during
the entire lifetime of PSOC.

Change-Id: Idfe5f0e895cc088509b5a62ae07191aed32864f2
CRs-Fixed: 3099522
2021-12-31 02:14:27 -08:00
Devender kumar
412a969aeb qcacmn: Fix Atomic Memory Allocation Method
Memory allocation in atomic context is not correct, as for
MEMORY_DEBUG profile the initial_memory_debug flag is set to
0 which leads in allocating memory with GFP_KERNEL flag
Issue is seen with SDX_PINE where the memory allocation is done
in sleeping context using GFP_KERNEL in interrupt context
Fix is create a new memory allocation API with GFP_ATOMIC flag

Change-Id: I3baa5b601b60f88fe2d9ff1f4008703c6507a267
2021-12-30 03:23:22 -08:00
Sai Pratyusha Magam
5d58a41518 qcacmn: Store default keyix in wlan_crypto_setkey for each peer
Store default keyix in crypto_priv for each peer.

Change-Id: Ieb77c390fddd667f99fd97c5ecdd4f3de61ae045
2021-12-30 03:23:17 -08:00
Sai Rupesh Chevuru
6bbb8971e2 qcacmn: Fix for ping issue in NAWDS Learning repeater mode
In qcn9224, NAWDS Learning repeater mode will receive packets
with reason as HAL_RXDMA_UNAUTHORIZED_WDS.

Change-Id: I6fe8428a5f8e2bac0e1db45b87169db0bd4cc271
2021-12-30 03:23:12 -08:00
Tiger Yu
5a474b79ed qcacmn: Destroy peer object in a delayed work
Destroy peer object in a delayed work to avoid any potential
executing in the atomic context for peer obj destroy handler.
Which might invoke wma_vdev_deinit->wakeup_source_unregister to
cause schedule timeout issue.

This new feature is not enabled by default. Will only be enabled
by defining the FEATURE_DELAYED_PEER_OBJ_DESTROY in the config.

Change-Id: I1cc41ab00f932d36b8658545dc7a5da43c9ebe30
CRs-Fixed: 3098157
2021-12-30 00:34:33 -08:00
Huashan Qu
0ff3ae8b94 qcacmn: Give SAE-PK AP more score to pass SAE-5.7.3 certification
When do SAE-5.7.3 certification test case, STA will choose non SAE-PK
AP to connect which is wrong expected result, non SAE-PK AP beacon
will carry with QBSS IE that contributes more score than SAE-PK AP
score config.

Fix is to give SAE-PK AP more score to pass SAE-5.7.3 certification
case.

Change-Id: Ib3e516ccfa673e19f9bf0869aeffe4f5b1862a71
CRs-Fixed: 3101317
2021-12-29 22:32:19 -08:00
Jeevan Kukkalli
3250ae1f63 qcacmn: Reset monitor configured status flag after filter update
Reset monitor configured status flag after filter update
so that monitor buf ring filters are reset properly

Change-Id: Ia575ddc36241ecd6afba0e2c2861bdd39b430da9
CRs-Fixed: 3099219
2021-12-29 12:34:10 -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
aloksing
00dfbabe8c qcacmn: Add wmi command to enable probing all bw
Add wmi command id and service id

Change-Id: I992bcbe41422b58219a2b4c5c91046a8c29ddf6f
2021-12-29 06:43:26 -08:00
sandhu
ad2829718c qcacmn: Remove IP from files
remove IP from code

Change-Id: If119a4af213b10aadb9f1344e50b0342e72405c2
CRs-Fixed: 3073864
2021-12-29 04:28:58 -08:00
Harsh Kumar Bijlani
2832d48c89 qcacmn: Use atomic variant of qdf_mem_malloc for vdev stats
Use qdf_mem_malloc_atomic for memory allocation while fetching
vdev stats.

Change-Id: Ia36a41deb5ba882adb0727538c085c33c7e38b7c
CRs-Fixed: 3097703
2021-12-29 02:55:10 -08:00
Edayilliam Jayadev
cb40cd916e qcacmn: Miscellaneous fixes in Mgmt Rx REO module
Add miscellaneous fixes in management Rx reorder module.

CRs-Fixed: 3094901
Change-Id: Iba579bac4243f42879fef0b1d3de2ac8ca05bea1
2021-12-28 23:14:05 -08:00
Edayilliam Jayadev
7b2b50778e qcacmn: Handle ref counts in Mgmt Rx reorder module
Handle refcount increment and decrement properly in
management Rx reorder module to avoid reference leaks.

CRs-Fixed: 3094885
Change-Id: I26d7ea360e7f6eabb755b825fd9d34c5320b4e82
2021-12-28 23:13:59 -08:00
Edayilliam Jayadev
ba7f1f77ef qcacmn: Add enhanced statistics for Mgmt Rx REO
Add enhanced statistics for management Rx reorder
module. Add key stats about the frames entering
and leaving the reorder module.

CRs-Fixed: 3094874
Change-Id: I8df7a9ac98106ff834c3897a6b495b8a0dd5214d
2021-12-28 23:13:54 -08:00
Edayilliam Jayadev
a245acf476 qcacmn: Atomically modify pending and stale list in Mgmt Rx REO
The operations with stale and pending list should be atomic.
Share a single spin lock for pending and stale list so that
the modifications are atomic.

CRs-Fixed: 3081847
Change-Id: Ia647de01af0172039659c73bdd32de819dae1257
2021-12-28 22:13:12 -08:00
Kiran Venkatappa
31d1d1ac4a qcacmn: Skip mlo setup triggers if soc in not mlo capable
Skip sending triggers for MLO setup if a soc is not mlo capable to avoid
inconsistent MLO setup exchange with target.

Change-Id: Ie17dcd03e2fcf778795d964a55e4a400adacfb33
CRs-Fixed: 3100309
2021-12-28 14:42:43 -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
Tushnim Bhattacharyya
2a660189e5 qcacmn: drop the log level to debug for invalid channel number
Drop the log level to debug from error for the prints indicating
input or output channel number is invalid.

Change-Id: Ief2f609f1c95c223c97cded6d81460e52a34c729
CRs-Fixed: 3100105
2021-12-28 10:51:59 -08:00
Rakesh Pillai
125174cdd1 qcacmn: Initialize only one RXDMA Monitor Status ring
For WCN7850, the first mac (i.e.. MAC0) is capable of
2G/5G and 6G data transfer. Hence initialize and use
only on RXDMA monitor status ring.

Change-Id: Idb6e23a887a9ed32a52dd54765e5ed3c6a12df06
CRs-Fixed: 3094138
2021-12-28 10:51:54 -08:00
Sai Pratyusha Magam
fc5f47db1a qcacmn: Release peer only after key access for peer is completed
Release peer only after key access for peer is completed

Change-Id: I88948536605eb4afac82772428938e0aaecbc957
2021-12-28 07:43:23 -08:00
Shiva Krishna Pittala
a9547b0f25 qcacmn: Add support to extract fixed params from Spectral Caps event
WMI_SPECTRAL_CAPABILITIES_EVENTID event will be sent by the FW to
indicated the different capabilities of the Spectral HW block.
Add support to extract the fixed parameters from this event.

Change-Id: Ib13108f078de008b6a76a25a010e85a7fdb6f5fe
CRs-Fixed: 3098203
2021-12-28 06:43:12 -08:00