Commit Graph

1337 Commits

Author SHA1 Message Date
Jithender Miryala
3a915602b8 qcacmn: Process the negative AFC standard EIRP power values
When we receive a negative EIRP value from AFC APP with UINT, we treat it
as a positive value. See the following reasons why EIRP power value
was changed when we received it as a UINT.

1. In the reg_find_eirp_in_afc_eirp_obj function, the afc 'eirp_power'
(16-bit) value is in units of 0.01, and it is an unsigned integer. For
example, if the negative value is "-1400" then it becomes "64136". With
this value, when we try to get the original EIRP value using division
(eirp_obj->eirp_power / EIRP_PWR_SCALE(100)), it returns "641", but the
expected EIRP value is -14.

2. In the reg_get_sp_eirp function, both the variables 'afc_eirp_pwr'
(8-bit) and 'reg_sp_eirp_pwr'(16-bit) are declared as unsigned integers.
For example, when "-14," is assigned to "afc_eirp_pwr", it becomes "242".
And assuming 'reg_sp_eirp_pwr' is "36", the minimum of the two variables,
using QDF_MIN(afc_eirp_pwr, reg_sp_eirp_pwr), becomes "36", but the
expected minimum is "-14 or 242".

Process the positive or negative EIRP values that are received from AFC
application. Receive it as an int instead of an unint and typecast it to
int when we check for minimum value from afc power and standard power.

Change-Id: I255225e1f68ab897d36f3d4fbd5e5815a862460b
CRs-Fixed: 3398501
2023-04-19 10:36:58 -07:00
Venkateswara Swamy Bandaru
c7c3c49381 qcacmn: Add 11be D3.0 status code
Update status codes enum with new EHT status codes
as per 11be D3.0

Change-Id: Ib3a4963a01f1df98d2adf77d57b03d933753f297
CRs-Fixed: 3469032
2023-04-19 00:02:07 -07:00
Rakesh Boyina
2567b43224 qcacmn: Add enum to map AFC response format.
Add enum to parse and store AFC response format type. This enum is
used to map the response format negotiated with FW during WMI init.

Change-Id: I5c0b61aeddfce1d1b64f9225f64546f80d0e9e3e
CRs-Fixed: 3420549
2023-04-18 12:09:30 -07:00
Aasir Rasheed
9de835aa83 qcacmn: Add 11be Draft 3.0 support
Add EHT capability and EHT Operation changes to
support 11be Draft 3.0.

Change-Id: I099416f985af1f4e6f2f69fc3d55ef158d6fb2ca
CRs-Fixed: 3453366
2023-04-17 00:43:25 -07:00
Jianmin Zhu
54d4446b4b qcacmn: Add channel switch wrapper IE V2 present flag
Channel switch wrapper IE V2 includes bandwidth indication sub IE from
IEEE802.11be draft 3.0 optionally.

Change-Id: Ie1b62ad18dfeccc64505240399947fc5f3e8a18d
CRs-Fixed: 3458351
2023-04-15 02:57:49 -07:00
Venkateswara Swamy Bandaru
f2c4751559 qcacmn: Add ie cap set and get APIs
Add ie capability set and get APIs

Change-Id: I25e9f8a5ee0cd049f1fe7abddc151217ff7668d3
CRs-Fixed: 3347566
2023-04-13 09:33:11 -07:00
Pragaspathi Thilagaraj
4c252e1598 qcacmn: Add if_mgr support to handle STA CSA
Add if_mgr support to handle STA CSA complete notification and
SAP CSA Started and complete notification.
Before CSA vdev restart on SAP side, disable TDLS off channel.
After CSA, check if TDLS is allowed for the current concurrency
and take action accordingly.

Change-Id: Icbadb898f5b468717f74f92a0993c05b59719205
CRs-Fixed: 3445113
2023-04-12 12:54:11 -07:00
Vinay Adella
dd28763069 qcacmn: Fix issues when WLAN_MGMT_RX_REO_SUPPORT is disabled
Add APIs for cases when WLAN_MGMT_RX_REO_SUPPORT is disabled.

CRs-Fixed: 3454960
Change-Id: If7bb4757ab14b20ad14298b358962319f289a777
2023-04-10 03:08:21 -07:00
Guru Pratap Sharma
08131c79a1 qcacmn: Add Bandwidth Indication Element support
Adding Bandwidth Indication Element Sub IE structure and other support

