Commit Graph

1448 Commits

Author SHA1 Message Date
Srikanth Marepalli
a4128d5887 qcacmn: Add roam set param command for roam params
This change introduces the new roam set param WMI command to set
the roam params from host to FW.
Also added a fail_bssid param in wmi_roam_result TLV to know the
roam failed AP BSSID from the FW.
Added a new vendor command event for sending roam events stats
attributes to userspace.

Change-Id: I7a08635a7912cbd940d90a2d62433296740ad913
CRs-Fixed: 3050799
2021-10-27 12:15:50 -07:00
Jia Ding
af1339925a qcacmn: Add 160p160 and 320 in enum wmi_host_channel_width
enum wmi_channel_width has defined WMI_CHAN_WIDTH_160P160
and WMI_CHAN_WIDTH_320. Therefore add corresponding
definitions in enum wmi_host_channel_width, which is then
1-to-1 mapped to enum wmi_channel_width.

Change-Id: Iff5dc1f678874e1d15581a1ebbacc06c25d09699
CRs-Fixed: 3062062
2021-10-26 01:15:22 -07:00
Gaurav Sharma
0be0d71e91 qcacmn: Handle announce timeout value in TWT setup command
Handle announce timeout value that is received as a part of
the TWT setup command and provides it to the firmware through
the WMI_TWT_ADD_DIALOG_CMDID. If timeout value is non-zero
then firmware waits up to timeout value to use data frame as
announcement frame. If timeout value is 0 then firmware sends
explicit QoS NULL frame as announcement frame on SP start.

Change-Id: I682d1dc4e304042e4e9b8d6c6a73dc13fbbdccab
CRs-Fixed: 3053956
2021-10-25 07:47:15 -07:00
Yu Wang
f09d8efa11 qcacmn: add wmi support for MLO link set active command
Add wmi support for MLO link set active command.

Change-Id: If0dbadc3d0687bfeee9e2ddb14e9c843f5ba9250
CRs-Fixed: 3036840
2021-10-22 14:25:57 -07:00
Yu Tian
dc20d398e8 qcacmn: Add TX pending indication when sending wake up to FW
FW may experience HWDTIM mode enter and exit, if HOST can't queue
frames fast enough, this will bring 10ms latency for TX under WoW.
This change adds an indication bit to notify FW whether a TX happens
after WoW wakeup, then FW can discard HWDITM and reduce TX latency.

Change-Id: Ib695a0e5d032af4be27fef59f3c5123a35428d7d
CRs-Fixed: 3046987
2021-10-18 14:51:51 -07:00
Shwetha G K
682ebee7e9 qcacmn: Fetch gain table idx from cfr event
Fetch agc gain table index from peer capture event
so that it can be populated to CFR metadata

Change-Id: Ic5e86d3947433be4218958badfdb8fc07acded89
2021-10-18 06:13:34 -07:00
Aditya Kodukula
6a5c5db59d qcacmn: Add Support to offload icmp feature to fw
Send command with required parameters to offload icmp
feature to fw.

Change-Id: Iefac64a34e274830f0c1c82589b2f35817306a64
CRs-Fixed: 3042454
2021-10-12 00:09:06 -07:00
Venkateswara Swamy Bandaru
ab2c08d63e qcacmn: Add wmi support for eht vdev params
Add wmi support for eht vdev params
mu mode, puncturing mode, ltf config, dcm
and range extension configs.

Change-Id: I6cfc0297a4a323775614f28717c50109558dd401
CRs-Fixed: 3052104
2021-10-11 14:56:04 -07:00
Srinivas Dasari
b3dfd1cbfa qcacmn: Cleanup ROAM_TARGET_IF_CONVERGENCE usage
wma to target_if convergence code is guarded under the feature
flag ROAM_TARGET_IF_CONVERGENCE and it's is enabled currently.
Remove the flag usage and remove the deprecated code(else part)
also.

Change-Id: Id3171956028d6086f85eac73865c37498926d6cc
CRs-Fixed: 3049946
2021-10-06 00:02:17 -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
Rhythm Patwa
d3d6af4357 qcacmn: Update the config variable for LPI/SP mode
For enabling LPI/SP mode host service flag bit is expected
to be enabled. Updated the variable name appropriately to
correctly reflect interpretation of the Host service flag.

