Commit Graph

295 Commits

Author SHA1 Message Date
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
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
Hariharan Basuthkar
9f2a6a4040 qcacmn: Add wmi_support to send AFC cmd to the FW
Add Host WMI APIs to send the WMI_AFC_CMDID to the FW.

Change-Id: I6849826ab4596f3c76b2dea3cb76116be46b4dd6
CRs-Fixed: 2985645
2021-07-08 04:50:04 -07:00
Aakanksha Doda
e175d5124c qcacmn: Add cmn_dev changes to get ANI status from FW
Add changes to send a command and in return, get an event
giving ANI status from FW.

Change-Id: I327e6134fef17bc4dc98b99d1ca4bc4d0a039625
2021-07-06 06:53:43 -07:00
Surabhi Vishnoi
6663105f9b qcacmn: Add support to handle wmi smart monitor event
Add functions to parse and extract wmi smart monitor
event received from target.

Change-Id: Ic18e3134b684c5f8e12839e997d628909a7e27c9
CRs-Fixed: 2969247
2021-06-25 09:40:32 -07:00
Guisen Yang
3516552a3c qcacmn: Disable obss scan before suspend
When obss scan is enabled, FW will trigger scan periodically by
a timer. If a scan was triggered, FW need to access host memory
for data transfer. Occasionally, suspend may happen during one
scan, then FW is unable to access host memory and fw will crash.
So disable the obss scan before suspend.

Change-Id: Ie507da929a3701473cb57888e96e702e34d4c95a
CRs-Fixed: 2927239
2021-05-10 04:06:03 -07:00
Shwetha G K
23d574115e qcacmn: Support to get dpd status from FW
WMI changes to rerieve current dpd status from target.

CRs-Fixed: 2885488
Change-Id: Iddfcbf63fccac87b52d3ac242ba078f8210cb6d0
2021-04-19 05:06:55 -07:00
Bapiraju Alla
7f0008db3f qcacmn: Add service bit support for LL_GET_STA command over QMI
For some targets, FW expects WMI_REQUEST_UNIFIED_LL_GET_STA command
always over QMI irrespective of WOW state. FW will crash if this request
is sent over WMI on those targets. Currently there is no direct way for
the host to identify this requirement by FW. So FW may crash when this
WMI_REQUEST_UNIFIED_LL_GET_STA stats request is sent over WMI.

To resolve this, add service bit support for LL_GET_STA request over QMI.
With this change the INI parameter send_ll_and_get_station_stats_over_qmi
becomes obsolete and corresponding code will be removed.

Change-Id: I43f2827a0b1cae6e75f1224f452f8277d53736b2
CRs-Fixed: 2847483
2021-02-23 05:31:18 -08:00
Srinivas Girigowda
14bfc9057c qcacmn: Move ctrl_path_twt_stats functions to appropriate files
Move ctrl_path_twt_stats related functions to appropriate source
and header files.

CRs-Fixed:  2871393
Change-Id: I7043259c102e5aee6cbb13260ce2bb0c53c17853
2021-02-05 14:11:10 -08:00
Rajasekaran Kalidoss
0d4a8a6781 qcacmn: Add wmi support for REQUEST_CTRL_PATH_STATS
Firmware has added support for control path stats
infrastructure. Add wmi support to prepare wmi tlv buffer
and send WMI_REQUEST_CTRL_PATH_STATS_CMDID. In the response
path, add support to handle WMI_CTRL_PATH_STATS_EVENTID and
extract the tlv.

Change-Id: I930a44187af29adfda8acd90d0e41cff5fc94603
CRs-Fixed: 2856370
2021-01-22 07:36:38 -08:00
Lincoln Tran
e9c3eda862 qcacmn: Add API to send set TPC power command
Add new API to handle the logic of sending the WMI command,
WMI_SET_TPC_POWER_CMDID. Create the struct to hold this new
transmit power information.

Change-Id: Ibc7c6109176577f56d149baf87022de557e84445
CRs-fixed: 2841781
2021-01-15 14:38:39 -08:00
Bapiraju Alla
25509a1510 qcacmn: Request stats over qmi only when target suspend is success
Currently, Stats request commands are sent over qmi right from the
target suspend request is sent to FW. This is leading to a crash in
FW since it is trying to access PCI when it is in suspend state.

To address this, send stats request over QMI only after the ack is
received for the target suspend command.

Change-Id: Id7a79d52740916f66476bf911e571c0ff466c7d3
CRs-Fixed: 2838737
2020-12-17 11:44:33 -08:00
Srinivas Girigowda
7db601e3af qcacmn: Introduce wmi_validate_handle()
Introduce wmi_validate_handle() with the caller function name
embedded in it to validate the WMI handle and log incase
of error. Calling functions can avoid logging in case
wmi_validate_handle() returns -EINVAL. This reduces logging and
thereby memory foot print.

