Commit Graph

1095 Commits

Author SHA1 Message Date
Asutosh Mohapatra
9ab40cb89e qcacmn: Fix uninitialized var ptr issue and null check for num_pscos
1.This change fixes the use of uninitialized
variable in host driver.

2.Adds NULL check for num_psocs in mlo_peer_calculate_avg_rssi to
avoid undefined behaviour.

Change-Id: Ifbfef42b5930dfe15736a75a74e81155c5f1fbce
CRs-Fixed: 3297794
2022-10-06 00:22:18 -07:00
Amruta Kulkarni
5b4c2d3d0c qcacmn: Skip recovery if no rso stop rsp from FW
Current issue:
During disconnect host sends RSO STOP command to FW
and expects a response from FW before continuing disconnect.
If roaming is disabled (from supplicant or due to race condition)
before sending RSO STOP cmd then FW does not respond to the request
and host will assert.

Solution:
To handle this case after rso timer stop expiry continue with
disconnect and clean up the rso state.

Change-Id: Iac7b25d881702b87f946fe0ecfba02b1d806f06b
CRs-Fixed: 3301394
2022-10-03 21:39:57 -07:00
Adwait Nayak
7fdbe9bdc7 qcacmn: Strip MBSSID IE from the TX VAP only for 11BE platforms
While generating the scan entry for TX VAP, the decision to
strip MBSSID IE from the TX VAP beacon, will be taken if the
platform supports 11BE.

CRs-Fixed: 3300515
Change-Id: Ie45da7a02a2811172b2403d5fd1bc4b9271432d5
2022-10-01 03:38:36 -07:00
Shashikala Prabhu
5e43636b8c qcacmn: Add support for 11az RTT
- target_if layer was calling UMAC layer wifi_pos_get_rx_ops(). This was
  leading to compilation errror in WIN platform. Hence, added target_if
  layer API target_if_wifi_pos_get_rx_ops().

- WMI_RX_SERIALIZER_CTX is used to register PASN peer create and delete.
  WIN platform does not use the above context. Hence, use WMI_RX_UMAC_CTX
  for WIN and WMI_RX_SERIALIZER_CTX for MCC.

- WIFI_POS rx_ops callbacks are registered in target_if layer. But, these
  callbacks are called by UMAC component. Hence, move this registration
  function to UMAC layer.

- Add an API to convert host PASN peer type value to target defined value.

Change-Id: I2a262121f959c2343e88158b94468d104b9e164c
CRs-Fixed: 3289852
2022-09-30 07:49:24 -07:00
Shivam Kumar
52c19ba631 qcacmn: Handle failure during service ready(ext/ext2) handling
Any error during ext/ext2 processing should stop normal init
path and return error. Without this, wrong values are passed
to firmware in WMI init which result in firmware assert.
Add proper handling to take care of failures during svc ready
message processing

Change-Id: Id22714a983d1dc2fe7300a178933cd05bf870a55
CRs-Fixed: 3290131
2022-09-25 23:11:07 -07:00
Bing Sun
cb2c6707f6 qcacmn: Add API to update peer channel width and puncture parameter
Add API to send peer param WMI_PEER_CHWIDTH_PUNCTURE_20MHZ_BITMAP

Change-Id: Id05629b12059ff2258e196b3e9aa78f5fb52bda4
CRs-Fixed: 3269745
2022-09-23 20:20:55 -07:00
Shiva Krishna Pittala
2bef7708b1 qcacmn: Stop the spectral scan at the end of last report in finite scan
In the case of finite Spectral scan, the spectral scan will be stopped in
the target once the requested count of spectral reports got generated.
The Host will not be notified of this stop scan. To synchronize the Host
data structures in accordance with the target, we explicitly stop the scan
once the last report is received. In the current implementation, the
stop_scan() is called at the beginning of the last report processing and
we continue processing the last report. As part of the last report
processing, we could access the data structures that were reset during
the stop_scan(). To fix this, stop the spectral scan at the end of the
last report processing.

Change-Id: Iecfa4e72ccbedae77ee2a57e9283910e980121d5
CRs-Fixed: 3287136
2022-09-19 01:49:32 -07:00
Bing Sun
fbcb2bb588 qcacmn: Define WMI_HOST_PEER_* for no host to target conversion
Currently if ENABLE_HOST_TO_TARGET_CONVERSION is defined, WMI_HOST_PEER_*
can be translated to WMI_PEER_* through API
convert_host_peer_param_id_to_target_id_tlv.

