Commit Graph

1034 Commits

Author SHA1 Message Date
Edayilliam Jayadev
c194d157aa qcacmn: Simulation debug support for reo
Debug frame work to simulate the generation of management
frames by HW, processing of management frames by FW and Host.
This would help in exercising the management Rx reorder
algorithm.

Change-Id: I9ec585b1bb41a5eb5e6226d0151ad23143fdb8f7
CRs-Fixed: 3017577
2021-11-09 13:27:09 -08:00
Yu Wang
33958ed42f qcacmn: handle MLO scenario for candidate validating
Add flag to indicate whether MLO is supported by the candidate or not,
which is helpful when checking concurrency.

Change-Id: I166ad2963163ae4dc7989516b654dce4cb635cec
CRs-Fixed: 3013418
2021-11-07 22:52:53 -08:00
Krishna Rao
ba2cb6d084 qcacmn: Update element ID extensions for EHT Cap/Op and ML
Update element ID extension values for EHT Capabilities, EHT
Operation, and Multi-Link IEs. The values are as per current ANA
database.

Change-Id: Iaf8399170340d706acb1ecbd0f8b7050c4f6228d
CRs-Fixed: 3032233
2021-10-28 01:33:57 -07:00
Aditya Sathish
af7379f8c4 qcacmn: Fix the second cfreq2 for channel 33 for 320MHz
Fix the second cfreq2 frequency returned by the service
API, wlan_get_320_center_freq, for a channel ranging
between 33 (6115MHz) to 61 (6225MHz).

CRs-Fixed: 3060832
Change-Id: I656a5d6633cfa48aaeff5f0ba53e4c6138f5d8f8
2021-10-25 12:15:47 -07:00
Arun Kumar Khandavalli
0e4c14ca77 qcacmn: Return assoc peer as true in case of mlo disabled
In certain cases the driver checks whether the peer is a assoc link
or non-assoc link, in case of legacy connection when mlo is disabled
return true for assoc link.

Change-Id: I50e6b22754ffb26fbb4b7892a962bc754479f7a8
CRs-Fixed: 3059278
2021-10-22 10:20:42 -07:00
Krishna Rao
0d7d011c82 qcacmn: Move basic 802.11 definitions from crypto to common
Move basic IEEE 802.11 field definitions that are not specific to
cryptographic functionality, from a cryptography related header file
to a common header file for IEEE 802.11 definitions so that these can
be used by other 802.11 protocol processing modules. The crypto header
file already includes the common header file, so there is no effective
change in code visibility of the definitions for crypto code.

Change-Id: I439fe818a457cc7694fdb431f5d2c1a7552f2caa
CRs-Fixed: 3059572
2021-10-21 14:05:49 -07:00
Edayilliam Jayadev
f1527f6374 qcacmn: Handle overflow of management rx reorder list
Deliver the oldest management frames to upper layers if
the management rx reorder list grows beyond the maximum
configured size.

Change-Id: Id0199849e26804310dd502051b8e14f56f0df795
CRs-Fixed: 3051431
2021-10-20 00:32:56 -07:00
Krishna Rao
7c24c73fd8 qcacmn: Add size definitions for subfields in Basic ML Common Info
Add definitions for size in octets for the following subfields in the
Common Info field of Basic variant Multi-Link element: BSS Parameters
Change Count, Medium Synchronization Delay Information, EML
Capabilities, and MLD Capabilities. These definitions are as per
IEEE802.11be D1.0 (but also happen to apply as of IEEE802.11be D1.2).

Change-Id: I36725292f29da1f03caed6baa5d25c02a06c2c4f
CRs-Fixed: 3057853
2021-10-19 14:06:08 -07:00
Liangwei Dong
dffbb1b320 qcacmn: Fix SAE pmkid update issue
For SAE SAP, after full SAE authentication, only pmkid
will be sent down to driver, PMK len is zero.
Driver should accept the set pmksa without PMK.
Add check pmk length checking and if pmk len is zero,
driver allow the set pmksa.

Change-Id: Ic05dee4cce31233dbe6dfced05df54fe8972dd1f
CRs-Fixed: 3042899
2021-10-13 17:42:40 -07:00
Shiva Krishna Pittala
de13832745 qcacmn: Populate and expose 320MHz spectral capabilities
Populate and expose the following 320MHz spectral capabilities.
  - Agile spectral scan support for 320MHz mode.
  - Number of detectors used for spectral scan in 320MHz mode.