Change-Id: Iae761582e8c5d2b12af231e58c6dcbb23421e9dd
CRs-Fixed: 3444254
2023-04-06 18:13:29 -07:00
Rohan Dutta
4600a3b873 qcacmn: skip a radio as primary-umac in MLO
Allow user configuration options to skip a radio as
primary-umac in multi-link operation.

Change-Id: Ic7c8dd5c1cf7855f4fb762daf9ace7cb82e02cac
CRs-Fixed: 3437922
2023-04-06 08:55:47 -07:00
Vignesh U
5dc7fe9a25 qcacmn: Unpack AFC structures
During initial AFC development it was assumed that AFC object would travel
till an application endpoint outside the driver, presumably till an
application of a different machine anything in the internet and therefore,
a packed and well formatted structure was propped for the AFC object.
However, when the AFC object leaves the driver, it is converted to an
object that has NL80211 TLVs to represent it. Therefore, the packed
AFC-request object is no longer a necessity. Moreover, since an unpacked
structure (or structures) is speed/time optimized, modify the packed
structures into unpacked structures.

Change-Id: I08db1911a355b6eebffa0e13def547c98ddf38d3
CRs-Fixed: 3431997
2023-04-03 01:36:23 -07:00
Paul Zhang
310c7ce085 qcacmn: Add enums for TDLS for MLO feature
1\ Add QDF_STATUS_TDLS_MLO_SYNC,
2\ Add WLAN_ELEMID_LINK_IDENTIFIER.

Change-Id: I58e912dc46a48b9ba7c2d411a2ccd7e107df1b22
CRs-Fixed: 3435983
2023-03-30 14:44:29 -07:00
Rahul Gusain
4e7ff1e143 qcacmn: fetch roam vdev from pdev obj
Driver extracts the vdev from peer, self mac address and
vdev_id. But in some APIs, there can be below scenarios
For example:
1. peer is not available for that vdev( roam vdev),
2. API does not have vdev_id,
3. mac address is not known or incorrect,
4. there is no session available.
While roaming, there can be scenario where driver need to
fetch the vdev before peer creation and session is not
available.
For this, driver introduces new API to fetch roam vdev from
pdev object.

Change-Id: I4a2521773b893a8dc0553335bcadac5a84fbc300
CRs-Fixed: 3441493
2023-03-30 09:01:23 -07:00
Shiva Krishna Pittala
45da3822ae qcacmn: Fix use-after-free of MGMT Rx params in wlan_mgmt_rx_reo_algo_entry
Once an incoming MGMT frame is inserted in the MGMT Rx REO egress list from
wlan_mgmt_rx_reo_algo_entry(), there is always a possibility that the same
frame could be sent to upper layers from the other CPUs before
wlan_mgmt_rx_reo_algo_entry() completes its execution in the original
MGMT Rx path. This means that nbuf and MGMT Rx params of a given frame
could be freed before wlan_mgmt_rx_reo_algo_entry() completes.
Hence, make sure to not access frame's nbuf and MGMT Rx params once the
list updates are done for that frame.

Change-Id: I91cbdef4b1ea5b81d39606e47a46021f30193ce5
CRs-Fixed: 3433621
2023-03-30 02:32:30 -07:00
Nidhi Jain
4f84ad378c qcacmn: Add 11az TB rsta ext feature flag support
The existing code does not support capability to be set
if trigger based ranging rsta wmi service bit is enabled.
This require addition of ext feature flag for trigger based
ranging rsta support.
Add 11az TB rsta ext feature flag and set the same as per
firmware capability for 11az feature.

Change-Id: I12512175d0b33daa906586c7f96f0c8c3f7400a3
CRs-Fixed: 3437057
2023-03-29 11:29:44 -07:00
Surya Prakash Sivaraj
88804f2cfc qcacmn: Add support for AKM25
Add support for FT-SAE-EXT-KEY AKM.

Change-Id: I832b414b31d42113eec6d099ba4c62e76dfe6cb1
CRs-Fixed: 3406626
2023-03-27 11:21:18 -07:00
Rachit Kankane
d525bc0165 qcacmn: Support WMI_CSA_IE_RECEIVED_EVENTID
Add support for WMI_CSA_IE_RECEIVED_EVENTID as:

   1. Register the handler
   2. Handler to extract the event