CRs-fixed: 3024535
Change-Id: Ie5fa2b4036074bf5304c17984007401f821d6d04
2021-10-05 09:52:23 -07:00
Srinivas Dasari
f2ec3b8c25 qcacmn: Allow NAN LOG messages upto a size of 400 bytes
Currently, host allows NAN log messages from firmware upto a max
size of 200 bytes. But firmware may need to send bigger messages
than this in case of stats events as tx/rx stats message length
can go upto 350 bytes.
So, allow NAN messages upto 400 bytes to avoid splitting
the stats messages.

Change-Id: Ibb03944da81ed8d378dadbf4750013e0fe941e57
CRs-Fixed: 3049258
2021-10-05 02:51:22 -07:00
Nirav Shah
47c8c541c2 qcacmn: Handle TSF value in TWT setup command
Handle QCA_WLAN_VENDOR_ATTR_TWT_SETUP_WAKE_TIME_TSF attribute
in TWT setup command to provide absolute TSF value to firmware.
This helps application to start TWT session on specific TSF value.

Change-Id: Ic25b45e88599a024e6c4e6bb265ea90122405d05
CRs-Fixed: 3029020
2021-10-04 05:32:10 -07:00
Nirav Shah
2f37575532 qcacmn: Send responder pm mode info to user space
Send responder pm mode info in twt setup event and twt
get session parameter response.

Change-Id: I1f58e0bed62f152d84cec20ff7924d05e126347f
CRs-Fixed: 3029014
2021-10-04 01:05:52 -07:00
Pavankumar Nandeshwar
ebc826e655 qcacmn: Add wmi for mec timer in Beryllium
Add wmi commands to configure mec timer in
Beryllium firmware

Change-Id: I8cb103e70ffa6f589b9befa9b6ce099fd185948c
2021-10-01 15:18:20 -07:00
Shiva Krishna Pittala
61f4418d7a qcacmn: Add support to process spectral scan detector info tlv
FW sends Spectral scan detector info TLV in WMI_PDEV_SSCAN_FW_PARAM
event to indicate the information of a detector participating in a sscan
session. FW sends one TLV of this type for each detector participating
in a spectral scan session. Add support to process the TLV and update
the spectral host data structures accordingly.

CRs-Fixed: 3044193
Change-Id: Ie17b6ea9336ada7a00e4594fa2f7f49ef3d443e5
2021-09-30 18:16:42 -07:00
Shiva Krishna Pittala
e991ce3cdd qcacmn: Add support to process spectral scan chan info TLV
FW sends Spectral scan chan info TLV in WMI_PDEV_SSCAN_FW_PARAM_EVENTID
event to indicate the channel information for a spectral scan session.
Add support to process the TLV and update the spectral host data structures
accordingly.

CRs-Fixed: 3044162
Change-Id: Ibbf7f6bbbb267123bbdf44bcfffa2cfb1c2926df
2021-09-30 18:16:37 -07:00
Pavankumar Nandeshwar
591f8bb3a1 qcacmn: Add wmi to enable wds in Beryllium
Add new wmi to enable/disable wds in Beryllium
firmware

Change-Id: I4439973017d5fda734f5ca351334dc9f03988717
2021-09-30 15:15:20 -07:00
Ashish Kumar Dhanotiya
ef5ccaa3e1 qcacmn: Add logs to print if nan is enabled or not for a freq
With this change add log with scan channels list dump to print
if NAN is enabled or not for any frequency.

Change-Id: I81f5017c7f146d2c7bd227601ae320d9cc67f82f
CRs-Fixed: 3042903
2021-09-30 06:27:35 -07:00
Shiva Krishna Pittala
d36115b849 qcacmn: Big-endian mode changes for Beryllium Spectral
On Beryllium architecture, PHY DMA applies a 32-bit byte swap to assist
in efficient Host reads when connected to a big-endian Host.
This is done to avoid byte swapping at the Host.
So, if the Host reads this data 32-bit word at a time, the byte order
would be intact. Report headers are not a problem because as they are
composed of 32-bit words. For FFT bins, read each DWORD at a time and
extract FFT bins out of that DWORD. Make this change in a generic way to
keep the design uniform across different chipsets and endian modes.

