Commit-Graf

1337 Incheckningar

Upphovsman SHA1 Meddelande Datum
sandhu
901120c066 qcacmn: Fix incompatible function pointer assignment
Fix incompatible function pointer assignment.
Define a wrapper around mc timer callbacks to
make them compatible with standard scheduler
message callback function signatures.

Change-Id: I07829680d1758ccbd53e8b1fe10b0e30e100a2c6
CRs-Fixed: 3305719
2022-10-26 18:47:58 -07:00
Amruta Kulkarni
ebeaf9b564 qcacmn: Define T2LM control parameters
Define TID to link mapping control field parameters.

Change-Id: I450debf709e89146e440e314ea997461de4e956b
CRs-Fixed: 3245435
2022-10-26 01:17:34 -07:00
David Oladunjoye
25cb050e32 qcacmn: Add lock to Set/clear WLAN_VDEV_FEXT2_MLO_STA_LINK flag
Currently, this MLO flag is being set/clear without regard for
concurrency. We need to lock the vdev when updating these values to
prevent race condition.

Change-Id: Ied90d62f10f6f12a35eeac3060dd0fae7d0c6cfd
CRs-Fixed: 3305558
2022-10-21 21:31:17 -07:00
Paul Zhang
15a10610be qcacmn: add the enum of ie elements
Add the enum of ie elements:
WLAN_ELEMID_TWT, WLAN_EXTN_ELEMID_UROA,
WLAN_EXTN_ELEMID_BSS_COLOR_CHANGE_ANNOUNCE.

Change-Id: I823ab150bf7f65173774eecd5f3c0f093cb5979f
CRs-Fixed: 3296198
2022-10-20 12:50:39 -07:00
Jeff Johnson
e12273c5cd qcacmn: Fix misspellings of "forwarded"
The RX REO functionality has numerous misspellings of "forwarded",
including multiple identifiers. Fix these to use the correct spelling.

Change-Id: Idc4e66e7356b978742fea30ae7ef0c9498c4f938
CRs-Fixed: 3313839
2022-10-20 03:00:21 -07:00
Jeff Johnson
0906d287f3 qcacmn: Fix misspellings of "nonce"
In wlan_crypto_global_api.c there are several functions which use a
misspelled term for "nonce" so replace them with the correct spelling.

Change-Id: Iedc65bbad173c5fc398e25730853bc7b36e86b31
CRs-Fixed: 3313801
2022-10-18 16:30:45 -07:00
Liangwei Dong
7f3b6c9512 qcacmn: Add new enum action OUI type support
Add ACTION_OUI_11BE_OUI_ALLOW enum to support new WMI action
oui type WMI_VENDOR_OUI_ACTION_ALLOW_11BE.
Add scan entry to candidate validation struct.

Change-Id: I502a246584cd5ee6b4759d8fbb67629628314560
CRs-Fixed: 3301859
2022-10-17 12:58:09 -07:00
Rachit Kankane
a9083f7afe qcacmn: Add macro for Spatial Reuse
Add below macro for SR:

1. HESIGA_Spatial_reuse_value15_allowed bit
2. NON-SRG PD disabled threshold
3. Minimum PD Threshold
4. Add service bit - wmi_service_obss_per_packet_sr_support

Change-Id: I9560518cadc5c6f916579af63ef44d41c748fd8d
CRs-Fixed: 3307369
2022-10-17 06:48:16 -07:00
Aakanksha Doda
c9dce3011f qcacmn: Move the QCN attributes enum to common code
Move the QCN attributes enum to common code to keep a sync
between FW and Host values.

Change-Id: I0e4da33781c9e5230b6b309942cdc672c707d29f
CRs-Fixed: 3307120
2022-10-17 04:52:23 -07:00
Amruta Kulkarni
319456fee7 qcacmn: Add callback api to send stored keys
For STA MLO connection, the AP can send M1 right after assoc
response on assoc link, which will trigger sending keys to FW
for mlo links, but it can happen that wmi_peer_assoc is not
sent for mlo link until this time.
Current code does not have handling for this case.