Change-Id: Ibea77d4ec8b1d9322ef82d1d48236836ffad24ec
CRs-Fixed: 3053059
2021-10-13 02:57:24 -07:00
Edayilliam Jayadev
d9667ef801 qcacmn: Prevent out of order delivery of mgmt frames
Keep track of the global time stamp of the last
management frame delivered to the upper layer.
Drop all the frames older than the last delivered
frame.

CRs-Fixed: 3049671
Change-Id: Ibe0cc239f7af38da63ea8c405b3f89fc9473ea57
2021-10-12 00:09:10 -07:00
Pragaspathi Thilagaraj
ce387c8fd3 qcacmn: Validate SSID first while fetching peer pmksa
Validate the SSID & cache ID if SSID length is present in the
pmksa entry, as in FILS case only SSID and cache id are filled
and BSSID is not filled.

So validate the BSSID only if the SSID is not present.

Change-Id: Ia0a31f953869f00495fad597bb564ec706425312
CRs-Fixed: 3051530
2021-10-08 23:15:58 -07:00
Lincoln Tran
40e49db431 qcacmn: Add all membership selector elements
Include all elements from the BSS membership selector value encoding
table.

Change-Id: Ia9dda9aaa44d5c6ea83d750676511c1ed74bfb4b
CRs-fixed: 3050316
2021-10-07 23:15:56 -07:00
Edayilliam Jayadev
8498476787 qcacmn: Add lock to protect reo algorithm entry
Add spin lock protect the critical section in reorder
algorithm entry.

CRs-Fixed: 3048994
Change-Id: I9bc6b30b2102dd14f0e5e2ba593e9a6bbbb72714
2021-10-07 18:42:49 -07:00
Shashikala Prabhu
f833646e06 qcacmn: Do not limit the max length of RSN/WPA IE as 28
Do not limit the max length of RSN/WPA IE as they can contain multiple AKM
and CIPHER. We need to consider all the variables to limit the max length.

Change-Id: I204f86d7c773d0c104ad1f58b3648d6c5577af94
CRs-Fixed: 3051247
2021-10-07 07:05:44 -07:00
Venkateswara Swamy Bandaru
d70df100f7 qcacmn: Add 11be D1.0 Capability defines
Add 11be D1.0 Mac and Phy capability defines.
Corrected lengths if the capability fields.

Change-Id: I40e2d048946857498c425ca01c3010f255081833
CRs-Fixed: 3025958
2021-10-05 13:07:50 -07:00
Edayilliam Jayadev
3038a860fc qcacmn: Fix compilation issues in MGMT RX REO module
Fix compilation issues in management rx reorder module.

Change-Id: I4eb7e2e3421f107607c6d99aa737fe3643e2ed12
CRs-Fixed: 3046412
2021-10-03 22:55:54 -07:00
Edayilliam Jayadev
29fe92fbd7 qcacmn: Add fixes in wait count calculation
1. Add fixes in wait count calculation logic.
2. Add necessary debug logs in wait count calculation.

CRs-Fixed: 3026035
Change-Id: I5aad3a5b56ae1db7b00e17240bb768f35cd83abc
2021-09-30 08:38:35 -07:00
Edayilliam Jayadev
9fd7fb390c qcacmn: Add fixes in snapshot read logic
1. Initialize the temporary variable to read snapshot to zero.
2. Read correct number of shared snapshot values.

CRs-Fixed: 3026029
Change-Id: I6f4fc9d1d2bfe4818304be16f7c80830b4fb260b
2021-09-30 08:38:30 -07:00
Edayilliam Jayadev
b8bb556398 qcacmn: Add new QDF module for management rx reorder
Add new QDF module for management rx reorder feature.

CRs-Fixed: 3026019
Change-Id: I471757f4f32ed8439d94c9cd96a330b21299140a
2021-09-30 08:38:21 -07:00
Shiva Krishna Pittala
81f3009593 qcacmn: Add support for run-time enablement of MGMT Rx REO feature
Add INI and WMI service bit based enablement support for
MGMT Rx REO feature.

CRs-Fixed: 3014353
Change-Id: I95650718d69b70f119621a9481dbf1518bc5500b
2021-09-27 17:58:04 -07:00
Sai Pratyusha Magam
ce2fc16440 qcacmn: Add additional packet type check in wlan_crypto_get_keyid function
Add additional packet type check in wlan_crypto_get_keyid function

Change-Id: Iee31a428a20c256797c1b460b835dbe31dc6f2e9
CRs-Fixed: 3040714
2021-09-27 15:44:45 -07:00
Shiva Krishna Pittala
b0384b31da qcacmn: Expose the external APIs from MLO global shared memory handling
Expose the following APIs from MLO global shared memory handling
    - APIs required by the REO logic
    - APIs required to invoke the MLO global shared memory parsing