Change-Id: I9f476c7fbc51d9686d05fbdb5f46dec3bcd3c29e
CRs-Fixed: 3431363
2023-03-27 09:22:51 -07:00
Paul Zhang
2859ea85d1 qcacmn: Add flag WLAN_VDEV_FEXT2_MLO_STA_TDLS
Add a flag WLAN_VDEV_FEXT2_MLO_STA_TDLS to mark whether
the vdev is used for TDLS or not.
It can use these API:
wlan_vdev_mlme_feat_ext2_cap_set(vdev, WLAN_VDEV_FEXT2_MLO_STA_TDLS);
wlan_vdev_mlme_feat_ext2_cap_clear(vdev, WLAN_VDEV_FEXT2_MLO_STA_TDLS);
tdls_vdev = mlo_get_tdls_link_vdev().

Change-Id: I89c50ad5321013993e798ebb5549c5015ac18969
CRs-Fixed: 3435963
2023-03-25 05:32:51 -07:00
Shwetha G K
40931af2b3 qcacmn: t2lm draft 3.0 changes
Changes to incorporate link mapping size in t2lm control
field of t2lm ie per draft 3.0

CRs-Fixed: 3431897
Change-Id: I61834258e6348b6483a86eb9e9217e3d5997c2c9
2023-03-22 07:33:20 -07:00
Pragaspathi Thilagaraj
381a41f67d qcacmn: Read service capability for TDLS concurrencies
Read the new service capability:
WMI_SERVICE_TDLS_CONCURRENCY_SUPPORT for TDLS concurrencies
support. With this service capability below concurrencies are
supported:
STA+TDLS+P2P
STA+TDLS+P2P+P2P
STA+TDLS+P2P+SAP

Host driver will check this capability to disable TDLS
off channel when concurrent interface comes up. If this
service cap is not advertised by the firmware then
existing TDLS connection will be teared down when concurrent
interface is started.

Change-Id: I744775080a22ca8f3bc88894c349916eea27fd3a
CRs-Fixed: 3414266
2023-03-21 11:51:23 -07:00
Aravind Kishore Sukla
c60807a9c9 qcacmn: Remove ie len check for SON_IE_LEN
SON IE length check drops some of the AP beacon or probe
response due to length mismatch.

As length may increase for some of APs. Remove check for
ie len of WLAN_VENDOR_SON_IE_LEN

Change-Id: I74add7ea539913f67bf7d11e2ff8e4b0374eba05
CRs-Fixed: 3418249
2023-03-16 07:44:43 -07:00
Edayilliam Jayadev
4855c6ef1a qcacmn: Enable management rx reo scheduler
Enable management Rx reorder scheduler.

CRs-Fixed: 3410648
Change-Id: I90fad2bb3c118f3d9021dc94ecdd1a300c9ab00c
2023-03-14 08:46:27 -07:00
Edayilliam Jayadev
d3f1f54f3f qcacmn: Add mgmt Rx REO scheduler debug support
Add support for mgmt Rx REO scheduler debug.

CRs-Fixed: 3409291
Change-Id: I5027fb4196d3d072fe4ade880eb217bcef47a6d3
2023-03-12 13:42:51 -07:00
Rohan Dutta
b606c4ad39 qcacmn: Add support for AKM25
Add support for AKM FT_SAE_EXT (00:0f:ac:25)

Change-Id: Iae9fbfbc0989e0bcac343c1814ad4a442243e8f4
CRs-Fixed: 3408695
2023-03-08 04:19:12 -08:00
Shashikala Prabhu
4ed5695ef3 qcacmn: Add NULL check for MLO dev context
MLO dev context is accessed without NULL check.
Add NULL check before accessing the MLO dev context.

Change-Id: I51d672924dbbf70cbf4b7e4951a3a45d4fd551ec
CRs-Fixed: 3409901
2023-03-05 21:52:13 -08:00
Krunalsinh Padhar
6d5fea01f7 qcacmn: Selective peer discon during non-DFS to DFS
Disconnect only non ML peers in CSA from non-DFS channel to DFS channel,
while keeping all MLO peers connected.

Change-Id: I7e8347cf4692b16b84ffbce4b102dd2f23bb70f0
CRs-Fixed: 3394219
2023-03-05 11:23:00 -08:00
Balaganapathy Palanisamy
98a8a833ab qcacmn: Add peer type for MLO Bridge
Add peer type for MLO bridge peer. This is a special peer
created on 4-link MLO AP to allow association of some 2-link
MLO STAs.

Change-Id: Id2073ea82582ae67cae03b813d8f7bf44fde9aff
CRs-Fixed: 3412299
2023-03-04 11:52:49 -08:00
Jeff Johnson
9c85a8e52b qcacmn: Rename wlan_crypto_reset_vdev_prarams()
The wlan_crypto_reset_vdev_params() stub function, used when the
CRYPTO_SET_KEY_CONVERGED feature is not enabled, is misnamed, so
correct the naming.