Change-Id: Ie0a6a84ffad6e5cf2da8f547c7209dc77cdf5729
CRs-Fixed: 2838960
2020-12-17 11:44:29 -08:00
Shashikala Prabhu
fd0132aa9f qcacmn: Add CSA event handler and extract APIs
Move CSA event handler and CSA extract APIs to common code

Change-Id: Iedfa3bbd8a2b6d9cbfdd9fecd57052b853ed5680
CRs-Fixed: 2826991
2020-12-01 06:50:28 -08:00
Bapiraju Alla
b130521bd3 qcacmn: Process FW diag events in a separate worker thread
Currently, FW diag logs, management frames and stats responses are
processed in worker context. Because of this, there is a possible
out of memory scenario when there are huge number of diag events
waiting in work queue.

To address this, process diag events in a separate worker thread and
set the limit for the number of diag events that can be queued in
work queue.

Change-Id: Ie6e5b905a3b591cf724cd6b024bec0612f9e2e0c
CRs-Fixed: 2818013
2020-11-21 00:20:27 -08:00
Balaganapathy Palanisamy
0d9dc04d48 qcacmn: Stop wmi sequence check during SOC stop
Skip wmi sequence check during SOC stop and enable after
initializing wmi handle. It is required to skip sequence check
during soc stop as the endpoint flush is preceding CE flush.

CRs-Fixed: 2813341

Change-Id: Ieb821483e9786471d033773dc2365ab456345f83
2020-11-12 10:13:15 -08:00
Srinivas Girigowda
1aefc8972b qcacmn: Remove obsolete WMI_LOG(I/E/P/W/D) macros
Remove obsolete WMI_LOG(I/E/P/W/D) macros and
instead use wmi_(err/debug/info/alert/warn).

Change-Id: Ib401c5da873efc7a87323d9857d7f33989c3b29c
CRs-Fixed: 2776741
2020-11-03 13:17:04 -08:00
Christopher Chopp
36627ac5e9 qcacmn: Add WMI Handler for TSF Event
Add handling for WMI TSF Event, including registration,
sending event and extracting response.

Change-Id: Icccf9b5eb7e46bd87caf7a644be903747eac025c
2020-10-26 18:56:43 -07:00
Liangwei Dong
bf189853b7 qcacmn: Add host definition for target thermal throttle level
Convert target thermal throttle level to host definition -
enum thermal_throttle_level.

Change-Id: I9914aaf56b781533565cd6a3f8b279ee67215c23
CRs-Fixed: 2786660
2020-10-23 10:03:25 -07:00
Bapiraju Alla
7af72345b6 qcacmn: Send unified ll_stats and get_station request over qmi
Send unified ll_stats and get_stats request over qmi based on INI
configuration.

Change-Id: Icc43352c1ba19696148619100ee27fda4d5ffb41
CRs-Fixed: 2791043
2020-10-08 12:23:58 -07:00
Karthik Kantamneni
268ab400cd qcacmn: Add support for WMI DIAG events over CE7
Add support for handling firmware WMI DIAG events over CE7.

Change-Id: I3d6c0b08313e816809a65eb77d9728fc4b4488f3
CRs-Fixed: 2787010
2020-09-30 11:10:33 -07:00
Bapiraju Alla
0ff4421b30 qcacmn: Send get_station and ll_stats req in a single command
Currently ll_stats and get_station requests are sent back to back
from user space. The firmware time difference between these two commands
results in extra sleep and wakeup for Q6.

To avoid this extra Q6 sleep and wake, send both requests in a single
command from the driver if the firmware supports that operation. Cache
the get_station results in the driver until user space request reach
to the driver.

Change-Id: I5e6f42f9e3836ef4bf61d3d9220f8cedb775cbd5
CRs-Fixed: 2778479
2020-09-28 17:08:12 -07:00
Abhishek Ambure
7c64a2c250 qcacmn: Add support to send wfa test config to FW
Host add support to send WFA test configs to FW using WMI command
i.e. WMI_WFA_CONFIG_CMDID.

Change-Id: Id9bdec16c69a8c16cb4ce1fac87688023c768ee6
CRs-Fixed: 2772004
2020-09-21 03:53:33 -07:00
aloksing
a9d5d1ee00 qcacmn: Change return type to QDF_STATUS
wmi_unified_register_event return QDF_STATUS