Change-Id: Ia2fb0b0fee5d3904bae8cd70ce3364360d5ea16e
CRs-Fixed: 3014343
2021-09-25 17:22:07 -07:00
Himanshu Batra
06f52d9da2 qcacmn: Add API to check if STA vdev is mlo assoc or link vdev
Add API to check if STA vdev is mlo assoc or link vdev

Change-Id: If5d5fab4c423939d272156e1dea4fae5d1d8d80a
2021-09-23 21:35:19 -07:00
Krishna Rao
32caa92ae8 qcacmn: Add MLO specific definitions for RNR IE
Add definitions related to MLO specific aspects of Reduced Neighbor
Report IE.

CRs-Fixed: 3042063
Change-Id: I0cba496a071ccb2be719dbe584f2f0f98d4a5b8a
2021-09-23 17:09:35 -07:00
Krishna Rao
cea74e2c92 qcacmn: Add 802.11 field lengths and other definitions
Add or modify the following IEEE 802.11 related definitions for use in
protocol processing code:
- Add individual length definitions for the following initial fields
used in some 802.11 management frames: Timestamp, Beacon Interval,
Capability Information, Listen Interval, Status Code and AID. These
are added so that protocol processing code that needs to skip over
individual fields can refer to the relevant lengths.
- Modify the definitions of assoc request/response IE offsets to use
some of the above individual definitions.
- Add definition of position of element ID extension
- Add element ID for fragment element
- Add definition for size in octets of Link ID Info subfield in Basic
variant Multi-Link element Common Info field.

Change-Id: I272a5f99573b41d7431c8dd782d02bd141813def
CRs-Fixed: 3025500
2021-09-22 03:16:17 -07:00
Shashikala Prabhu
2b8f8e7ee5 qcacmn: Set extended supported rates IE max len to 12
As per the spec, the maximum IE length of supported rates are 8 and ext
supported rates are max_rates minus supported rates (=44-8).
In the field, some APs are non-compliance with the spec and includes
12 rates. Due to this, our STAs does not scan and connect to those APs.

To fix this issue, supported rates IE length is already set to 8. Hence,
set extended supported rates IE max len back to 12.

Change-Id: I0d8ce972b08aa28c08a7e797df4208dd36154983
CRs-Fixed: 3036878
2021-09-17 13:48:27 -07:00
abhinav kumar
8fc035b072 qcacmn: Fix Supported rates max length
Currently the driver checks for the supported rates IE,
and if the length of the IE is greater than 8, the driver
rejects the IE, according to spec.
But some APs supports 12 rates hence are not scanned.

Fix is to have a supported rates IE length check of 12 instead
of 8.

Change-Id: I3e32171e1b089ccc8754872fa5c37ba35b8b2cf7
CRs-Fixed: 3036878
2021-09-17 13:48:21 -07:00
Shiva Krishna Pittala
01c079b17b qcacmn: Add handlers for FW consumed and Host dropped MGMT frames
Consider the management frames that are consumed/dropped in the FW and also
the frames that are received at the Host but dropped in lower layers.
The host has the MGMT Rx REO parameters about these frames via WMI events.

There could be frames waiting in the MGMT Rx REO list for the above-said
frames. If we update the waiting frames with the MGMT Rx REO parameters of
the above-said frames, the waiting frames could be released and sent for
processing. Add the logic for the same.

Change-Id: I6be4577d30c4aefe2e964aefbb56472749a90cb4
CRs-Fixed: 2987941
2021-09-17 05:54:06 -07:00
Shiva Krishna Pittala
5d74978e0d qcacmn: Hook MGMT Rx REO algorithm in MGMT Rx path
When a management Rx frame enters the MGMT TxRx component, route it to the
MGMT Rx REO module where the REO algorithm decides whether the frame needs
to be processed right away or need to wait for frames on other links.

Change-Id: Ib7ca911dfaeee131fd71d9a4345f5bc720326228
CRs-Fixed: 2987784
2021-09-17 05:54:01 -07:00
sheenam monga
a554290f06 qcacmn: Fetch fw cap to support p2p + p2p concurrency
Fetch fw capability to support p2p+p2p concurrency and
store cap info in 29th bit of soc_fw_ext_caps.