Change-Id: Iff7db65f61dbec15529832c9db4430f908442645
CRs-Fixed: 3421947
2023-03-04 05:51:07 -08:00
Surya Prakash Sivaraj
176d7758b2 qcacmn: Add macro to determine WPA3 AKM
Add a macro to determine if a particular AKM is WPA3-based
AKM.

Change-Id: I9b3f546e2e0f69281305ca9052dc109fb6812e21
CRs-Fixed: 3418837
2023-03-02 23:54:29 -08:00
Deeksha Gupta
d9be0596ba qcacmn: API to expose vdev mlo_external_sae_auth
Adding a new API to expose vdev_objmgr.mlo_external_sae_auth

Change-Id: I5ea1910dad2871290440e941fb33fa1f3d4e8099
CRs-Fixed: 3402538
2023-03-01 05:44:44 -08:00
Tiger Yu
73d74205f1 qcacmn: Free peer obj directly if current context is in non-atomic
Free peer object directly if current running context is not in atomic to
make the code much more reasonable and logical.

1. If current running context is not in atomic state, it's safe to call
   peer free object directly.
2. If current running context is in atomic state, then delay this free
   in a work item to avoid scheduling issue.

Change-Id: I9acf97354619ed2b6c09b3f619bd10dc930d8afb
CRs-Fixed: 3412111
2023-02-28 05:14:29 -08:00
Edayilliam Jayadev
84ec76c1aa qcacmn: Set/get scan blanking feature support
Extract the scan blanking feature support from WMI service ready
event and store it in target if data structures. Add API to check
whether scan blanking feature is supported for a given pdev.

Change-Id: I65fefbb879b8433a68338bfcd3e4f729eff3ddd8
CRs-Fixed: 3413922
2023-02-27 06:31:43 -08:00
Edayilliam Jayadev
a0d45f3ac7 qcacmn: Add tgt APIs to schedule/cancel delivery of frames
Add tgt APIs to schedule/cancel the delivery of management
frames.

Change-Id: Id9b78f8819270f2eba143e9b19dc245eb925612c
CRs-Fixed: 3408594
2023-02-21 22:04:08 -08:00
Edayilliam Jayadev
b3c257785e qcacmn: Add UMAC APIs to schedule/cancel delivery of frames
Add UMAC APIs to schedule/cancel the delivery of management
frames.

CRs-Fixed: 3408367
Change-Id: Iee7745b6e9e4e4269f9faede221f648a516fdc20
2023-02-21 22:03:46 -08:00
Edayilliam Jayadev
6301cfb1f6 qcacmn: Add per pdev/psoc init APIs
Add per pdev/psoc initialization APIs in management Rx reorder module.

Change-Id: Ic60a195bc62a4bc70e10bbb07133d1e3184f4685
CRs-Fixed: 3408290
2023-02-21 22:03:22 -08:00
Sai Pratyusha Magam
373c20c855 qcacmn: Fix improper naming convention
Fix improper naming convention for store_def_keyix_peer
Avoid qdf_export since the function is defined and called
from the same file

Change-Id: I488267eccf521071038958fe85e9c1be90df27b2
CRs-Fixed: 3384714
2023-02-20 10:39:10 -08:00
Edayilliam Jayadev
de1279ed3f qcacmn: Mark a frame as ready for delivery on insertion to egress list
Whenever a frame is added directly to egress list, mark it as ready
for delivery.

Change-Id: Ifb2eff595227c3c6857666624ab272fd20845756
CRs-Fixed: 3405305
2023-02-18 13:33:11 -08:00
Kiran Venkatappa
7260b2db76 qcacmn: Add r-twt related changes
Add changes to read R-TWT svc bit from FW and update capabilities on
host accordingly. Update add twt session command to include new
params required for R-TWT.

Change-Id: I91cea65ef737b6fa445cb3680dac15e0f1063446
CRs-Fixed: 3399205
2023-02-16 18:20:03 -08:00
Edayilliam Jayadev
0571d2f7bf qcacmn: Handle ingress reo list overflow
Handle overflow of management Rx reorder ingress list.

CRs-Fixed: 3402355
Change-Id: I2e7ab5b672e6cb2db2cb1e47d3854ad55d6b540a
2023-02-14 11:03:23 -08:00
Gururaj Pandurangi
3739c21995 qcacmn: Add vdev cap to exclude sta profile from MLO IE
Define a new per vdev capability flag to exclude the sta
profile from MLO IE in unicast probe request frames.