To solve this, store the link vdev keys and send them once
link vdev is connected.

Change-Id: I882da96280711ca9cfa4d6ba852fda4a8b6d7a77
CRs-Fixed: 3293692
2022-10-12 23:22:44 -07:00
Jeff Johnson
ed240b1daf qcacmn: umac: cmn_services: Fix misspellings
Fix misspellings in umac/cmn_services/...

Change-Id: I74c006b3e585e3d4f6ec8c025ef313133c9e3068
CRs-Fixed: 3304695
2022-10-11 00:47:41 -07:00
Rajesh Chauhan
de24535ff4 qcacmn: objmgr: change prototype of functions to pass dev_addr as const
In kernel 5.17, net_device->dev_addr is changed to const unsigned char*.
Modify prototype of below functions to pass dev_addr as const:

 - wlan_objmgr_get_vdev_by_macaddr_from_pdev()
 - wlan_objmgr_get_vdev_by_macaddr_from_pdev_debug()
 - wlan_objmgr_get_vdev_by_macaddr_from_pdev_no_state()
 - wlan_objmgr_get_vdev_by_macaddr_from_pdev_no_state_debug()
 - wlan_objmgr_get_vdev_by_macaddr_from_psoc()
 - wlan_objmgr_get_vdev_by_macaddr_from_psoc_debug()
 - wlan_objmgr_get_vdev_by_macaddr_from_psoc_no_state()
 - wlan_objmgr_get_vdev_by_macaddr_from_psoc_no_state_debug()

Change-Id: I787fd26301d472e73e397fc89f05e4d8161877f7
CRs-Fixed: 3304954
2022-10-05 19:33:41 -07:00
Edayilliam Jayadev
de3d501003 qcacmn: Allocate memory dynamically in mgmt Rx REO module
Allocate memory dynamically for management Rx reorder data structures.

CRs-Fixed: 3260284
Change-Id: I5aee3c5a3c861f5fc99bf8ad41bcbbe3305ef172
2022-10-04 10:30:41 -07:00
Kani M
2cfc1273ba qcacmn: Fix for memleak in VLAN cases
During wlan_crypto_setkey, the mem_alloc for key is done and
all keyidx within WLAN_CRYPTO_MAX_VLANKEYIX are to freed in
crypto_free_key.

Change-Id: Ieae0f9f4eecabe1fb23812a9e436037bb4dad128
CRs-Fixed: 3296394
2022-09-30 07:49:17 -07:00
Abhishek Singh
1d0d789fe0 qcacmn: Add vdev id info in serialization logs
Enhance serialization logging by adding vdev id info in logs to
differentiate same cmd id across vdevs.

Change-Id: I6706b07044769b56832e67388924f767ad5aabfe
CRs-Fixed: 3297468
2022-09-29 04:22:38 -07:00
Krishna Rao
2bac69b79e qcacmn: Add Link Info definitions for Reconfig ML IE
Add the following definitions related to the Reconfiguration variant
Multi Link element:
- Fixed fields of Per-STA Profile subelement in Reconfiguration
variant Multi-Link element Link Info field.
- Definitions related to STA Control field of Per-STA Profile
subelement in Reconfiguration variant Multi-Link element Link Info
field.
- Definitions related to STA Info field of Per-STA Profile subelement
in Reconfiguration variant Multi-Link element Link Info field.

Change-Id: I4f5a06a60461f37f6a45bf4c15f203980c0e22b9
CRs-Fixed: 3296891
2022-09-23 22:38:21 -07:00
Krishna Rao
d1a389d7a2 qcacmn: Add control and common info definitions for Reconfig ML IE
Add the following definitions related to the Reconfiguration variant
Multi Link element:
- Encoding for Reconfiguration variant in the Type subfield in
Multi-Link element Control field. (Additionally for completeness, add
the missing encodings for TDLS and Priority Access variants for this
subfield).
- Definitions for bits in the Presence Bitmap subfield in
Reconfiguration variant Multi-Link element Control field.
- Definitions related to Reconfiguration variant Multi-Link element
Common Info field.