CRs-Fixed: 3042188
Change-Id: Idff1ac7eb5e18c692c9ee8b19b9ae9e6b962d486
2021-09-30 06:27:26 -07:00
Shiva Krishna Pittala
29817dce94 qcacmn: Move REGDMN and wireless modes to reg_services_public_struct.h
There is a requirement to use REGDMN and wireless modes in UMAC layer of
the cmndev component. As the WMI_HOST_REGDMN modes currently are defined in
WMI layer, we can't use them directly in the UMAC layer. Hence move them
to the reg_services_public_struct.h and rename them as HOST_REGDMN modes.
Replace all WMI_HOST_REGDMN instances with HOST_REGDMN. Wireless modes are
currently defined in WIN component, use them to cmndev component.

CRs-Fixed: 3044590
Change-Id: Iee5fa1745a1a44b834334746b10bdbb6f6563a0a
2021-09-27 22:22:23 -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
Hariharan Basuthkar
479b0d31a1 qcacmn: Fix the issues pointed out by KW in the regulatory module
Fix the issues pointed out by KW :

1) https://kwdbprod16.qualcomm.com:8070/review/insight-review.html#
   issuedetails_goto:problemid=222576,project=CRM_NHSS_QSDK_11_5_P

   Initialize dbg_id in reg_process_afc_power_event.

2) https://kwdbprod16.qualcomm.com:8070/review/insight-review.html#
   issuedetails_goto:problemid=222579,project=CRM_NHSS_QSDK_11_5_P

   In ucfg_reg_get_partial_afc_req_info, add a sanity check for afc_req
   to prevent NULL pointer dereference.

3) https://kwdbprod16.qualcomm.com:8070/review/insight-review.html#
   issuedetails_goto:problemid=222580,project=CRM_NHSS_QSDK_11_5_P

   Add a sanity check for afc_chan_obj to prevent NULL pointer
   dereference.

Change-Id: I0481fda6d08590312a863a33a1823a0b07fa194e
CRs-Fixed: 3043280
2021-09-25 06:03:29 -07:00
Pavankumar Nandeshwar
866ade593a qcacmn: wmi commands for intra-bss in Waikiki
Add wmi commands to enable/disable intra-bss
at vdev and peer levels for Waikiki.

Change-Id: I8e1c03326955e460aef1afb8e1ff56e03d4cbdca
2021-09-24 18:27:58 -07:00
Huashan Qu
88c125a678 qcacmn: Rename QCA_MCL_DFS_SUPPORT to MOBILE_DFS_SUPPORT
Rename QCA_MCL_DFS_SUPPORT to MOBILE_DFS_SUPPORT.

Change-Id: Ic209f76e3a9b1a7a524d7036a0fef7ca044d4ca8
CRs-Fixed: 3038271
2021-09-23 21:35:24 -07:00
Pragaspathi Thilagaraj
517a254443 qcacmn: Add support to parse roam frame info TLV
Add support to parse roam frame info TLV

Change-Id: I3addd7256c003ca25c4dd5545ee0aa6a6c18a20f
CRs-Fixed: 3013488
2021-09-22 03:16:07 -07:00
Basamma Yakkanahalli
9ea8540ecd qcacmn: Add service_ready handling for multiple MBSSID groups
Add change to handle service_ready for,
1.  Ema multi-MBSSID group support
2.  Large beacon support greater than 1.5K

CRs-fixed: 3036717
Change-Id: I1c985faf429aacd78ae74fe0ffe18958fd6aa821
2021-09-21 09:30:28 -07:00
Surabhi Vishnoi
b69d6e0499 qcacmn: Fix possible OOB write in extract_time_sync_ftm_offset_event_tlv
In extract_time_sync_ftm_offset_event_tlv there is a possible
OOB write when value of num_qtime received from firmware is
greater than FTM_TIME_SYNC_QTIME_PAIR_MAX.

Fix is to add a sanity check for value of num_qtime received from
firmware to avoid the OOB write.