If ENABLE_HOST_TO_TARGET_CONVERSION is not defined, WMI_HOST_PEER_* in
common code is sent to firmware directly, which is incorrect.

Define WMI_HOST_PEER_* to WMI_PEER_* if ENABLE_HOST_TO_TARGET_CONVERSION
is not defined. Then WMI_HOST_PEER_* can be used in common code.

Change-Id: I50aa604d8822a81eed223c8551e542007929424e
CRs-Fixed: 3271470
2022-09-16 16:31:31 -07:00
Sajini R
7c7742990b qcacmn: Initial changes for IPQ5332 target compilation
Added device ID and target type checks for IPQ5332 target
compilation.

CRs-Fixed: 3273865
Change-Id: I98a768394cc539549fc41d756c9c9d90034627f5
2022-09-16 11:52:44 -07:00
Naveen S
d276b0eda6 qcacmn: Add feature flag for Health Monitor Feature
Adding feature flag for Health Monitor so that it can be disabled
for 16M and 256M profiles

CRs-Fixed: 3277434
Change-Id: Ibbbe582acd15ebff7e189fcbaa36429ea519db37
2022-09-09 04:08:54 -07:00
Asutosh Mohapatra
c70f8eec91 qcacmn: Add support to store and use fcc rules sent by firmware
When set_fcc_channel is set, host driver sets tx_power info about
channels 12, 13 to hardcoded values. Now firmware sends information
about channels 12, 13 to host driver and currently there is no
support to extract and store this information and use it to
modify tx_power of channels 12, 13 in host driver.

Add support to store the tx_power of channels 12, 13 received
from firmware and use this to modify tx_power of fcc channels.

Change-Id: Ie7b20a75bb09956a70b7b133ce7ce9beb8db138b
CRs-Fixed: 3270676
2022-09-05 21:33:04 -07:00
Jithender Miryala
26bf9ca291 qcacmn: set 'dfs' parameter if host and fw supports 320 MHz
Set dfs object parameter if host and fw supports 320 MHz bandwidth.
i.e. dfs->dfs_is_bangradar_320_enabled. Set to true if the host and
firmware support the bandwidth is 320 MHz. If there is no support, set
false.

Change-Id: I210823c448450f89dc65937201b4839168369d18
CRs-Fixed: 3270525
2022-09-04 23:14:01 -07:00
Jithender Miryala
354a68e77c qcacmn: Add host-FW handshake for 320 MHz bang radar support
FW-Host Handshake for BANG_RADAR_320_SUPPORT
1. FW advertises its capability of processing BANG_RADAR_320_SUPPORT
id via wmi service bit 'wmi_service_bang_radar_320_support'.
2. If the host is capable of processing the "BANG_RADAR_320_SUPPORT"
event id, host sends the capability in WMI_INIT_CMDID setting a bit in
host_service_flags

Change-Id: Ia26a7b8e8ee78aceb801d0053770379bd6d5a9cb
CRs-Fixed: 3270525
2022-09-04 23:13:54 -07:00
Sheenam Monga
46644d2926 qcacmn: cleanup key_rsc_counter pointer from set key param
Remove unused param key_rsc_counter of set_key_param
structure, as key_rsc_ctr is used to send key rx sc
counter to fw and rename key_rsc_ctr to key_rsc_counter
as win is using key_rsc_counter.

Change-Id: Id58aabb30d772f8f620ac9f96890fcac0193777b
CRs-Fixed: 3256574
2022-08-29 10:00:47 -07:00
Rahul Gusain
7af5b194e4 qcacmn: Bypass the peer check for NAN in crypto set keys
Currently, host driver installs keys for STA, SAP and P2P
iface. A peer validation is present to do so in these modes
in crpto API(target_if_crypto_set_key). NAN vdev also needs
same support for NAN pairing protocol but doesn't have a peer
as such.
So, bypass peer validation for NAN vdev.

Change-Id: Ief003d096da6f241ff13329c49a32cd896dec9db
CRs-Fixed: 3257754
2022-08-27 19:54:38 -07:00
Sreeramya Soratkal
057bd5f570 qcacmn: Remove unused local variables in spectral module
Remove unused local variables in the Spectral module to
address the compiler warnings.