Change-Id: Ie5f89438533f372cd020831a0de0fdafac94d6af
CRs-Fixed: 3296867
2022-09-23 21:53:39 -07:00
Abhishek Singh
3ec922f543 qcacmn: Avoid using igtk key index for Mcast WEP key
Use def_tx_keyid for Mcast wep key.
Also reset all the key index in wlan_crypto_free_key once igtk,
bigtk and Ucast/Mcast are freed, so that their values are not
carried to next connection.

Change-Id: I9a1e8715c54f47905889511f983b3127b9b5cfcd
CRs-Fixed: 3297270
2022-09-22 10:41:39 -07:00
Himanshu Batra
eaea81b4f2 qcacmn: Add API to find if blocking cmd is present in serialization queue
Add API to find if blocking cmd is present in serialization queue

Change-Id: Ia37e47f03a69dd81ecf3ae693e1ae7610908ca32
CRs-Fixed: 3296751
2022-09-22 10:41:31 -07:00
Utkarsh Bhatnagar
bf2b82dec7 qcacmn: Match vdev as well while cancelling ser cmd
For a particular vdev, If one of such same CMD id
is needed to be cancelled, either
wlan_ser_cancel_scan_cmd() is called if cmd is scan
cmd or wlan_ser_cancel_non_scan_cmd() is called if
cmd is non-scan cmd.
For both the cases, currently cmd_id is iterated
among pdev serialization cmd queue and if cmd_id
is matched then that particular id is flushed.
Since in per vdev cmd_id, same ids can be assigned
across multiple vdevs and it may be possible that in
the pdev serialization cmd queue, different vdev can
enqueue the same cmd id.
Hence, with current condition that only checks for
cmd_id may result in incorrectly cancelling the
same cmd_id for different vdev.
To prevent this, along with checking for cmd id
and type, check for the valid vdev and remove
the cmd corresponding to that vdev only

Change-Id: I10d37588a52e8d3209c7521782716e2358e57079
CRs-Fixed: 3295516
2022-09-22 06:09:44 -07:00
Deeksha Gupta
4b36439025 qcacmn: Add 11be eht_cap changes in SAP mode
Add 11be eht_cap changes in SAP mode.

Change-Id: I9c27e079276d8ea7eebda97954a69a485fa6d828
CRs-Fixed: 3265712
2022-09-21 21:38:28 -07:00
Surabhi Vishnoi
997b924222 qcacmn: Reduce log level from error to debug in wlan_vdev_get_bss_peer_mac
Bss peer can be NULL in case of vdev in disconnected state,
so change the log level from error to debug in 
wlan_vdev_get_bss_peer_mac() to reduce logging in dmesg.

Change-Id: Idac08200253d83f267be3381691e10d6bd4b52bf
CRs-Fixed: 3293402
2022-09-21 20:02:58 -07:00
Vivek
d6fb91fd85 qcacmn: Add module ID for SAWF
Add a new module ID for Service Aware Wifi

CRs-Fixed: 3283808
Change-Id: Ie4020aaff84439fc2bab163583f481adba5b4109
2022-09-08 02:57:14 -07:00
aloksing
c06d7b8d27 qcacmn: Fix compilation issue without CFR
Build failure when CFR is disabled.
Remove including unnecessary header file.

CRs-Fixed: 3257872
Change-Id: If93116d132f209b0deda55492879d4facdd2be70
2022-08-31 16:04:19 -07:00
Mohammed Ahmed
fa6e07082f qcacmn: add psoc null pointer check to wlan_objmgr_get_peer_by_mac
Current code directly passes the result of wlan_vdev_get_psoc(vdev) to
wlan_objmgr_get_peer_by_mac, without null pointer checking, which can
result in null pointer dereferencing.
To fix this issue, add checking of the psoc pointer before passing,
and add verification inside wlan_objmgr_get_peer_by_mac.