Change-Id: Id8e4c0310f8db503a2997e8aed5a6f1ce813dcc7
CRs-Fixed: 3032068
2021-09-16 22:58:23 -07:00
Will Huang
99e7db2551 qcacmn: Add bss membership selector defines to wlan_cmn_ieee80211.h
These defines are used by Supported Rates or Extended Supported Rates
IE to set additional information beside rate.

Change-Id: I44eac41a9a07d368a6fe3abc76e341915b3249b9
CRs-Fixed: 3034939
2021-09-16 08:28:34 -07:00
Pragaspathi Thilagaraj
b001e0e130 qcacmn: Add support to send connectivity logs from logging thread
Add support to send connectivity logs from g_wlan_logging thread.
Add new HOST_LOG_DRIVER_CONNECTIVITY_MSG event flag which wakes up
the gwlan_logging thread when set.
Also register connection manager callbacks to send the logging event.

Check if logging queue is empty whenever the gwlan_logging thread
is woken up and send the logs to userspace if the count doesn't
exceed the allowed threshold.

Change-Id: I3fdb8358f9048a277e2f03894c0e6a17376b0da0
CRs-Fixed: 3029279
2021-09-16 08:28:29 -07:00
Shiva Krishna Pittala
719e90b6dc qcacmn: Add API to update MGMT Rx REO Host snapshot
MGMT Rx REO algorithm maintains a host snapshot which contains MGMT Rx
REO parameters of the latest frame received by the Host.
Add an API to update the same using the parameters sent by the FW.

CRs-Fixed: 3029489
Change-Id: I7ea574507de4e96407207bcb57319680ae78f7c9
2021-09-13 06:20:19 -07:00
Edayilliam Jayadev
c85bc308e4 qcacmn: Add APIs to handle the reorder list
Add APIs to create/update/destroy reorder list.

CRs-Fixed: 3017570
Change-Id: I74528a7f13db8f48c0fc5c5516ea754caf4b686a
2021-09-13 06:20:13 -07:00
Shiva Krishna Pittala
5bae4f1b26 qcacmn: Add algorithm to compute wait count for an incoming mgmt frame
This is part of the MGMT Rx re-order algorithm for MLO (FR 69196).
Consider an MLD formed by multiple discrete MLO-capable chipsets.
Management frames received on individual links will be forwarded or
consumed by the firmware running on that chip. Each link could have
a variable delay in FW->Host messaging. Host can receive these management
frames in an order different from that in which the frames were received
over the air. This problem could be there in single-chip MLD cases also
due to race between FW threads that are handling management frames.
This FR solves this problem by introducing an REO queue in the MGMT Rx path
which reorders the frames and delivers them to upper layers in the order
in which they were received over the air.

Each incoming frame carries an MGMT packet number which is local to that
link, and a timestamp that is global across all the links. MAC HW and FW
capture the same details of the last frame that they have seen. Host also
maintains the details of the last frame it has seen.
Using all this information, calculate the number of frames an incoming
frame should wait for on all other links before it gets delivered.

Change-Id: Icdf5b9b55b2a360bac2d9ea676671702eade3282
CRs-Fixed: 3028766
2021-09-12 21:58:12 -07:00
Shiva Krishna Pittala
ff4f258129 qcacmn: Add circular arithmetic operations for MGMT Rx REO data
HW uses only 16-bits to represent MGMT packet counter and 32-bits to
represent global timestamp. Overflow is bound to happen with such sizes.
So, Host can't directly use regular comparison and subtract operators on
the REO data sent by the HW. Add support for operations that take
overflow into consideration.

CRs-Fixed: 3028771
Change-Id: I1c280409b023e0783bf05fe68351e071801f59bc
2021-09-12 21:58:07 -07:00
Lincoln Tran
ce48d77998 qcacmn: Add debug MLO changes
-Add debug logs to MLO manager code.
-Add ml_dev validation checks for ML peer operations.
-Add pointer checks to avoid NULL pointer dereference