CRs-Fixed: 3272706
Change-Id: I91c806a9bd6413eb559992a0b184d8bd9c4ea4d0
2022-08-26 14:21:26 -07:00
Pavankumar Nandeshwar
63ab2d8c33 qcacmn: Hif and tgt_if changes for Umac post reset at host
Hif and tgt if layer changes to handle Umac post reset
and post reset complete events from firmware.

Change-Id: I08bbd90741708fe76b2db0371ccfda7bfe7b0b2d
CRs-Fixed: 3267222
2022-08-21 00:38:00 -07:00
Sham Muthayyan
1e28e45ce7 qcacmn: Add WMI health monitor events
Add WMI health monitor events to send the health
monitor data to application.

Change-Id: I792b733822b03518dc964f38fe4a158132b0ac49
CRs-Fixed: 3266229
2022-08-21 00:37:39 -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
Shreedhar Parande
4854e732d7 qcacmn: Get UL-MUMIMO support from Target
Read UL-MUMIMO from target cap flag

CRs-Fixed: 3255924
Change-Id: I02d7644b3dc43c757d8363d8de0f66c856c041ce
2022-08-12 20:58:39 -07:00
Nidhi Jain
ebb31019a3 qcacmn: Update max data length for waikiki
This is used in streamfs buffer size.
This is done in consideration with using upto
504 tones in place of 512 tones for CFR.

Change-Id: I7e45697e47f4b818b472b1bd8e91d785e676c506
CRs-Fixed: 3260185
2022-08-04 05:51:29 -07:00
Shiva Krishna Pittala
8641a158f3 qcacmn: Hook the UMAC reset in the target attach path
Call UMAC reset initialization API from soc_attach_target().
FW exposes a service bit for this feature, use that to conditionally
enable this feature. Also, add default log levels for this feature.

CRs-Fixed: 3253464
Change-Id: Ia7c9cf07a7ab7b000ebe452ab074a82173b70129
2022-08-03 07:35:26 -07:00
Naveen S
e86fc7ebe9 qcacmn: Removing error value return on event registration failure
WMI_SPECTRAL_CAPABILITIES_EVENTID registration returns QDF_STATUS_E_FAILURE
on failure which is not required as it is causing crash on failure where
event registration is failing i.e., Hawkeye + Swift

Change-Id: Id11d76941b12d0ee249d8f6e86612b351b732d78
CRs-Fixed: 3255827
2022-08-03 01:34:40 -07:00
Shiva Krishna Pittala
caa7965659 qcacmn: Update the Detector ID to mode table based on FW_PARAMS event
Currently, we are hardcoding the detector ID to mode table for different
chipsets. Starting QCN9224, the target sends information regarding the
detectors participating in that Spectral session in the FW_PARAMS event.
Use that to update the Detector ID to mode table.

Change-Id: Ic09358e0c3b9ac0166b39f5ce445a83697146d4a
CRs-Fixed: 3253076
2022-07-27 01:59:24 -07:00
Shiva Krishna Pittala
98b4eee3ac qcacmn: Add support to build Spectral detector list for split-PHY mode
Currently, the Spectral detector list building logic assumes that only
5 GHz or 6 GHz participates in SBS modes. With Split-PHY mode in QCN9224,
even a 2.4 GHz radio can participate in SBS mode.
So, consider this case as well while building the detector list.

Change-Id: I99c841584c52785e94c8ee1b0d59494cbdd37f42
CRs-Fixed: 3252986
2022-07-27 01:59:16 -07:00
Shreedhar Parande
e6b1ed7180 qcacmn: Read EML and MLD Cap from target
Extract EML and MLD Capabilities from Target via
wmi_service_ready_ext2_event. These values can be
used while advertising EML and MLD Capabilities.

Add helper function to get EML related delays in
Micro Secs from values got from EML and MLD advertisments.

Send EML Capabilities received from node to Target
via WMI_PEER_ASSOC.

CRs-Fixed: 3225495
Change-Id: Ibfa2ff8dbf11d4293125331376a7986e611d5f63
2022-07-23 19:14:48 -07:00
Shiva Krishna Pittala
3567bb3b57 qcacmn: Add support to process Spectral capabilities event
WMI_SPECTRAL_CAPABILITIES_EVENTID event will be sent by the target SW to
indicate the different capabilities of the Spectral HW.
Add support to process this event and extract the capabilities.