Change-Id: Iaf0e2535c3a584db788ddc621745c66c296fe08f
CRs-Fixed: 3277651
2022-08-29 22:19:33 -07:00
Edayilliam Jayadev
89fbda97fc qcacmn: Handle error scenarios in mgmt Rx REO module
Handle the following error scenarios in management Rx REO module.

    1. Pdev corresponding to a HW link is deleted.
    2. Pdev corresponding to a HW link not yet initialized completely.

CRs-Fixed: 3272812
Change-Id: I34fbb19e24649371ff0ddb591e2ec14bfdfee58a
2022-08-29 10:00:40 -07:00
Srinivas Dasari
77026d4a4d qcacmn: Avoid CH_WIDTH_320MHZ dependency on 11BE define
CH_WIDTH_320MHZ definition is in 11BE define currently and it's
causing duplicate code in 11BE supported/unsupported cases.
Definition need not be in 11BE define as it doesn't cause any
impact on memory.

Change-Id: I996aad941bef33eef6527c4c34c5b9efd75d9b84
CRs-Fixed: 3246577
2022-08-26 09:10:26 -07:00
Himanshu Batra
31864b63ee qcacmn: Add timestamp in serialisation history for debuggability
Add timestamp in serialisation history for debuggability

Change-Id: I6ea5019f9c4501512877a67bc01caf7c428cc893
CRs-Fixed: 3275070
2022-08-25 12:13:15 -07:00
Uraj Sasan
02a498a074 qcacmn: Clean up code to avoid duplication
Avoid code duplication by using common definitions
i.e use enum wlan_ml_linfo_subelementid.

Change-Id: Ia09c1a42207461878d023e8f4534f2d26fb2f81b
CRs-Fixed: 3227859
2022-08-23 02:41:03 -07:00
Yu Wang
67011a392c qcacmn: add support for CoAP
Add support for Constrained Application Protocol.

Change-Id: I425206a990778cf946a4805192eff4d54562a945
CRs-Fixed: 3254128
2022-08-17 23:14:34 -07:00
Basamma Yakkanahalli
8a1a784ac8 qcacmn: Add vdev feature flag for 20TU probe resp
6 GHz SAP needs to send either a probe response or fils
discovery at configured interval.  These in band
discovery frames can be disabled when lower band vdevs
are collocated with 6 GHz vdevs.

FILS disabled when lower band vdevs were up.
After vdev up send if WLAN_VDEV_FEXT_FILS_DISC_6G_SAP
is not set, host sending FILS command to enable 20TU.

Either driver or user not enabled 20TU probe response,
Host did not send the 20TU PRB RESP TMPL before sending
20TU PRB RESP enable command resulted Target assert.

Fixed this issue by adding 20TU vdev feature flag
and add appropriate check before sending command
to enable 20TU probe response.

Change-Id: Icb0ea5ef40b1fe2dd2dc6b97dc079ab7780e8cfc
CRs-Fixed: 3244471
2022-08-12 02:36:06 -07:00
Pavankumar Nandeshwar
bdb7f89395 qcacmn: Umac changes for umac prereset handling
Handle Umac prereset event from firmware.

Change-Id: I651eb9e6359399fe5689e4209e4685955d653973
CRs-Fixed: 3174560
2022-08-11 15:23:28 -07:00
Edayilliam Jayadev
760841b1de qcacmn: Reduce wait count by packet counter delta
Update wait count as per the following formula.

new wait count = min(old wait count - packet counter delta, 0)