Change-Id: I6e57b1d716992d1a3c7d2f7ea911fefcbfbeff34
CRs-Fixed: 3033509
2021-09-17 13:48:07 -07:00
Arun Kumar Khandavalli
114c654e69 qcacmn: Use the right wmi macro to set the htt peer data version
Currently WMI_TARGET_CAP_FLAGS_RX_PEER_METADATA_VERSION_SET is used
to the htt peer data version, this looks like is for the firmware
and host should use WMI_RSRC_CFG_FLAGS2_RX_PEER_METADATA_VERSION_SET
macro to send back this infromation back to the firmware.

Correct the macro to se the htt peer data version to the firmware.

Change-Id: I06cb86eaa05eda45fb524c77acce3248c90498d6
CRs-Fixed: 3032308
2021-09-15 23:46:33 -07:00
Srinivas Girigowda
85358bdd12 qcacmn: Fix compilation error in send_oem_dma_cfg_cmd_tlv()
Fix compilation error due to incorrect paranthesis
positioning.

Change-Id: I4e2885054f724970e5baef6c7a4ed73a77decc4f
CRs-Fixed: 3034802
2021-09-15 03:02:56 -07:00
Yu Wang
77620f4630 qcacmn: add HW_MODE_POLICY_OFFLOAD wmi service support
The flag WMI_SERVICE_HW_MODE_POLICY_OFFLOAD_SUPPORT indicates
whether HW mode selection offload is supported by firmware or
not.
If it's advertised in service capability, host should not set
HW mode explicitly, firmware takes control of managing HW mode.

Change-Id: I8939b44fd7ed3a674c4da91524c5d5622bf67ce7
CRs-Fixed: 3017054
2021-09-14 21:58:17 -07:00
abhinav kumar
ce3c421e62 qcacmn: Handle new BTC roam trigger reason
Handle new BTC roam trigger reason in roam scan stats
kmsg prints.

Change-Id: I8a8f85c7215813626dc27a00b3fbabf7388529f6
CRs-Fixed: 3033384
2021-09-13 04:08:28 -07:00
Kiran Venkatappa
7aaef9935d qcacmn: Extract hw_link_id and store in target_if pdev context
hw_link_id is unique across psoc to identify pdev in multi-soc ML cases.
Exract hw_link_id from mac_phy_cap and provide APIs in target_if to set
and get this for pdev

Change-Id: I9dcc4c1e4b515e83151ca88f5f026c0dd0b04646
CRs-Fixed: 3023496
2021-09-01 17:13:27 -07:00
Rhythm Patwa
7a9dc17c65 qcacmn: Add support for AFC Host service flags
Add support for AFC specific Host service flags to switch
between LPI only and SP+LPI, disable AFC timer and request ID checks
in target.

Change-Id: I34d6adcad6e4a2cd6383c941ed07b98059daeed0
2021-08-31 22:23:51 -07:00
Kiran Venkatappa
718f574750 qcacmn: MLO setup, teardown, ready WMI API
Add WMI APIs for MLO setup, ready and teardown command send and extract
routines

Change-Id: If986124032c4fb9bb3ed2ffbf2ac6db8fe9e0f1f
CRs-Fixed: 2981067
2021-08-31 07:54:54 -07:00
Subrat Dash
8525330652 qcacmn: Add WMI support to send the wds AST commands to fw
Add host WMI APIs to send WMI_PEER_ADD_WDS_ENTRY_CMDID,
WMI_PEER_REMOVE_WDS_ENTRY_CMDID, and WMI_PEER_UPDATE_WDS_ENTRY_CMDID
to the Fw.

Change-Id: I32afdac7c366b647ee3196bcb76531295e640b8b
CRs-Fixed: 2997227
2021-08-31 05:39:37 -07:00
Srinivas Dasari
92ba4703ca qcacmn: Add roam_pmkid_request to wmi_ops
Add extract_roam_pmkid_request to wmi_ops to allow cld driver
to register the corresponding callback.

Change-Id: Ifa9cd73d6d62e7411b78b15086d7e166559f6d1c
CRs-Fixed: 3014249
2021-08-28 00:29:38 -07:00
Vijay Patil
e5748271d3 qcacmn: Add extract_auth_offload_event to wmi_ops
Add extract_auth_offload_event to wmi_ops to allow cld driver to
register the corresponding callback.