Change-Id: I03b3236b6def98d24e77b2a9ea51ee866e62e6fe
CRs-Fixed: 3238450
2022-07-22 07:00:18 -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
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
Aditya Kodukula
ec13c2ea39 qcacmn: Add infra to support DBAM feature
Add infra to support Dedicated Bluetooth Antenna Mode (DBAM)
feature. It is used to switch between dedicated antenna for
BT and shared antenna for WLAN and BT.

Change-Id: I21688093674ef9b63ee811df9168a31bd71c56b5
CRs-Fixed: 3239895
2022-07-17 23:12:37 -07:00
Pragaspathi Thilagaraj
38b8236ddc qcacmn: Add support for initiate pasn auth vendor command
Add support for initiate pasn authentication using the vendor
command: QCA_NL80211_VENDOR_SUBCMD_PASN
Fill the below required attributes to initiate PASN:
QCA_WLAN_VENDOR_ATTR_PASN_ACTION
QCA_WLAN_VENDOR_ATTR_PASN_PEERS
QCA_WLAN_VENDOR_ATTR_PASN_PEER_MAC_ADDR
QCA_WLAN_VENDOR_ATTR_PASN_PEER_SRC_ADDR

Change-Id: If33f54eafe5986b4571cc21a80fb0b61578db116
CRs-Fixed: 3232261
2022-07-14 04:12:51 -07:00
Subrat Mishra
1ecf591ecf qcacmn: Fix TWT configuration for 2.4 GHz PHYB mode MAC
Fix TWT configuration for 2.4 GHz PHYB mode MAC.

Change is macro protected. Wlan resource config sets twt_ap_pdev_count
to number of Radios per psoc. But for 2.4 GHz vap coming up in PHYB
mode needs the value 2 if only one radio is enabled per psoc. WAR is
done from host driver to enabled TWT certification process. Actual fix
must be done from Firmware code.

Change-Id: Id29692097ee555c94c54f53d7540eb108fbe98e0
CRs-Fixed: 3238210
2022-07-12 14:02:02 -07:00
Amruta Kulkarni
34afd4b92f qcacmn: Define runtime pm lock for roaming
Define new runtime pm lock to be used during roaming.

Change-Id: Ia0d440d432b655c1e7fe41bdb12e4ad5207e7ad1
CRs-Fixed: 3239693
2022-07-12 02:30:48 -07:00
Jayachandran Sreekumaran
1b244cfcb0 qcacmn: target_if support for spatial reuse feature
Add target_if support for spatial reuse feature

Change-Id: If0ad6e459e7b7d215d5016c8c7c0e94df5d36649
CRs-Fixed: 3213486
2022-07-11 23:13:02 -07:00
Pragaspathi Thilagaraj
f0cac26bbb qcacmn: Add support to delete all pasn peers
Add support to delete all pasn peers

Change-Id: I2c3d95cb8994693d8944d69624d2db0992f2f03d
CRs-Fixed: 3158523
2022-07-06 23:08:01 -07:00
Pragaspathi Thilagaraj
b7fa703306 qcacmn: Add support to send PASN commands
Add support to send below PASN commands:
WMI_RTT_PASN_AUTH_STATUS_CMD
WMI_RTT_PASN_DEAUTH_CMD
WMI_VDEV_SET_LTF_KEY_SEED_CMDID

Change-Id: I5a50a634317d0a692feee5be5a36da22b4c5d713
CRs-Fixed: 3154530
2022-07-06 23:07:52 -07:00
Srinivas Girigowda
6d056b9959 qcacmn: Add support for Mango device id
Add support for Mango device id.

Change-Id: I2b32a39e258caab408723db77f132af364dc6b04
CRs-Fixed: 3232512
2022-07-02 09:55:56 -07:00
Edayilliam Jayadev
a4ef0b598c qcacmn: Increase read retry limit
Increase the snapshot read retry limit.

CRs-Fixed: 3230957
Change-Id: I65fc132c689a3cd2af726c131e2488cad88c9685
2022-06-29 11:24:46 -07:00
Edayilliam Jayadev
5cc707a17c qcacmn: Invalidate mgmt Rx REO snapshots
Invalidate management Rx REO snapshots which are stale.

CRs-Fixed: 3229249
Change-Id: I8a1b534af0b8371bbc6809cf7eeb8655b6028773
2022-06-29 11:24:40 -07:00
Shwetha G K
e36320f58f qcacmn: Update streamfs buf size for waikiki
Update streamfs buffer size for waikiki