Change-Id: I4486e4efbbb85dfa1e7b9d47326c60c79c974829
CRs-Fixed: 3392086
2023-02-14 03:26:55 -08:00
Jeff Johnson
5ef54a9f8a qcacmn: Fix umac/cmn_services documentation
The kernel-doc script identified many documentation issues in the
umac/cmn_services folder. A series of patches have already fixed most
of the issues on a sub-folder basis, so fix the remaining ones.

Change-Id: Ibdfe9f0c5e8d6ddf9696d66d2a4a31978ff89004
CRs-Fixed: 3403261
2023-02-13 05:28:22 -08:00
Edayilliam Jayadev
f90aff5d36 qcacmn: Avoid queuing of stale frames
Avoid queuing of stale frames into the management
Rx reorder egress list. Instead drop the stale frames
at the entry itself.

CRs-Fixed: 3402325
Change-Id: I80de6311e345feb2518ce7f042c53ffa95d22dfa
2023-02-13 01:08:02 -08:00
Varsha Mishra
d6afad86bc qcacmn: Add global context
Global context will contain fst context, fst ref count
and global desc count.

Change-Id: I272fa2c3b8945822268d29b6c329df3f659753d4
CRs-Fixed: 3392039
2023-02-12 03:21:18 -08:00
Edayilliam Jayadev
060f2a7ebc qcacmn: Separate reorder list into ingress and egress lists
Reorder list holds incoming frames and frames to be delivered to
upper layers. Split the reorder list into two, ingress list and
egress list. Ingress list stores the incoming management frames
and egress list stores the management frames which are ready to
be delivered to upper layers.

CRs-Fixed: 3386123
Change-Id: I479f5d15bfab40649053b0ee2a0d8c13d80f8bba
2023-02-08 06:56:36 -08:00
Jeff Johnson
b0fa96084a qcacmn: Fix umac/cmn_services/crypto documentation
The kernel-doc script identified some documentation issues in the
umac/cmn_services/crypto folder, so fix them. In addition there are
multiple instances of both the interface and the implementation being
documented, so remove the duplicates, keeping just the interface
documentation.

Change-Id: Ied5bfcdff185d0b144f8c41affb5adcb3b8a5b88
CRs-Fixed: 3394398
2023-02-07 09:41:28 -08:00
Anbarasan Ganesan
8921c69fe7 qcacmn: Initialize whole char array elements
Initialize whole char array elements instead of initializing
just the first element in an array.

Fixed below compiler optimization error:
error: suggest braces around initialization of subobject.
[-Werror,-Wmissing-braces]

Change-Id: I103d95274e654cb7d232775cf7986a772741a152
CRs-Fixed: 3357183
2023-02-06 08:58:51 -08:00
Neha Bisht
30bc8285d2 qcacmn: Add global context for maintaining descriptor count
Add global context to maintain descriptor count at global level.

Change-Id: Ibfe3379bb4a747530794956cc0cba31e423598d3
CRs-Fixed: 3334340
2023-02-03 05:57:55 -08:00
Uraj Sasan
52f91b32b9 qcacmn: Reduce the value of macro due to memory Impact
In Multi-Chip MLO, FW is having memory constrain
while increasing the maximum supported MLO LINKS.

Reduce the values to avoid memory issue in FW

Change-Id: Id191f45f25de915e88ed1e12ae56d4a6e7b7095f
CRs-Fixed: 3391537
2023-02-02 22:01:06 -08:00
Surya Prakash Sivaraj
1d91f07450 qcacmn: Align RSNXE with IEEE P802.11az/D7.0 definitions
RSNXE bits are modified in the recent draft. Rename
WLAN_RSNX_CAPAB_PROT_RANGE_NEG to WLAN_RSNX_CAPAB_URNM_MFPR
and the bit position is changed to 15 instead of 10.

Change-Id: Iebca652a952b338f0533023581ebe45bc0aae452
CRs-Fixed: 3387173
2023-02-02 10:21:04 -08:00
Jeff Johnson
56519552e2 qcacmn: Fix umac/cmn_services/regulatory documentation
The kernel-doc script has identified documentation issues in the
umac/cmn_services/regulatory folder, so fix them.

Change-Id: I134c0692507f58e2c9b13d71bec74d57a566a91c
CRs-Fixed: 3390471
2023-01-31 19:43:39 -08:00