Change-Id: Ie3417f44360021570ce678ce1c3f949a92424494
CRs-Fixed: 3010510
2021-08-28 00:29:33 -07:00
Utkarsh Bhatnagar
b7ab2f5cd7 qcacmn: Add support for Thermal Stats Events
Add support for extracting Thermal Stats Events
from thermal event TLV for FW event
WMI_THERM_THROT_STATS_EVENTID.

Also, added support for FW Cmd to request for
Thermal Stats: WMI_REQUEST_THERMAL_STATS_CMDID

Change-Id: I2bc80d082bda45e2255371bcb0c31d35d9806525
CRs-Fixed: 3016845
2021-08-27 10:23:50 -07:00
Hariharan Basuthkar
21ee351e31 qcacmn: Extract AFC event in WMI layer
Extract the parameters of the WMI_AFC_EVENTID in WMI.

Change-Id: I086f095beb0961dfd7d3813c68e2caedf65a596d
CRs-Fixed: 3023089
2021-08-26 15:48:12 -07:00
Basamma Yakkanahalli
4597a3b4ad qcacmn: Increase WMI_BEACON_TX_BUFFER_SIZE to support 2.3k 20TU prb res
Redefine WMI_BEACON_TX_BUFFER_SIZE for WIN AP as 2500 bytes to support
2.3k 20 TU probe response.

Change-Id: Ia3414b9e49dfbe3839c7b993da74de8d963c24a4
2021-08-26 12:58:36 -07:00
Sai Pavan Akhil Remella
5adde265e2 qcacmn: Add extract_roam_stats_event to wmi_ops
Add extract_roam_stats_event to wmi_ops to allow cld driver to register
the corresponding callback.

Change-Id: I77ebb05a1a2ce9fa0b2f2f2ffb50c523ab9070e6
CRs-Fixed: 3007690
2021-08-24 13:12:53 -07:00
Aakanksha Doda
52595dc304 qcacmn: Add changes to extract halphy_cal_status from FW
Add changes to get halphy_cal_status properly from FW
defined variables to host.

Change-Id: I891420e0d021702553c69569d71db394e897067e
2021-08-23 15:44:10 -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
Aditya Kodukula
e668136ffc qcacmn: Support Multicast Domain Name Server Offload
The purpose of the multicast Domain Name System (mDNS) is to resolve
host names to IP addresses within small networks that do not include
a local name server.

It utilizes essentially the same programming interfaces, packet formats
and operating semantics as the unicast DNS, and the advantage is zero
configuration service while no need for central or global server.
Based on mDNS, the DNS-SD (Service Discovery) allows clients to discover
a named list of services by type in a specified domain using standard
DNS queries.

Here, we provide the ability to advertise the available services by
responding to mDNS queries.

Change-Id: Ie6a3cd319d219c2f338d83f4bdbd704a090711c4
CRs-Fixed: 3008552
2021-08-20 22:02:19 -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
Surya Prakash Sivaraj
1f8ca56f1a qcacmn: Validate the buffer length in rx mgmt handler
In the WMI_MGMT_RX_EVENTID event handling, add a length
check to validate if the buffer length sent by the firmware
is less than or equal to the actual buffer length.

Change-Id: I7db9af48bc525543b972dcaf40aee0a05d8f5023
CRs-Fixed: 3001331
2021-08-19 19:51:40 -07:00
Surya Prakash Sivaraj
39f2f9dcfa qcacmn: Validate the buffer length in fips event handler
In the WMI_PDEV_FIPS_EVENTID event handling, add a length
check to validate if the buffer length sent by the firmware
in fixed params is less than or equal to the actual buffer
length before processing the data.

Change-Id: I7a952d3e3a2f66060451263b72118a52aa89dd06
CRs-Fixed: 3009887
2021-08-19 17:34:24 -07:00
Naveen S
d73851c8e5 qcacmn: update for new wmi cmd and evt
Support WMI command/events to dynamically enable/disable calibration in FW
command: set_halphy_cal
command usage: cfg80211tool set_halphy_cal <<value>> <<channel>>
value: bitmap value to be passed ( 0 - 1023)
channel: 0 (home), 1 (scan), 2 (both)

Change-Id: I1d3ab39cf24d0880bf5feac5749b5a93e6d03761
2021-08-18 05:17:12 -07:00