CRs-Fixed: 3261649
Change-Id: Ie5b2055e41518a87543b52c18c366f42291b8093
2022-08-09 13:08:17 -07:00
Vulupala Shashank Reddy
899d504312 qcacmn: Fix FTM rx frames capture in packet capture mode
Currently the FTM rx frames are dropped in
tgt_mgmt_txrx_rx_frame_handler considering them as unspecified
packets as action category for FTM is not defined.

Define FTM action category so that the FTM frames will not be
considered as unspecified frames and dropped while processing.

Change-Id: Ieb3980978e38b3f826f42380e29798767c8f1fe2
CRs-Fixed: 3254409
2022-08-08 05:47:25 -07:00
Srinivas Dasari
bfc8b1f3dd qcacmn: Correct RSNXE capability indexes
Currently, RSNXE capability indexes are defined incorrect.
It seems BIT index is misinterpreted. Correct the same as defined
below in spec(IEEE Std 802.11-2020, 9.4.2.241, Table 9-780).

The Extended RSN Capabilities field, except its first 4 bits, is a
bit field indicating the extended RSN capabilities being advertised
by the STA transmitting the element. The length of the Extended
RSN Capabilities field is a variable n, in octets, as indicated by
the first 4 bits in the field.

Also, add a macro to check if the given akm
is WPA/WPA2 i.e. legacy than WPA3.

Change-Id: I3d8eee15f6734b2364628f699b7829a1edb246f0
CRs-Fixed: 3257715
2022-08-04 05:51:43 -07:00
Edayilliam Jayadev
dc98426f33 qcacmn: Reorder the structure members to avoid padding
Reorder the structure members to avoid overhead due to padding.

CRs-Fixed: 3248064
Change-Id: If26877df21dc061a81e079aca59adcf693e5a1ae
2022-07-26 06:00:50 -07:00
Edayilliam Jayadev
ac49d3b35a qcacmn: Rate limit error prints in mgmt Rx REO module
Rate limit error prints in management Rx reorder module.

Change-Id: I2f88554885568378082abd0bc41914118bb1269c
CRs-Fixed: 3249638
2022-07-24 01:01:55 -07:00
Krishna Rao
3cc8ee5529 qcacmn: Shorten err strings in helper for defragmentation
Shorten the strings in error prints in the helper that carries out
802.11 element/subelement defragmentation. This is in order to
decrease the size of the modules generated as required for some
platforms.

Change-Id: Idd37ea59467aa5ebc3928f336f05b603e5d7f6f5
CRs-Fixed: 3248821
2022-07-23 21:04:50 -07:00
Krishna Rao
18774495ac qcacmn: Shorten err strings in helper for frag sequence info
Shorten the strings in error prints in the helper that determines
802.11 element/subelement fragment sequence information. This is in
order to decrease the size of the modules generated as required for
some platforms.

Change-Id: I5a15dc12404399c4670e0cb29205a728715f4923
CRs-Fixed: 3248813
2022-07-23 19:15:01 -07:00
Krishna Rao
607f20d387 qcacmn: Shorten err strings in helper for successor frags
Shorten the strings in error prints in the helper that determines
802.11 element/subelement successor fragments. This is in order to
decrease the size of the modules generated as required for some
platforms.

Change-Id: I4457e1228f848a52f9eea056541806220ff4e8da
CRs-Fixed: 3248806
2022-07-23 19:14:55 -07:00
Rahul Gusain
030e248d13 qcacmn: Add enum for OCI mismatch in disassoc reason
Added enum for OCI mismatch in disassoc reason

Change-Id: Iaf7a318ba629bba758c8f04bd404008678036a07
CRs-Fixed: 3235848
2022-07-19 03:34:01 -07:00
Pragaspathi Thilagaraj
728ff15ea3 qcacmn: Don't allow PASN peer create if peer del all is not supported
Firmware advertises WMI_SERVICE_DELETE_ALL_PEER_SUPPORT
capability to indicate vdev peer delete all command support.
PASN peer relies on the WMI_VDEV_DELETE_ALL_PEER_CMDID
command to delete the PASN peers before vdev delete.