Change-Id: I8e9ddf177a999a43e8612f8c6acedd08ffce63d5
CRs-fixed: 2998964
2021-08-25 19:45:02 -07:00
Shiva Sankar Gajula
d3b7b11795 qcacmn: Reset mgmt ciphers and key mgmt to 0 by default
The 11r roaming is not happening when PMF disabled STA is trying to
roam from PMF disabled AP to PMF optinally configured(ieee80211w=1)
AP which is due to candidate_list is not found because of mgmt
ciphers mismatch (the PMF disabled mgmt cipher is None(1<<17) and PMF
optional AP's mgmt cipher is CMAC(1<<6)) happening while comparing
security params and is due to mgmt cipher value is reset to None(17)
after STA connected to AP.

So, Added changes to reset the mgmt cipher value to zero. Also, added
changes to reset the keymgmt to 0 instead of None since this is
missing in earlier implementation.

Change-Id: I9f24a215011b4984937e98225bcb3975bc3f685f
2021-08-25 07:25:20 -07:00
Edayilliam Jayadev
9ccbe5a0fb qcacmn: Add API to get address of mgmt Rx REO snapshots
Add APIs to get address of management rx-reordering snapshots.

CRs-Fixed: 2963485
Change-Id: Idfe13425ad5f95f1a3d92edfc2d6d41aded5aec9
2021-08-23 13:26:36 -07:00
Shiva Krishna Pittala
93c0702c78 qcacmn: Add support for MGMT Rx REO filter config command
WMI_MGMT_RX_REO_FILTER_CONFIGURATION_CMD is used to the configure re-order
criterion for incoming management frames.
Add target_if and tgt layer support for the same command.

Change-Id: I5daaf4d095774d751d98a27fd77dec9daaa6b16a
CRs-Fixed: 2960488
2021-08-21 15:17:33 -07:00
Shiva Krishna Pittala
57543be336 qcacmn: Add WMI layer functionality for MGMT Rx REO filter config command
WMI_MGMT_RX_REO_FILTER_CONFIGURATION_CMD is used to the configure re-order
criterion for incoming management frames. Add WMI layer support for the
same command.

Change-Id: If1498fd4fbccd86e7d54d9eac268868b36523d06
CRs-Fixed: 2960472
2021-08-21 13:06:51 -07:00
Shiva Krishna Pittala
361f45dd82 qcacmn: Add APIs to extract MGMT Rx REO params tlv
When MGMT Rx REO feature is enabled, FW will be sending MGMT Rx REO
parameters TLV as part of WMI_MGMT_RX_EVENTID for the frames that require
reordering. Add APIs to extract the same.

Change-Id: I57b132927cf413384d680b5778bfe6a2e2737adf
CRs-Fixed: 2960471
2021-08-21 13:06:43 -07:00
Shiva Krishna Pittala
a52614b732 qcacmn: Add WMI layer functionality for MGMT Rx FW consumed event handler
When MGMT frames are consumed by the FW, FW sends MGMT Rx FW consumed event
to the Host. Add WMI layer functionality for this event handling.

Change-Id: Id95f41a717b88589e861781e1111b17dc90475be
CRs-Fixed: 2959118
2021-08-20 12:57:21 -07:00
Rhythm Patwa
07fc0519ee qcacmn: Add support for AFC response structures
Add AFC response structures to send over AFC response
data over to target.

Change-Id: I80530b56b94acc43b35b414c10d6783cd8dcdd92
2021-08-19 15:22:02 -07:00
Shiva Krishna Pittala
3bde57d8de qcacmn: Add rx_ops and TGT layer APIs for MGMT Rx FW consumed event handler
When MGMT frames are consumed by the FW, FW sends MGMT Rx FW consumed event
to the Host. Add rx_ops and TGT layer functions for this event handling.

Change-Id: I50a4b02063bc545d6976944cf331982dc3e853d0
CRs-Fixed: 2959082
2021-08-19 04:59:51 -07:00
Edayilliam Jayadev
ff18a53051 qcacmn: Add API to read mgmt Rx REO snapshots
Add APIs to read management rx-reordering snapshots.

CRs-Fixed: 2955865
Change-Id: I1f36705607b0bae92d422d85223f825ed0b96ef9
2021-08-19 04:59:46 -07:00
Mohammed Ahmed
c775b5586a qcacmn: Fix incorrect layering in scan component
Replace ucfg api call with wlan api calls for internal components.

Change-Id: I0289bf44753d3692468a12fbe7109e348c8e8957
CRs-Fixed: 3011167
2021-08-19 02:14:11 -07:00
Srinivas Pitla
7469335fa4 qcacmn: MLO peer implementation
This change adds MLO support to Peer.
It implements,
1) MLO peer list management
2) AID allocation
3) MLO Peer creation/deletion
4) Notifying partner links on peer creation/deletion/assoc

Change-Id: Ie1b675dccdf0de1d79f6f32d9255cf3cca53fdf2
CRs-Fixed: 2967057
2021-08-15 01:53:04 -07:00
Chaithanya Garrepalli
0702aaf463 qcacmn: initialize PPE rings
Changes to initialize PPE rings based on ini
configuration

Change-Id: Id6a26b557c45fd78ae17675b0292424e979958ad
2021-08-13 12:04:22 -07:00