CRs-Fixed: 2764185
Change-Id: I266e5042ff45ba33ab5d53592515bceb4fec92ac
2020-09-15 18:24:32 -07:00
Nandha Kishore Easwaran
72f98bced8 qcacmn: Send diag wmi command to FW
Donot block wmi command sending inside #if macro.
This change is needed because WIN uses only the FW log level
setting and not the complete feature. Only the feature
should be enclosed in #if macros and not the wmi command
sending part.

Change-Id: Ia28c0487d360c1b0a54374bb237811eba6b1af41
2020-09-04 05:28:39 -07:00
nobelj
908218f1fa qcacmn: populate vdev extension statistics
populated fils discovery, unsolicited probe response from
vdev extension stats and populated to APSTATS.

Change-Id: I762d7f36fa45f9048cf591bde3550a415e23bdcb
2020-09-02 10:46:52 -07:00
Abhishek Ambure
f17e8207ac qcacmn: Add support to get pmf bcn protect stats from fw
To get the pmf beacon stats from firmware, host sets
WMI_REQUEST_PMF_BCN_PROTECT_STAT bit in stats_id param of
WMI_REQUEST_STATS_CMDID command. Firmware supporting pmf beacon
protection stats responds host with stats in wmi_update_stats_id
event.
Hence add support to get PMF beacon protect stats from firmware.

Change-Id: I99efd94ce5367da1312f60251ce7106997dd8bc8
CRs-Fixed: 2705084
2020-08-26 12:13:37 -07:00
aloksing
f103f00807 qcacmn: Add raw buffer support in WMI layer
To send received raw event buffer to event handler
Send without processed buffer to registered event with buffer
type WMI_RX_RAW_BUFF

Change-Id: I2a401e2e7afbfd8f32d4bd521d184ed9ddcdb264
2020-08-21 02:28:57 -07:00
aloksing
b08f3994ef qcacmn: Add WMI event for cp stats
Extract more flag from WMI event TLV buffer.

Change-Id: I6623a81100b3191d796c156c93ae1ce4c3eaeb97
2020-08-21 02:28:54 -07:00
Min Liu
44150359c9 qcacmn: Move get_peer_info into cp_stats component
Move WMI_REQUEST_PEER_STATS_INFO_CMDID related statistics into
cp_stats component.

Change-Id: Ie57f64e4ee195de30271260887c48ecf76f4a2ff
CRs-Fixed: 2680626
2020-08-14 04:12:25 -07:00
Alan Chen
07789085f8 qcacmn: Add an ini item for stats over QMI
Currently, stats over QMI features can only be disabled over build flags,
which is not flexible. Hence, add a CFG ini item to enable/disable stats
over QMI.

Change-Id: If5d57d2fc781fecc8817c2da8f61a2f7977d9c77
CRs-Fixed: 2752310
2020-08-12 19:53:19 -07:00
Edayilliam Jayadev
e0f284b015 qcacmn: Process scan radio capabilities TLV
FW advertises scan radio capabilities as part of service ready
ext2 event. This is an optional TLV, presence of which indicates scan
radio support for the that pdev.

CRS-Fixed: 2746769
Change-Id: I5a0231c54375e9f00c85f0ad92839e2fa6c79f39
2020-08-12 08:47:42 -07:00
Shashikala Prabhu
065e48fb63 qcacmn: Add wrapper function to get host pdev_id from tgt_pdev_id
Add wrapper function to get host pdev id from target pdev id.

Change-Id: I4628955569d741765efc515949909d9ea358e54a
CRs-Fixed: 2711423
2020-07-17 01:51:30 -07:00
aloksing
093d940112 qcacmn: Add wmi support wifistats
Send WMI command to FW with provided tlv from wifistats

Change-Id: I80ac9f621c75429bdca18962423026c2008a71d0
2020-07-08 08:59:19 -07:00
Jayachandran Sreekumaran
cb709cad18 qcacmn: iot_sim code cleanup in wmi
Refactor code and put iot_sim code under feature flag.

Change-Id: Id4720d63ae174d9f4490285e6eb69ab2972ccd28
CRs-Fixed: 2707122
2020-06-24 03:34:54 -07:00
Shashikala Prabhu
a76f88adb8 qcacmn: Add support to populate target 11AX wireless modes
Add support to populate 11AX wireless modes advetised in ext2 service
ready message. To support older FW that do not advertise this, use
existing host workaround to populate these in host  itself.

Change-Id: I3b3b280672592c858bd3f6f0e368909a16bd30ee
CRs-Fixed: 2650136
2020-06-08 18:37:03 -07:00
Shiva Krishna Pittala
fecd279894 qcacmn: Add WMI support for Spatial Reuse commands and service ready bit
In order to enable/disable the OBSSes whose transmission can be treated as
SR opportunity for SRG and Non-SRG based Spatial Reuse, add the required
WMI support. Also, add the Host abstractions for the following
        - WMI_VDEV_PARAM_ENABLE_SRP
        - WMI_SERVICE_SRG_SRP_SPATIAL_REUSE_SUPPORT