CRs-Fixed: 3224877
Change-Id: I86a622ca8ea938915bcec00320918b87b2a4a74e
2022-06-27 23:30:19 -07:00
abhinav kumar
f55ec57e32 qcacmn: Support vendor handoff service bit info from FW
Add change to fetch and save the WMI service capability
bit of FW to support vendor handoff control feature
using service bit.

Change-Id: I6bc85f2807032bf84d391f34c814c91de906ab42
CRs-Fixed: 3225147
2022-06-23 08:51:02 -07:00
Shwetha G K
f803ff0a76 qcacmn: Allow CFR init/deinit on waikiki
Allow CFR init and deinit on Waikiki target.

CRs-Fixed: 3217568
Change-Id: I7bce63d0c15c11e99c4b294574515b9cc0f7b95a
2022-06-16 11:52:43 -07:00
Yu Wang
a9461beb20 qcacmn: refine the APIs for reap timer of monitor status ring
Since more than one components depend on reap timer of
monitor status ring, add bitmap to record the trigger
sources of the timer and refine the APIs/calling functions
accordingly.

With this change:
When a new start request comes, if the source is
CDP_MON_REAP_SOURCE_ANY, skip bit set, and start timer
if any bit has been set in the bitmap; while for the
other sources, set the bit and start timer if the bitmap
is empty before that.

When a new stop request comes, if the source is
CDP_MON_REAP_SOURCE_ANY, skip bit clear, and stop timer
if any bit has been set in the bitmap; while for the
other sources, clear the bit and stop timer if the bitmap
is empty after that.

Change-Id: Idaa7837c4b93b247ff2236aa5072d309fa9548c2
CRs-Fixed: 3190347
2022-06-13 22:54:46 -07:00
Madhvapathi Sriram
f4bfa6616b qcacmn: Add method to configure TID queues flush
This enables the option to configure when a peer's
TID queue needs to be flushed. This is required to
discard packets that are no longer useful to the application.

Change-Id: I558debff043fc0c8038e5f5f2c815b64c90e1561
CRs-Fixed: 3130422
2022-06-09 19:37:26 -07:00
Divya R
33e3e1d6a8 qcacmn: Initialize the chan_params structure
chan_params structure is uninitialized, due to which variables
inside the chan_params structure have garbage values.
To avoid this, initialize the chan_params structure.

Change-Id: Ic09c0a2d24c2a1eac8f076c7bbd4d25d147370fd
CRs-Fixed: 3205502
2022-06-01 01:45:37 -07:00
Debasis Das
c5d3129015 qcacmn: Handle failure during wmi event handler registration
For legacy targets, MLO-specific event-handlers are not
supported.As this is not fatal, the caller of the
wmi_event_handler_register API should not treat this as
failure.

Change-Id: Ic6a36c933b46cfcbe860f573af290cac4667de44
CRs-Fixed: 3181774
2022-05-26 03:53:18 -07:00
Edayilliam Jayadev
0130242aed qcacmn: Set/Get mgmt Rx REO feature capability
Set/Get the management Rx REO feature capability to psoc
using the correct APIs.

CRs-Fixed: 3201829
Change-Id: Id925be4a6930a1a3ec05bfdd67ef6518a5cb2cea
2022-05-24 16:01:21 -07:00
Amith Ajith
70e862a7ef qcacmn: Set global_tbl_lookup to true if country opclass is global
In function reg_freq_width_to_chan_op_class_auto, global_tbl_lookup is set
to false for 2.4 GHz and 5 GHz without considering the global opclass set
by user command. This results in wrong opclass information in eCSA.

Add an api to check if global opclass is set and update global_tbl_lookup
accordingly in reg_freq_width_to_chan_op_class_auto.

Change-Id: I069131d6068fb546f2b59f1e752a3c8c50f15759
CRs-Fixed: 3168817
2022-05-24 09:39:08 -07:00
Manoj Ekbote
298e39a2e2 qcacmn: Re-organize TWT session stats event handling
Re-arrange code for registration and handling of TWT session
event.

Change-Id: I0b4388a3d85cb387c2f5160fc13bbedb1d246da3
CRs-Fixed: 3150694
2022-05-18 14:31:39 -07:00
Edayilliam Jayadev
bcc93ce051 qcacmn: Increase read retry limit for mgmt Rx REO
Increase the retry limit for reading management Rx reorder
snapshots.

CRs-Fixed: 3193277
Change-Id: I4474e4be5d15a0c5bd4d0c613b314950ddb26c6f
2022-05-16 03:50:02 -07:00