So allow PASN peer create only on targets that advertise
WMI_SERVICE_DELETE_ALL_PEER_SUPPORT.

Change-Id: Ib94d9e14e34dd1e5c25bf6946e0d59fe83fd6dd3
CRs-Fixed: 3229438
2022-07-18 16:00:32 -07:00
Jianmin Zhu
f2a742540b qcacmn: Select best partner for MLO of 2+ links
Select best candidate by mlo score algorithm.

Check bss mlo type first by mlo info, mlo config, partner frequency and
dbs/sbs cap, calculate candidate score for SLO/MLMR/EMLSR bss types.

For SLO case, same as before except:
Decrease percent of legacy band and nss to include 320M and 8x8.
Decrease max percent of congestion from 100 to 80 to include MLMR joint
congestion.
Increase weight of both band width and nss to 20.

For EMLSR case, same as SLO except adding EMLSR boost score.

For MLMR case, besides adding MLMR boost score,
calculate joint RSSI/band width/congestion score for combination of
scan entry + each partner link by new mlo algorithm, select partner with
highest total joint score as candidate combination, only activate that
partner link.

Change-Id: I640c6825d945caf5fab504a77717195c2eac0c93
CRs-Fixed: 3234912
2022-07-18 11:55:27 -07:00
Edayilliam Jayadev
2bd4b3e1ac qcacmn: Drop mgmt frames if snapshot sanity checks fails
Drop management frames if snapshot sanity checks fails.

CRs-Fixed: 3242562
Change-Id: I7b6ba04b23e57c5b516be7c3b53b8e13e24f4e53
2022-07-18 02:51:44 -07:00
Edayilliam Jayadev
62e885aa1b qcacmn: Log raw snapshot values
Log raw values of management Rx REO snapshots for debug purposes.

CRs-Fixed: 3242558
Change-Id: Idf30985691226e835190bd3305f29e2d43e654b5
2022-07-18 02:51:36 -07:00
Shashikala Prabhu
79b3391de9 qcacmn: Replace WLAN_FEATURE_T2LM flag with WLAN_FEATURE_11BE
Replace WLAN_FEATURE_T2LM compile-time flag with WLAN_FEATURE_11BE.

Change-Id: If3253bf3aae04f434252bfc92d00b8649f831bfe
CRs-Fixed: 3238444
2022-07-12 08:57:02 -07:00
Pragaspathi Thilagaraj
788ca7bb89 qcacmn: Set 11az Ranging related feature capabilities
Set 11az Ranging related extended capabilities over the
wiphy extended capabilities. Mask these fields for SAP iface

Change-Id: Ib6ce92f42d7125b4e9532d5c893ffe955be0f0dc
CRs-Fixed: 3235143
2022-07-08 21:30:55 -07:00
Kani M
c9f08ae24b qcacmn: Add beacon ratelimiting
Rate-limiting will be based on number of beacons received.
When the beacon is not from connected AP, the beacons
are dropped on a percentage of received beacons and
rate limit, which is configured by the user.

CRs-Fixed: 3230508
Change-Id: Iac591c37129fda6923ef254c2950cb0bdbb44ce9
2022-07-08 11:57:54 -07:00
Vinay Adella
e9a54debcb qcacmn: Fix buffer copy beyond max size causing corruption
During ML IE fragmentaion, the inline copy should account for
increase in size due to difference in destination and source.
This avoids corrupting the buffer beyond the max allowed size.

CRs-Fixed: 3236544
Change-Id: I8114c15accb70fa0c92ee51453dd112875bd09d5
2022-07-08 03:01:18 -07:00
Jayachandran Sreekumaran
ff2587248e qcacmn: Add vdev mlme api for spatial reuse
Add vdev mlme APIs for spatial reuse feature.

Change-Id: I34780d1fb33f8806c3cfbc763ac36c6092cce5e7
CRs-Fixed: 3213421
2022-07-07 21:43:32 -07:00