CRs-Fixed: 2684157
Change-Id: Ib3e919766436ca4d4e7f9242b642ba309dbf9a47
2020-05-15 20:14:55 -07:00
Neha Bisht
4bda764146 qcacmn: remove dependency of public files from wlan_objmgr_psoc_obj.h
Remove dependency of wlan_lmac_if_def headerfiles from
wlan_objmgr_psoc_obj.h

Change-Id: Ibe2f22c4b4f22b15eef201d1a42844ccf2931fef
2020-05-15 10:41:50 -07:00
Edayilliam Jayadev
abdb33bb00 qcacmn: Add start scan response WMI event
Add support for processing the start scan response
WMI event. FW provides the necessary information to
segregate FFT bins to pri80, 5 MHz and sec80 in
160/165 MHz. Also, cfreq2 and the channel width is
provided to FW via WMI command.

CRs-Fixed: 2672081
Change-Id: I666b6c18a63d5d01117aa9cbd611691c6f8b2793
2020-05-13 01:30:40 -07:00
Jayachandran Sreekumaran
77c068dda2 qcacmn: IOT SIM target interface
IOT SIM target interface updates

Change-Id: Ia9b048ecccd476df822e61f4ccb16e70352f630d
CRs-Fixed: 2665426
2020-05-12 06:43:14 -07:00
Shiva Krishna Pittala
2d6af44647 qcacmn: Add WMI support to configure SRG BSS color and BSSID bitmaps
To be able to configure SRG BSS Color Bitmap and SRG Partial BSSID Bitmaps,
add the required WMI support.

CRs-Fixed: 2665817
Change-Id: I141abe24dd34cab92f45b230b385500902d01416
2020-05-07 01:55:20 -07:00
Adil Saeed Musthafa
60d18029b6 qcacmn: Add API to check if WMI is blocked or not
Add API to check if WMI commands have been blocked

Change-Id: I675b102b74d607332acf8a417c0c94955cbd5ecd
CRs-Fixed: 2662158
2020-04-24 08:57:39 -07:00
gaurank kathpalia
dcc847a925 qcacmn: MCL specific movement from cmn to cld of stats
Move the MCL specific files related to cp stats from
the cmn to cld folder.

Change-Id: I62076512b1b407342338d4612087edd3ba2296df
CRs-Fixed: 2552452
2020-04-17 07:37:08 -07:00
Rhythm Patwa
78ddddb141 qcacmn: Add WMI support to enable injector frame cmd
Add corresponding WMI host param for enabling the
injector frame on the AP.

CRs-fixed: 2640751
Change-Id: I00a634375e0eafbacfd505aa39dce9c8d90804c6
2020-03-16 13:52:34 -07:00
Dundi Raviteja
459060642c qcacmn: Add wmi interface changes to extract mgmt offload event
Add wmi interface changes to extract mgmt offload event params
when WLAN_FEATURE_PKT_CAPTURE is enabled.

Change-Id: Icacd65a99953fdc77b2c6823e9d26baaed3737c8
CRs-Fixed: 2619316
2020-02-20 21:36:26 -08:00
Gurumoorthi Gnanasambandhan
c4880c3a0b qcacmn: WMI tlv support to profile commands
WMI_WLAN_PROFILE commands support for tlv path.
Add WMI profile enable and trigger commands in tlv path

Change-Id: I10f867b181b559b82c097d6a61236f2145549238
2020-02-19 10:08:40 -08:00
Surabhi Vishnoi
d6e10c598e qcacmn: Add function to extract the events for FTM TIME SYNC feature
This patch adds the function to extract and parse the wmi events
WMI_VDEV_AUDIO_SYNC_START_STOP_EVENTID and
WMI_VDEV_AUDIO_SYNC_Q_MASTER_SLAVE_OFFSET_EVENTID. These events are
required for ftm time sync feature.

Change-Id: Ib17da82b7a8abfcff5d18125a0ba0e5249d6bf54
CRs-Fixed: 2615452
2020-02-08 00:48:40 -08:00
Surabhi Vishnoi
7f64ef005b qcacmn: Add the wmi interface changes for sending wlan time sync cmd
This patch adds the support for forming tlv commands
WMI_AUDIO_SYNC_TRIGGER_CMDID and WMI_AUDIO_SYNC_QTIMER_CMDID.

CRs-Fixed: 2607605
Change-Id: Ifaf2b43b60cf604d79d5649b27632422850a0d61
2020-01-24 00:56:32 -08:00