Commit Graph

983 Commits

Author SHA1 Message Date
Yu Wang
98a3fceeb3 qcacmn: Enhance DCS event handler to support AWGN event
Handle DCS-AWGN event and take actions accordingly:
For STA mode, if the interference locates on primary 20MHz,
disconnect from AP; otherwise, find a max interference free width
and trigger channel change.
For SAP mode, if the interference locates on primary 20MHz,
try to select a random interference free channel and trigger channel
change (stop SAP if no channel is selected); otherwise, find a max
interference free width and trigger channel change.

Change-Id: I33e79f454b459b12ad84f8b0f3259403037464ee
CRs-Fixed: 2958675
2021-07-02 19:02:13 -07:00
Li Feng
8f08624111 qcacld-3.0: Set moddtim dynamically in the li offload mode
Extend hdd_config_modulated_dtim() to configure moddtim
dynamically in the both non li offload and li offload mode.

Change-Id: I8669ec618d4aa9cd87c4c234972ca500c98119b6
CRs-Fixed: 2970090
2021-07-01 04:24:12 -07:00
Abhishek Singh
77a80c595c qcacld-3.0: Code cleanup for connection manager in LIM/WMA
Remove unused code related to ndef FEATURE_CM_ENABLE in LIM/WMA.

Change-Id: I1697f0a6c9102e3b70ce6f7a1c78ea895d4d160b
CRs-Fixed: 2977902
2021-06-28 12:24:29 -07:00
Surabhi Vishnoi
56b6d5ca76 qcacld-3.0: Add function to fill rssi received from target in vdev_priv
Add function to populate the rx average rssi received from target in
pkt_capture vdev_priv structure. The rx average rssi is received in
wmi smart monitor event.

Change-Id: I9206669b418a2245bb8d53920040fddea77ce06c
CRs-Fixed: 2969242
2021-06-25 14:15:01 -07:00
Surabhi Vishnoi
2e29e9a9ee qcacld-3.0: Register handler for wmi smart monitor event
Register handler for wmi smart monitor event in packet capture
mode in lithium. Currently, wmi smart monitor event provides
average rssi of last ten received data packets.

Change-Id: Ieeea5cbef328b04f139f54e7a42d52a3cf25824b
CRs-Fixed: 2969245
2021-06-25 09:40:17 -07:00
Hariharan Basuthkar
2234d80a72 qcacmn: Make 6G edge channel APIs common
Currently the 6G edge channel feature is MCC specific.
Make the 6G edge channel feature common for WIN and MCC.

Change-Id: I723b6db1d74dca5a911eede4ec6e6167f6b3e6bc
CRs-Fixed: 2976871
2021-06-25 07:20:05 -07:00
Will Huang
b128bc2e3e Revert "qcacmn: Drop ch avoid event if list is empty"
This reverts change-id I176b9c09106cc0d7f5cfbc474912e4a48d633ff2.
The 0 count chan avoid event is used to clear all previous reported
chan avoid freq range, so it can't be skipped.

Change-Id: Ie01d88c353a7f71bbee70ae67f54147ea147f6d4
CRs-Fixed: 2970061
2021-06-25 02:56:36 -07:00
Alan Chen
75c2cf25ab qcacmn: Add debug log to print link vote id
Add debug log to print details about the link vote id.

Change-Id: I2e89a3d6f06a0f3ec38ea9e8345d854553dbe86d
CRs-Fixed: 2964961
2021-06-24 16:32:11 -07:00
Huashan Qu
185c716e22 qcacld-3.0: Return success when firmware doesn't support 11k offload
Return success when firmware doesn't support 11k offload, or else
subsequent roaming related wmi commands have no chance to issue.

Change-Id: I69d55cca63f2b7ab4787295a2825159395cf2a11
CRs-Fixed: 2976163
2021-06-24 11:41:18 -07:00
Vulupala Shashank Reddy
50b257d0bd qcacld-3.0: Pkt capture config for qos null and trigger frames
Provide ucfg api to configure qos null and trigger frames.

Ucfg api will send configuration to FW. Below configuration values
are allowed.

PACKET_CAPTURE_CONFIG_TRIGGER_QOS_DISABLE: disable capture for
trigger and qos frames.
PACKET_CAPTURE_CONFIG_TRIGGER_ENABLE: enable capture for trigger
frames only.
PACKET_CAPTURE_CONFIG_QOS_ENABLE: enable capture for qos frames only.
PACKET_CAPTURE_CONFIG_TRIGGER_QOS_ENABLE: enable capture for both
trigger and qos frames.

The packet capture config old value will be over written by new value.
For example, first if we configure value as
PACKET_CAPTURE_CONFIG_TRIGGER_ENABLE and then if we send config as
PACKET_CAPTURE_CONFIG_QOS_ENABLE then config is enabled only for qos.

Change-Id: I02dcd4372c7194ec3e477694ad0e2c045fe6c942
CRs-Fixed: 2967824
2021-06-22 23:04:21 -07:00
Yu Wang
dcd269c55a qcacmn: enhance crypto api to install key synchronously
Add parameter 'bool sync' for wlan_cfg80211_crypto_add_key()
to indicate whether or not to add key synchronously.
If it's set to true, wait until install key complete event
is received.

Change-Id: I9a69d486665fb3f65a5720ccfbfb638c09329418
CRs-Fixed: 2865832
2021-06-21 23:14:27 -07:00
Basamma Yakkanahalli
00bcc8cbd3 qcacmn: Initial changes for ipq9574 target compilation
Added device ID and target type checks for ipq9574 traget
compilation.

Change-Id: Ie337d1256f828987ed469a609c8fb74de2180dca
2021-06-18 11:07:50 -07:00
Shwetha G K
54f6e60a7c qcacmn: Add mcs, gI & sig info to cfr metadata
Add mcs rate, gI type and other SU sig info to cfr metadata.
For Tx based capture mcs rate & gI type is applicable
MCS For legacy mode
      0: 48 Mbps
      1: 24 Mbps
      2: 12 Mbps
      3: 6 Mbps
      4: 54 Mbps
      5: 36 Mbps
      6: 18 Mbps
      7: 9 Mbps
      8: invalid entry
MCS for HT, 0-7: MCS0-MCS7,
MCS for VHT, 0-9: MCS0-MCS9,
MCS for HE, 0-11 MCS0-MCS11, 12-13: 4096QAM
GI:
     0: 0.8 us
     1: 0.4 us
     2: 1.6 us
     3: 3.2 us
ltf_size:
     0: he_ltf_1_x
     1: he_ltf_2_x
     2: he_ltf_4_x
dcm: Indicates if DCM set
     0: No DCM
     1: DCM
sgi: Indicates if short gI used
     0: No short gI
     1: short gI
beamformed: Is packet beamformed
     0: non-beamformed
     1: beamformed
stbc: Indicates if stbc applied
     0: No STBC
     1: STBC
Coding:
     0: BCC
     1: LDPC

Change-Id: If6ab4b4878ab24406aba0e890ec08a2dae2b4634
2021-06-16 16:51:17 -07:00
Shwetha G K
e0b5142fdc qcacmn: Cleanup CFR meta version structures
Cleanup CFR metadata version structures to avoid redundant
& unused definitions

Change-Id: Ia8b8234a38455f8c976600ef40c0a56c7bf66a53
2021-06-16 16:51:12 -07:00
Srinivas Dasari
bf934ec71e qcacld-3.0: Move NAN log events to RX_WORK context
Firmware sends NAN log events to driver and these are logged
with info level to capture complete NAN state machine logs in kmsg.
Currently, these events are received/processed in soft IRQ context
and causes performance issues as logs introduce delays. Move the
event registration to RX_WORK context to avoid delays.

Change-Id: I15ba20059f55f002cfe276d62e68e3cc09136a23
CRs-Fixed: 2960359
2021-06-09 19:43:09 -07:00
Srikanth Marepalli
be57c231e7 qcacld-3.0: Enhance the EAPOL handshake offload INI per AKM
Existing INI disable_4way_hs_offload is defined as a boolean
that controls the EAPOL Handshake to be offloaded to Firmware or
Not. There is no way to specify the EAPOL offload per AKM.

Hence extended the support of EAPOL handshake offload to firmware
per AKM by converting this INI to a bitmap integer.
With ini value as 0 by default Firmware takes care of 4-way HS
during roam for all AKMs except for SAE and OWE. If
this ini value is 1 then Host takes care of EAPOL for all AKMs.

Having the backward compatibility, added a new value to ini.
If this ini value is set to 2 and also if the SAE EAPOL offload
service bit is set by Firmware then the behavior is same as ini
with 0 except that Firmware takes care of 4-way HS for SAE roam
as well. And for OWE it is still handled by supplicant.

To achieve this, new roam offload flag is introduced to indicate
Firmware about SAE roam EAPOL offload, So that in Roam sync
indication Firmware will inform the status as connected but not
authenticated so that supplicant can take care of 4-way EAPOL HS.

Change-Id: I8b65a1768fad91fac7e427712d3ccf4586176f5f
CRs-Fixed: 2955029
2021-06-07 22:54:32 -07:00
Rakesh Pillai
34b6af18a4 qcacmn: Init-Deinit changes for WCN7850
Add Init-Deinit changes for WCN7850 support
in datapath

Change-Id: I7f9850ee41f4638c6a28b5313549c67876c5f810
CRs-Fixed: 2888556
2021-06-05 15:10:50 -07:00
Srinivas Dasari
f8640ac11a qcacld-3.0: Move cp stats to scheduler thread from kworker thread
Currently, cp stats are received through kworker thread context.
This causes race conditions/out of sync issues if any common data
structures are handled in parallel in scheduler thread context.
There is no need to receive the cp stats on kworker thread as per
current design. So, move the cp stats event handling to scheduler
thread to avoid any race conditions.

Change-Id: Id8134003e6f7a3e0368b20c496f650e0b7025b9e
CRs-Fixed: 2928876
2021-05-31 05:36:02 -07:00
Shwetha G K
6f88e8eede qcacmn: Fix build error post CFR movement to cmndev
Fix the compilation error post movement of CFR files to
cmndev and rename cfr init deinit APIs to be chip
independent. Also port fixes from component_dev.

CRs-Fixed: 2938886
Change-Id: I2f5637f5717ce5154e3b642c3ade646794e99602
2021-05-31 03:25:07 -07:00
Shwetha G K
550f97cf8a qcacmn: Move CFR to common project
Move CFR to common project and rename the files as it will
be shared with other targets as well. Fix checkpatch errors
too.

Change-Id: I66481848036212aedab74c9c18848070ac1a3511
2021-05-31 03:25:03 -07:00
Venkateswara Swamy Bandaru
38f2c1baf2 qcacmn: WMI changes for setting eht op
Add WMI support for setting eht op in vdev start wmi command.

Change-Id: I7eb0e7e5ace9d78dd060e207c3227d86c3882bee
CRs-Fixed: 2858003
2021-05-11 08:03:27 -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
Venkateswara Swamy Bandaru
77fb0e3ac1 qcacmn: Fix compilation error
Fix compilation error when WLAN_FEATURE_11BE is enabled.

Change-Id: I1f762f7f2e8c257d4b010a7eac6c888a08a1e7af
CRs-Fixed: 2939040
2021-05-06 06:23:51 -07:00
Wu Gao
e7c7eb280a qcacmn: Add more debug information when get invalid paddr
When host failed to find out vaddr by paddr from FW, output more
information for debug further.

Change-Id: I65c4965c12c2ffa3fe2a26a82df01d1b91501c73
CRs-Fixed: 2925194
2021-05-04 15:04:24 -07:00
Venkateswara Swamy Bandaru
1ac1976b57 qcacmn: Vdev start changes for supporting 11be
Add support for setting ehtop on vdev start wmi command.

Change-Id: Ia710cfe082dafd6d36e232253fa2f5ba6d7512d3
CRs-Fixed: 2857805
2021-05-04 10:58:39 -07:00
Wu Gao
672bbe5490 qcacmn: Get vdev based on vdev id
Driver gets vdev by wlan_objmgr_pdev_get_first_vdev and returns wrong
vdev in some platforms, and then gets wrong channel/phy_mode. This
change gets vdev by id and fix this issue.

Change-Id: I814d516361238afbd0345bc362c286d1cb55a7d4
CRs-Fixed: 2933525
2021-04-30 16:51:06 -07:00
Shwetha G K
8159fecc91 qcacmn: Update cfr metadata len calculation logic
Separate the common fields of csi_cfr_header and update
the logic of calculating the cfr_metadata_len.
Move cmn header update code to single place.

CRs-Fixed: 2916901
Change-Id: I97d99df45f667f4ed3b80264b12d3d09a3bcae95
2021-04-27 09:14:16 -07:00
Deeksha Gupta
34fcba4a4a qcacmn: Avoid excessive kmsg log in target_spectral
Sometimes firmware sends spectral events repeatedly with
wrong vdev. This causes continuous error logs are
written to kmsg.

Replace info prints in target_if_consume_spectral_report_gen3()
with debug level prints.

Change-Id: I2ca4be7d0d13e841a6dbd4efbc02ecd2b12893f8
CRs-Fixed: 2926759
2021-04-23 04:36:06 -07:00
Ananya Barat
b76f24187d qcacmn: Do not start Spectral Scan if RCAC is enabled
Agile scans (preCAC/RCAC) use the Agile Engine which is also needed
for the Agile spectral scan. Hence, both cannot run at the same time.

Currently, if Agile preCAC is enabled, Agile spectral scan is not
started. Do not start the spectral scan if either RCAC is enabled or
preCAC is enabled.

Change-Id: I242c28c2c3f8872ceab6314dde80361c283d3ac1
CRs-Fixed: 2922250
2021-04-22 21:59:27 -07:00
Srinivas Girigowda
216b52af2f qcacmn: Add debug logs in cp_stats event path
In the issue reported, the clear stats request from the
user space is timing out because event id from firmware is not received.
From the logs it is not clear whether host driver received it or dropped
it in the error path.

Add debug logs, to make sure cp_stats event id is received in the host
driver and also in error cases.

Change-Id: I634714281db4a82826791725ec38fd589334cde8
CRs-Fixed: 2926978
2021-04-20 17:05:51 -07:00
Paul Zhang
28132be777 qcacld-3.0: Support congestion report on multiple interfaces
Support congestion report on multiple interfaces

Change-Id: Iff650519c5b0e48ad63bb0a05d1c736ec40b385d
CRs-Fixed: 2832477
2021-04-14 05:34:12 -07:00
Shiva Krishna Pittala
ec05e79403 qcacmn: Print an error message when Agile spectral frequency is 0
When agile spectral frequency is 0 and user tries to start agile spectral
scan, 'A parameter is not initialized' message is thrown from user space
but that message is not enough to identify that agile spectral frequency
is not initialized. To address this, print an error message from driver
when Agile spectral frequency is 0.

CRs-Fixed: 2921000
Change-Id: Ibbb144a57774ad274b31015c7a04aa6097daf09f
2021-04-14 00:52:29 -07:00
Priyadarshnee Srinivasan
ca3471eeec qcacmn: Avoid mem copy for different structure types
The regulatory wireless modes are populated by FW in
wlan_psoc_hal_reg_capability during service ready. This is copied
to the host regulatory data structure reg_cap. To accommodate the
802.11BE wireless modes, data type of wireless_modes in reg_cap is
changed from uint32_t to uint64_t, though FW still advertises as a 32
bit flag. As the wireless mode data type of host and FW are different,
structure copy using qdf_mem_copy does not work as expected and it corrupts
the adjacent elements.

Hence copy the elements individually from wlan_psoc_hal_reg_capability
to wlan_psoc_host_hal_reg_capabilities_ext structure. Also, typecast the
wireless_modes to 64 bit before storing in the host structure.

CRs-Fixed: 2901260
Change-Id: I42c8de831f97ec691c9b8cb50b8982662e39e7d9
2021-04-12 05:42:57 -07:00
Priyadarshnee Srinivasan
2b51168ba8 qcacmn: Add 11BE wireless mode and NO11BE phybitmap
Extract the 11BE flags advertised by FW in WMI_SERVICE_READY_EXT2_EVENTID
and update the regulatory pdev wireless modes. The wireless mode is
currently represented as 'uint32_t' and all the 32 bits are exhausted.
To accommodate the new 11BE flags, change the data type of wireless_modes
from 'uint32_t' to 'uint64_t'.

Add a regulatory phymode 'REG_PHYMODE_11BE' in enum reg_phymode.

If the chip does not support 11BE phymode, FW advertises it via
WMI_REGULATORY_PHYBITMAP enum with a value of REGULATORY_PHYMODE_NO11BE.
Extract the phybitmap and store it in the regualtory
as 'REGULATORY_PHYMODE_NO11BE' bitmap.

CRs-Fixed: 2901260
Change-Id: I4ed3fc7c907b1f76e59efb347c747acea2a163b0
2021-04-12 05:42:52 -07:00
sheenam monga
5986b910ee qcacld-3.0: Add support to offload igmp feature to fw
offload igmp feature to fw in case of suspended state
to avoid high power consumption.

Change-Id: I05fbf23dc2836f8f5dc6e2f45b35bf2d30c39790
CRs-Fixed: 2907644
2021-04-05 15:22:23 -07:00
Venkateswara Swamy Bandaru
216478aaae qcacmn: EHT changes as per latest fw cmn headers
Updated the EHT related variables as per latest fw cmn headers.
Address review comments from previous EHT gerrits.

Change-Id: I67cd58a4efcf3e06d2ca3b5570432593b1d80825
CRs-Fixed: 2902607
2021-04-05 04:45:25 -07:00
Venkateswara Swamy Bandaru
bb3a53e3dd qcacmn: Add 320Mhz bandwidth support
Expand bandwidth related fields to support 320MHz.

Change-Id: I4d80625607d0f507373decd70006d55d79b3629a
CRs-Fixed: 2881992
2021-04-04 00:15:30 -07:00
Rakshith Suresh Patkar
6fa61a5368 qcacmn: Make agile center freq 0 in stop sscan
In agile spectral scan scenario, if there is a chan switch,
it is possible for the new operating span to overlap with
the agile frequency, which results in erroneous outcome.

Make agile center freq 0 as part of every stop agile
scan. This ensures that a new frequency is mandated
as part of every agile scan.

Change-Id: I4531aa0636a62b918bace66098c2c287e72d55d3
CRs-Fixed: 2910449
2021-04-02 15:03:24 -07:00
Venkateswara Swamy Bandaru
11f4850bfd qcacmn: Initialization changes for 11be
EHT capapilities will be received as part of ext2 service ready message.
Update the structure as per firmware common header file and extract the
EHT capabilities field.

Change-Id: Id2dd170db4de588008742f95493d4d06a6431f1c
CRs-Fixed: 2857802
2021-04-01 06:11:30 -07:00
Lincoln Tran
b390122275 qcacmn: Drop ch avoid event if list is empty
Add check to drop the avoid channel list event if the range count is 0
since it would not affect the channel list anyways.
Also, add the rate limited debug print for the target_if module.

Change-Id: I176b9c09106cc0d7f5cfbc474912e4a48d633ff2
CRs-fixed: 2909614
2021-03-30 12:50:47 -07:00
Amruta Kulkarni
6c8858e6eb qcacld-3.0: Support roam sync indication in CM
Add change to support roam synch indication
in connection manager.

Change-Id: I06b23ae085a5a86caf4fe04fe5929b86d8d5c543
CRs-Fixed: 2901858
2021-03-24 09:47:46 -07:00
Shwetha G K
4ff5e4ef13 qcacmn: change get spectral handle to non-inline
Change the get_target_if_spectral_handle_from_pdev() api to
non-inline for code size reduction.

CRs-Fixed: 2896467
Change-Id: Icb92643a9c0d85a1b4328cd0c516d6d771877a4f
2021-03-22 09:31:56 -07:00
Jyoti Kumari
3971742914 qcacld-3.0: Check NULL value of wmi_handle
In target_if_register_mgmt_data_offload_event(), check NULL value of
wmi_handle before it's used by wmi_service_enabled()

Change-Id: Iea51c59770258fd10468bb439f559094b563851f
CRs-Fixed: 2900533
2021-03-22 04:54:49 -07:00
Abdul Muqtadeer Ahmed
673f45c7c5 qcacld-3.0: Add new WMI wakeup reason
Add the new WMI wakeup reason “WOW_REASON_FATAL_EVENT_WAKE".

Change-Id: I93b530f78f568fa88cb310c5d78cd950451fc441
CRs-Fixed: 2868523
2021-03-17 18:33:16 -07:00
Shiva Krishna Pittala
d710aaf1e4 qcacmn: Don't print the FFT report in Spectral report mode 0
target_if_dump_fft_report_gen3() function doesn't check if the FFT report
is present in the Spectral report. Add the report mode 0 check to avoid
printing FFT report when it is not there.

Change-Id: Ia825cd7927ec7ffa41473649d381c717b0ef26c9
CRs-Fixed: 2898904
2021-03-16 14:49:06 -07:00
Gururaj Pandurangi
08148f21fa qcacmn: Enable/Disable 6G edge channels ch2 and ch233
Enable lower 6G edge channel ch2 (5935MHz) for APL2 6G regdmn
using a service bit WMI_SERVICE_ENABLE_LOWER_6G_EDGE_CH_SUPP,
which is not enabled by default.
Also, disable upper 6G edge channel (7115MHz) using another
service bit WMI_SERVICE_DISABLE_UPPER_6G_EDGE_CH_SUPP, that
is enabled by default.

Change-Id: Ia7cb7f7d3165375178adbe70adb19b8671496b6d
CRs-Fixed: 2885623
2021-03-12 02:52:25 -08:00
Abdul Muqtadeer Ahmed
4810798754 qcacld-3.0: Add a new feature to support forced dtim
Add vendor command interface/feature through which the user
or vendor can set the dtim count as per their requirement.

Change-Id: I26010948c4ed7e3c49bfe0453119235d4f438c6f
CRs-Fixed: 2894349
2021-03-11 11:58:42 -08:00
sheenam monga
044bbd5a53 qcacld-3.0: Add support for big data stats
Add support of big data stats in the cpstats
component.

Change-Id: I3642035d9f25237c80b529da78c51bb1ccf0035a
CRs-Fixed: 2868949
2021-03-11 09:48:12 -08:00
Priyadarshnee Srinivasan
d617a3a77f qcacmn: FW-Host Handshake for REG_CHAN_LIST_CC_EVENT
In order to support different power levels of 6G AP and client,
the channel list event from FW namely "REG_CHAN_LIST_CC_EVENTID"
is modified to add few parameters specific to 6GHZ devices.
Hence the existing event is replaced by REG_CHAN_LIST_CC_EVENT_EXT for
all 2G/5G/6G pdevs in FW. Therefore, after the service ready event, FW
sends the channel list for the configured country/regdomain via
REG_CHAN_LIST_CC_EVENT_EXT. This mandates that all host software need
to have the processing capability of REG_CHAN_LIST_CC_EVENT_EXT to bring
up the AP.

As there can be host software which has not yet implemented the
version of "REG_CHAN_LIST_CC_EVENT_EXT", backward compatibility is lost
if "ONLY REG_CHAN_LIST_CC_EVENT_EXT" is sent by FW.
Hence a 3 way handshake between host and FW is established.

1. FW advertises its capability of processing REG_CHAN_LIST_CC_EVENT_EXT
id via wmi service bit 'wmi_service_reg_cc_ext_event_support'.
2. If the host is capable of processing the "REG_CHAN_LIST_CC_EVENT_EXT"
event id (which is done based on registration of this event), host
sends the capability in WMI_INIT_CMDID setting a bit in host_service_flags.
3. Based on host capability advertised in WMI_INIT_CMDID, FW decides to
send the old event ("REG_CHAN_LIST_CC_EVENTID") or the new event
("REG_CHAN_LIST_CC_EVENT_EXT").
4. If there is no flag indicated by host to FW in WMI_INIT_CMDID, FW
by default sends the old event ("REG_CHAN_LIST_CC_EVENTID").

CRs-Fixed: 2876360
Change-Id: Ibe95f414ad9fff0e5641bcc6e60450ef9afe245b
2021-03-11 19:43:58 +05:30
Aditya Kodukula
7679b0651a qcacmn: Add params to the wlan_minidump_remove function
For the minidump feature, the wlan_minidump_remove function
definition is modified. So, update the function parameters
accordingly at all instances of the wlan_minidump_remove function.

Change-Id: I5a346f6cdf423ece02fb08d68e4422251af54876
CRs-Fixed: 2860435
2021-03-09 21:07:01 -08:00
Chaoli Zhou
bbccf20880 qcacmn: Correct the WMI command id for CFR
Fix the wmi command id is not right issue for
enable/disable periodic peer CFR capture if
ENABLE_HOST_TO_TARGET_CONVERSION not enabled.

Change-Id: I82ba6c781f67aa73f373a0a914838f482d86f165
CRs-Fixed: 2865389
2021-03-04 21:23:52 -08:00
Amruta Kulkarni
dda800be9d qcacld-3.0: Add new files for CM roaming
New files added for handling FW based roaming
in connection manager.

Change-Id: Ibb5b74475699719cb901bf067f5d498ad16e0a60
CRs-Fixed: 2864490
2021-03-02 14:22:26 -08:00
Shashikala Prabhu
6dac66bcbf qcacmn: Fix compilation error when DIRECT_BUF_RX is disabled
Fix compilation errors when DIRECT_BUF_RX_ENABLE compile-time flag is
disabled.

Change-Id: I2bbce6eb8838ecab02b6462c1c0ee28877accdb4
CRs-Fixed: 2883310
2021-03-02 05:36:48 -08:00
gaurank kathpalia
0acdec5764 qcacld-3.0: Refactor the roaming code
Refactor the roaming code by moving to component.

Change-Id: I566967482ec3eb0d15d3ff357855b58b9579d3cf
CRs-Fixed: 2887126
2021-02-26 11:50:20 -08:00
Edayilliam Jayadev
4283a1ae62 qcacmn: Reset 160 MHz state machine on error
Reset the 160 MHz state machine on any error
while processing a Spectral report.

CRs-fixed: 2879610
Change-Id: I982d12edc5c9aa24b0255fbcb932d198a6da514b
2021-02-25 07:36:07 -08:00
Harsh Kumar Bijlani
725ee94dca qcacmn: Fix wifistats issue for WIN
For WIN, a specific raw event handler is used for handling
WMI_CTRL_PATH_STATS_EVENTID received from FW.

As a part of control path stats infrastructure, event handler
for WMI_CTRL_PATH_STATS_EVENTID is different and this results
in wifistats functionality break for WIN side.

Make changes to use WIN specific event handler.

Change-Id: I2ac677c3ca55cd783734d1137c39b8ee1d5dcbf5
CRs-Fixed: 2878466
2021-02-18 07:47:10 -08:00
Amruta Kulkarni
d63708694d qcacld-3.0: Support roam invoke request in connection manager
Add change to support roam invoke request in connection manager

Change-Id: I87bd39263c7c210fa87250aca59ef5f2f89d4c67
CRs-Fixed: 2869211
2021-02-18 03:12:04 -08:00
Gururaj Pandurangi
901a17b4ae qcacmn: Add service bit to support backward compatibility
The host will send TPC power to FW via the new WMI cmd
WMI_VDEV_SET_TPC_POWER_CMDID going forward instead of
WMI_VDEV_PARAM_TX_PWRLIMIT to accommodate 6GHz channels.
But, to support backward compatibility for New Host+old FW
the TPC power will be sent to FW via legacy WMI cmds
WMI_VDEV_SET_PARAM_CMDID (during initial connection) or
WMI_VDEV_PARAM_TX_PWRLIMIT (power value change during RRM
req/bcn processing from connected AP) with the help of a
service bit WMI_SERVICE_EXT_TPC_REG_SUPPORT.

Change-Id: I22e11ff847cd384fac8ea0061e5df42cea0c8de8
CRs-Fixed: 2874245
2021-02-16 23:52:04 -08:00
Dundi Raviteja
8185c65da1 qcacld-3.0: Reduce stack frame size while extracting pdev stats
Reduce stack frame size of target_if_cp_stats_extract_pdev_stats()
by allocating dynamic memory to wmi_host_pdev_stats.

Change-Id: I83a73f2973b54fbc28399c106ea52a0b6c1988f3
CRs-Fixed: 2868500
2021-02-06 12:46:55 -08:00
Dundi Raviteja
4ccdbd440b qcacld-3.0: Reduce stack frame size while extracting vdev stats
Reduce stack frame size of
target_if_cp_stats_extract_vdev_summary_stats()
by allocating dynamic memory to wmi_host_vdev_stats.

Change-Id: I3922f2b61bcde5d5aa90e71f55a884075742147b
CRs-Fixed: 2868487
2021-02-06 10:42:46 -08:00
Dundi Raviteja
25e1415c18 qcacld-3.0: Reduce stack frame size while handling mc_cp_stats
Reduce stack frame size of target_if_mc_cp_stats_stats_event_handler()
by allocating dynamic memory to struct stats_event.

Change-Id: Ieaf99efece75080fe7ff6cf2cf70858ca5f8740f
CRs-Fixed: 2868456
2021-02-06 10:42:41 -08:00
Dundi Raviteja
20cc358e10 qcacld-3.0: Reduce stack frame size while clearing mc filter
Reduce stack frame size of target_if_pmo_clear_multiple_mc_filter_req()
by allocating dynamic memory to struct pmo_mcast_filter_params.

Change-Id: I0078ef0c84b33de209551dccd91aff70699eca80
CRs-Fixed: 2864938
2021-02-01 09:59:20 -08:00
Dundi Raviteja
daa9251afe qcacld-3.0: Reduce stack frame size while setting multiple mc filter
Reduce stack frame size of target_if_pmo_set_multiple_mc_filter_req()
by allocating dynamic memory to struct pmo_mcast_filter_params.

Change-Id: Ib1ffb61aae30eda42340856a04cbbbf5a8162935
CRs-Fixed: 2864893
2021-02-01 09:59:12 -08:00
Karthik Kantamneni
93f7aa1869 qcacmn: Fix DBR srng undefined address passed to F.W
DBR srng details are not sent properly to F.W via WMI_DMA_CFG_REQ
msg, this leads to F.W accessing undefined address.
Fix this by passing DBR srng details properly.

Change-Id: I15b393ad809dc0757e3637558f0bddd05530149d
CRs-Fixed: 2861621
2021-01-25 17:00:49 -08:00
Rajasekaran Kalidoss
89296baefb qcacmn: Add handlers for wmi_pdev_cp_fwstats_eventid
Add common target_if event handler for wmi_pdev_cp_fwstats_eventid
from the control path stats infrastructure of firmware and register
with the wmi.

CRs-Fixed: 2856380
Change-Id: Ia16e34c4dc1e12b817258c5e6d617a8cb560cf5b
2021-01-22 07:36:34 -08:00
Edayilliam Jayadev
6ed59fa1e3 qcacmn: Initialize agile Spectral capability for legacy targets
TLV targets advertises the agile Spectral capability in the
chain mask table of extended service ready event.
For legacy targets, mac phy capabilities, which holds the
chain mask table is null. This leads to a load time crash
for some legacy platforms. To fix this, initialize
agile Spectral as disabled for the targets which doesn't
support extended service ready message.

CRs-Fixed: 2854348
Change-Id: I09a64259b31e3e5eb0441f35dbb9451dec001780
2021-01-22 05:31:40 -08:00
Shiva Krishna Pittala
840f5fa192 qcacmn: Modification of fields in version 2 of Spectral reports
Following fields in the Spectral FFT report have been modified in the HW
in the version 2 of the Spectral report, reflect the same at the Host.
	- fft_radar_check
	- fft_peak_sidx
	- fft_chn_idx
	- fft_base_pwr_db
	- fft_total_gain_db

CRs-Fixed: 2855909
Change-Id: I8dd190cae8da260d1fb639342ca980285bfd3d0e
2021-01-22 01:33:11 -08:00
Jeevan Kukkalli
e1eacc4734 qcacmn: Add peer ext stats enable/disable tx ops
Add function to send peer extended stats enable/disable
command to target.

Change-Id: I82e1a96090f0984f6b6864dbeed9120f3b2ba70a
2021-01-19 01:52:14 -08:00
Pavankumar Nandeshwar
ff041723c7 qcacmn: change qcn9100 to qcn6122 in target_if
Change the name of target type qcn9100
to qcn6122 target_if.

Change-Id: Icfdcd2c8d872b5305687884b7d9186fb85274bd4
CRs-Fixed: 2849577
2021-01-18 21:45:42 -08:00
gaurank kathpalia
6b02db7d1f qcacld-3.0: Move code from CSR to new RSO structs
Move code from CSR to roam scan offload to use new converged
structures.

Change-Id: Iaef2e4b08853f559a2da2c26b774ea29ecde04aa
CRs-Fixed: 2857072
2021-01-18 21:45:16 -08:00
Adwait Nayak
2a0231fa54 qcacmn: Add dma length sanity check
Add sanity check for CFR payload length in case of QCA5018
before relaying CFR data buffers to user space.

Change-Id: I81f37bebd3b9372606906fc87ce8ee90fe4809a1
CRs-Fixed: 2855173
2021-01-16 12:57:35 -08:00
Adwait Nayak
c2a2145497 qcacmn: Modify number of buffers in Relay FS
Bring down number of sub buffers in Relay FS from
470 to 255. Earlier 470 buffers were introduced to
maintain 2MB uniformity across platform for relayfs.
But, as IPQ5018 is 512M platform and having 255
buffers is sufficient enough to hold CFR data,
we have brought down the number to 255.

This saves 1MB memory.

Change-Id: Ibbd6926c6712b871e8174e44bd24abf703a8e736
CRs-Fixed: 2855173
2021-01-16 12:57:29 -08:00
Lincoln Tran
323288debd qcacmn: Expose WMI command in tgt_if
Expose the API to send WMI_SET_TPC_POWER_CMDID within the target_if
module. Register the callback under tx_ops.

Change-Id: I1d075df717cff997e7ac85884fe587ed298cbb28
CRs-fixed: 2849695
2021-01-15 14:38:44 -08:00
Rajasekaran Kalidoss
f856de1fb7 qcacld-3.0: Register cp stats legacy ops
Support has been added in common code to register both
common tx ops and MC/WIN specific tx ops. Add support to
register and tx ops for MC specific stats.

Change-Id: I4e5263e4685a707008ec3c5e96f50c707b071fe9
CRs-Fixed: 2851256
2021-01-13 10:17:12 -08:00
Lincoln Tran
c8d397e920 qcacmn: Implement chan_list processing for new WMI event
Add functions to handle the new WMI event,
WMI_REG_CHAN_LIST_CC_EXT_EVENTID. This includes processing new
data regarding standard power, low power indoor, and very low
power Clients and APs.

Process the regulatory rules from FW to populate the new 6G
channel lists. Fill in the current channel list with the
correct 6G master channel list. Copy other information from
the event into the regulatory private objects as needed.

Change-Id: I0c2001d809e4f0b292bac866780faa2850b1a8b1
CRs-fixed: 2799403
2021-01-12 20:09:53 -08:00
Rajasekaran Kalidoss
caa1764721 qcacmn: Register cp stats legacy ops
Currently there is no support to register both common cp stats
ops and MC specific cp stats ops. Add support to register common
ops and MC/WIN specific cp stats ops.

Change-Id: Ibaee9da8b1ce3185161821f2be751d8bb4bf10e2
CRs-Fixed: 2851235
2021-01-12 17:44:42 -08:00
Deeksha Gupta
21ce9cf146 qcacmn: Prevent link down for SAP on non DFS channel
In SAP on non DFS channel, there are double votes for PCIe
link down and later if there is PCIe link up, this counter
sends D3 WoW case instead of D0 WoW case to firmware.

To fix this, In vdev restart case, if SAP is on non DFS
channel and previously it was on DFS channel then vote
for PCIe link down and if SAP is on DFS channel and
previously it was on non DFS channel then vote for PCIe
link up. Also, the PCIe link down should be needed if
vdev stop response is for DFS channel.

Change-Id: I817ffceb482091b8d9c5441d80abb43b7d0f866b
CRs-Fixed: 2849706
2021-01-09 01:36:51 -08:00
Shwetha G K
42a2faa714 qcacmn: Extract additional info to cfr metadata
Extract agc gain information, CFO & rx_start_ts from
rx status and cfr peer capture event to CFR host metadata

Change-Id: Id896554f1da6920bd3eeced1298b07857d41a68b
2021-01-07 08:17:56 -08:00
Edayilliam Jayadev
9b98e19b51 qcacmn: Add Spectral disabled checks in some APIs
Add Spectral feature disable checks in some APIs
used by other modules.

CRs-Fixed: 2845252
Change-Id: I74d66da2aa85ab0f116ad1a6d2e859f3ee8eeeb9
2020-12-30 07:06:41 -08:00
Edayilliam Jayadev
445c0a42c3 qcacmn: Fix return values of Spectral target APIs
Return type of "target_if_is_spectral_active" and
"target_if_is_spectral_enabled" is bool. Wrong return values
are send for this APIs in case of errors.

CRs-Fixed: 2845250
Change-Id: I2344676a1ada51e041bb5f7acac8aa22847bee5c
2020-12-30 07:06:33 -08:00
Edayilliam Jayadev
80a12b81ed qcacmn: Skip init/deinit/config if Spectral is disabled
If Spectral scan is disabled(agile and normal mode disabled)
skip init/deinit of Spectral module. Also avoid user requests
to configure/start/stop scan. If either agile or normal mode
is disabled block user requests for that mode alone.

CRs-Fixed: 2840335
Change-Id: I81148e5580fe4bf991b97cd086c8e3a9ca78e77d
2020-12-30 07:06:29 -08:00
Edayilliam Jayadev
b3affda43a qcacmn: Add APIs to check Spectral feature is disabled
Add utility APIs to check Spectral scan is disabled for
a given pdev/psoc/mode.

CRs-Fixed: 2840317
Change-Id: I6820cfc056c697434a138ddf9d8d93b5796a4722
2020-12-30 07:06:24 -08:00
Edayilliam Jayadev
3e679f9176 qcacmn: Add APIs to init Spectral feature caps in the upper layer
Add APIs to init Spectral feature caps in the upper layer of the
Spectral module.

CRs-Fixed: 2840249
Change-Id: Idfb34a9eec3a66c6d193be7bb828eeec30548ae7
2020-12-30 07:06:20 -08:00
Edayilliam Jayadev
19aaca7ff9 qcacmn: Add target if APIs to initialize spectral feature caps
Add target if APIs to initialize normal and agile Spectral
feature caps for a pdev.

CRs-Fixed: 2840247
Change-Id: I6c5385c2050007a5ff3f668ab3d6176328294549
2020-12-30 07:06:16 -08:00
Edayilliam Jayadev
dac2af9a3b qcacmn: Add APIs to get Spectral scan capability
Add APIs to check the agile and normal Spectral scan
capability of the target. This information is derived from
the advertisements from halphy via WMI events.

CRs-Fixed: 2840227
Change-Id: I2aae79b3342d8d74a1f4c00e813cae843a71106a
2020-12-30 07:06:12 -08:00
Edayilliam Jayadev
b3e677f722 qcacmn: Add WMI API to Spectral module's interface
Add WMI API "wmi_service_enabled" to Spectral module's
interface.

CRs-Fixed: 2840141
Change-Id: I2cb6363fd37c858f2a84ba1904c89033720d1a0a
2020-12-30 07:06:04 -08:00
Shiva Krishna Pittala
8f4dceb4bc qcacmn: Direct Buf Rx changes to support big-endain platform
Use the hal_srng APIs that handle byte-order conversion of ring pointers
for big-endian platforms.

Change-Id: I2664636d5d2a1abfd7b643ea4c4d63d328a9880f
CRs-Fixed: 2845047
2020-12-28 13:07:06 -08:00
Nandha Kishore Easwaran
6547f0f671 qcacmn: Swap bytes of key_data in big endian platform
Swap each word of key_data before sending key install command.
This is needed since copy engine swap is enabled for big endian platform
and key needs to be plumbed in network byte order for decoding to happen
correctly.

Handle the swap in wmi layer since all other big endian conversions are
handled in this layer.

Change-Id: Ia6f0d579f3edaf32193c353ea2fe35cc40f55399
2020-12-28 08:56:09 -08:00
Shiva Krishna Pittala
ee5f45a176 qcacmn: Read the Direct Buf Rx tail pointer in the Host order
Direct Buf Rx has a source ring to communicate with the target.
The target updates its tail pointer in little-endian format and this update
doesn't go through any byte-order conversion at the target. On a big-endian
Host platform, this tail pointer will be read in reverse order of bytes.
To fix this, convert the tail pointer to the Host order before using it.

Change-Id: Ibcaf3d7507910ea81eeb895772241ab9861ee45a
CRs-Fixed: 2843259
2020-12-22 10:44:16 -08:00
Shashikala Prabhu
8c3705336e qcacmn: Add support to send FTM responder/initiator cmd to target
Add support to send FTM responder/initiator support to target.

Change-Id: I6649d90941a7448ff1901a3f1194d8d0620481cc
CRs-Fixed: 2781144
2020-12-21 20:55:11 -08:00
Shiva Krishna Pittala
8f049e633b qcacmn: Spectral changes to support big-endian Host platforms
WLAN chip components are little-endian based. When such a chip is attached
to a big-endian Host platform, there will be a mismatch in the order of
bytes for the data that is transferred between the Host and target.

Spectral HW module transfers the Spectral report directly to the Host DDR.
This transfer doesn't go through any byte-order conversion at the HW side.
So, to avoid invalid reads at the Host side on a big-endian platform,
convert the Spectral report to the Host byte-order before using it.

Change-Id: I742537f3a95ffca2e12b83535e83e2870ad06b10
CRs-Fixed: 2838371
2020-12-18 13:35:46 -08:00
Saket Jha
118b44a4df qcacld-3.0: Request fw stats for monitor mode
Periodically request pdev stats from FW to receive channel noise floor
information after monitor vdev has been brought up, based on the band
currently being sniffed. Use the band information as a secondary parameter
when sending periodic request to fw so a single noise floor value is sent
to host. Pass this noise floor information to dp_pdev to be populated in
radiotap header.

Change-Id: I488e4985392cb646ffdee914359fa995dbeb025e
CRs-Fixed: 2833458
2020-12-17 19:38:27 -08:00
Bapiraju Alla
f77229c562 qcacld-3.0: 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: I1b2b6a60c5d8c7ec4375d328e58a66d749794e3f
CRs-Fixed: 2835903
2020-12-17 13:39:50 -08:00
Pavankumar Nandeshwar
37a9d7cf5c qcacmn: add CFR changes for QCN9100
Add CFR related changes for target type
QCN9100

Change-Id: I44f7a521fb38f883b6e1a6a71e39805a1da69687
2020-12-17 03:05:28 -08:00
suresh velagapudi
e3d67b3edc qcacmn: Sanity Check to avoid NULL pointer dereference
If module is not registered for dbr in any platform it
results into  Null pointer dereference.

Added Sanity check to avoid Null pointer dereference for
cfg80211tool wifi0 g_dbr_ring_status.

Change-Id: I9e68dfc9d58d70693184f53913cd7f2324d788c1
2020-12-09 10:55:31 -08:00
Shiva Krishna Pittala
53b3234b8f qcacmn: Read only the useful 2 bytes of an FFT bin in pack-mode 0
FFT bin is 10-bit wide in Spectral pack-modes 0 and 1. However, HW packs
just one FFT bin in a 32-bit DWORD by adding extra padding bits in
pack-mode 0. Currently, the Host reads the entire 32-bit DWORD to figure
out the FFT bin value. Instead, read the only useful bytes i.e.,
least significant 2 bytes of a DWORD. This approach is efficient,
especially on a Host that implements a byte-swap mechanism on FFT bins on
a big-endian Host.
Also, while dumping FFT bins for debug purpose, print the first 2 bytes of
an FFT bin in pack-modes 0 and 1.

Change-Id: I20ca8c4905671e80251dca07f80ce17801b98f5c
CRs-Fixed: 2831530
2020-12-08 11:16:32 -08:00
Sheenam Monga
0e8f8132c2 qcacmn: Handle CSA_SWITCH_COUNT_STATUS_EVENTID
Currently, host decrements beacon switch count and sends
channel switch frame every time until count becomes 0 this
may introduce sync issue between fw and host.

To avoid sync issue csa switch count is offloaded to fw. fw
will send CSA_SWITCH_COUNT_STATUS_EVENTID once beacon count
becomes 0 and  host will send vdev restart once it recives
CSA_SWITCH_COUNT_STATUS_EVENTID.

Change-Id: I60238e8e83b56ca4c6490f9516d673d14ef9c323
CRs-Fixed: 2831356
2020-12-08 09:21:37 -08:00
Shiva Krishna Pittala
d78db319d7 qcacmn: Direct DMA changes for big endian Host
WLAN chip components are little-endian based. When such a chip is attached
to a big-endian Host platform, there will be a mismatch in the order of
bytes for the data that is transferred between the Host and target.

Direct DMA framework writes 64-bit values to its DMA ring entries.
These DMA ring entries are present in the shared memory between the Host
and the FW and the data transfer doesn't go through any copy engine.
So, to avoid invalid reads at the FW side on a big-endian platform, write
ring entries in little-endian format so that the FW reads them correctly.

Change-Id: I9c9189f914fdda335723c25fc05484487985447c
CRs-Fixed: 2828746
2020-12-07 07:06:43 -08:00
sheenam monga
0d42f3216a qcacmn: Read csa_beacon_template service
check csa_beacon_template service and set
WLAN_SOC_CEXT_CSA_OFFLOAD/25th bit of
soc_fw_ext_caps in psoc if service is
supported by fw.

Change-Id: I8dca74c805cc8696f261e0f791818bca579c80c8
CRs-Fixed: 2826451
2020-12-03 10:52:03 -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
Yu Wang
ca591b0db7 qcacmn: move component 'coex' to qcacld project
'coex' component is MCC specific, move to qcacld project.

CRs-Fixed: 2721763
Change-Id: I271301c28748f6b14afb59e105cc9f418e43a9c4
2020-11-24 22:51:16 -08:00
Liangwei Dong
aca91fd222 qcacld-3.0: Use serialize context for thermal event
Use WMI_RX_SERIALIZER_CTX context for thermal event handler.
The default context is tasklet, it may cause issue when interact
with OS interface.

Change-Id: I349412c2afee9a081f0d38704541f77b5e4569f4
CRs-Fixed: 2824461
2020-11-24 10:55:20 -08:00
wadesong
e2d233c757 qcacmn: Fix a KW issue in crypto set function
In function target_if_crypto_set_key(), array pn's size is 16,
while params.key_rsc_ctr's length is 8, so the length of src
buffer(params.key_rsc_ctr in this case) should be used when
copying data to dest buffer(pn).

Change-Id: Ifa9156963c3da0234dbf8755a4d1f7bf3b96d0ff
CRs-Fixed: 2822715
2020-11-21 02:20:23 -08:00
Amruta Kulkarni
59dda76f21 qcacld-3.0: Add support for STA + monitor mode
In mission mode, add support for virtual add/del monitor
mode interface. In addition to STA vdev, create and maintain
a new vdev for monitor interface.

Change-Id: I91ea8e56976cce92f9b1ae308d4bd0fb30815366
CRs-Fixed: 2818499
2020-11-19 22:45:53 -08:00
Yu Wang
d58a9e25ac qcacld-3.0: move component 'coex' to qcacld project
'coex' component is MCC specific, move to qcacld project.

CRs-Fixed: 2721758
Change-Id: Ic1769ddf7eab6a6acc96349c020a6f311cda6bff
2020-11-18 14:19:13 -08:00
Jhalak Naik
04188da78f qcacmn: Cap the FFT bin values to 255
FFT bin values can span 10 bits for HKv1, HKv2 and Pine.
This change is to cap the values to 8 bits for such case
on these platforms.

Change-Id: I144b00b1ed21a3281f79050bb1ab63bd857e47b1
CRs-Fixed: 2804192
2020-11-18 07:46:30 -08:00
Abdul Muqtadeer Ahmed
cf276ce34f qcacld-3.0: Add new WMI wakeup reason
Add the new WMI wakeup reason “WOW_REASON_LOCAL_DATA_UC_DROP".

Change-Id: Ibae5d98de8e63b03930837de8ce3062fef319718
CRs-Fixed: 2798184
2020-11-09 03:03:09 -08:00
Edayilliam Jayadev
f4001e93ea qcacmn: Remove host assert in Spectral Rx path
In Pine 160/165 MHz following are the expected sequence of events.
    1. Start scan WMI command
    2. FW param WMI event
    3. Direct DMA completion WMI events
If 3 and 2 happens in the reverse order (i.e., host receives a direct
DMA completion event before receiving a FW param WMI event), host assert
will be triggered.

This change removes the assert and drops the Spectral reports till
FW param WMI event is received.

CRs-Fixed: 2812403
Change-Id: I537d0077737baab8d3a8e90bdc4f9138690010bc
2020-11-06 22:50:52 -08:00
Srinivas Dasari
da54959f21 qcacmn: Get per channel scan config service capability
Firmware advertises the service capability bit
WMI_SERVICE_SCAN_CONFIG_PER_CHANNEL when it supports per channel
scan config flags. Get this and cache in psoc.

If firmware supports WMI_SERVICE_SCAN_CONFIG_PER_CHANNEL, it uses
the upper-12 bits(bit-20 to bit 32) of channel_list for flags and
lower 20-bits(bit-0 to bit-19) for frequency. If firmware doesn't
support it, then channel_list holds the frequency value only.
Fill the flags and frequency accordingly.

Change-Id: I88a6f29f61e1ecea75bc5574cadcbbfbb7f8b188
CRs-Fixed: 2806405
2020-11-05 16:12:54 -08:00
Arun Kumar Khandavalli
d62d1d7186 qcacmn: Add API to get/set target global mode
Add API to get/set the target global mode when the driver
is loaded (or) dynamically switched between modes

Change-Id: I65857ef57a17645da94301e26c0daddc30c5ad79
CRs-Fixed: 2809955
2020-11-05 01:20:50 -08:00
hqu
1f13684a61 qcacld-3.0: Remove old rso path code [PART 5]
Since new rso ROAM_OFFLOAD_V1 path is enabled, remove
the old rso path code for cm/wmi roam related files.

Change-Id: Iec350f032c3e037204f560199d4a6e258ac02688
CRs-Fixed: 2810145
2020-11-03 00:55:29 -08:00
Jianmin Zhu
509e0dcc99 qcacld-3.0: Fix roaming between different PMF option APs failure
Roaming between different PMF option APs has following issues:

1. Roaming between Optional -> Disabled -> Optional
When STA roam to optional, PMF is set to False from STA in reassoc
request and all management pkt not secured.

2. Roaming between Required -> Disabled -> Required
STA not able to find candidate AP when tried to roam to AP with PMF
Required.

Root cause: When LFR3 roam happens,  vdev_crypto_params will be reset
including rsn_caps 11w PMF, if new AP hasn't enabled PMF, vdev rsn_caps
11w PMF is disabled too, and  passed to F/W. Then F/W think DUT STA
doesn'tsupport PMF, then failed to roam to AP with PMF Required and
enabled.

Fix:
Get self-capability of 11w PMF from connected profile and pass to F/W in
WMI_ROAM_SCAN_MODE by wmi_fill_rso_tlvs after roaming.

Move target_if_cm_roam_fill_11w_params to csr_cm_roam_fill_11w_params,
put protocol part to csr connection manager.

Change-Id: I543799385ec8c0ec7afdf64e2310c24758305095
CRs-Fixed: 2807454
2020-11-03 00:55:25 -08:00
Balaganapathy Palanisamy
1ba65c35d7 qcacmn: Move the resource config command before init command
Move the resource configuration command after initializing
pdev wmi handle and just before wmi init command.

CRs-Fixed: 2801602
Change-Id: I3a476cbbccd5874c79cfa08f1252c728ebc9a5c6
2020-11-02 08:03:41 -08:00
Will Huang
ce6b6acd12 qcacld-3.0: Fix get sap connected sta info fcs counter always 0
Stats event from target might have several sub events, and some event
has no peer stats but have adv/ext2 peer stats.

Check ext/ext2 peer stats even no peer stats in
target_if_cp_stats_extract_peer_stats(). Fix copy adv stats size error
in tgt_mc_cp_stats_prepare_n_send_raw_station_stats(). Although
get_station_stats_cb and get_peer_stats_cb is union callbacks,
better to assign to get_station_stats_cb because it is for
TYPE_STATION_STATS.

Change-Id: I0bead0cbb8b549cc538ef4a7327f0a8303c90bd1
CRs-Fixed: 2801842
2020-10-29 04:53:52 -07:00
Adwait Nayak
b081974d4d qcacmn: Change return type to QDF_STATUS
Maintain harmony in return type as "QDF_STATUS"
for CFR related APIs.

CRs-Fixed: 2767660
Change-Id: Ie35c104d32452d01d3c05b5059ee1b1bfe535a58
2020-10-28 11:30:14 -07:00
Rakshith Suresh Patkar
4b8e53fb7a qcacmn: Remove QCN9100 from application of fft bin size adjust
fft bin size adjust parameter is no longer applicable for
QCN9100. Remove QCN9100 in the check for setting this paramenter.

Change-Id: Ibff3d2d618e20563add79e65e31a442d8d36ba61
CRs-Fixed: 2804120
2020-10-26 23:37:55 -07:00
Pavankumar Nandeshwar
403a1b89cd qcacmn: Add target type checks in spectral for QCN9100
Add target type checks in spectral for QCN9100
at required places

Change-Id: I21c6c2f3e33245540e754e018098dca9c1fc353f
2020-10-26 23:37:51 -07:00
Liangwei Dong
053e7fbe1f qcacld-3.0: Handle thermal stats event from target
Handle firmware thermal stats event and populate the thermal
information to upper layer with vendor command event.

Change-Id: I83286367ab542c08a205a7636f3d03189b0500e5
CRs-Fixed: 2786623
2020-10-23 10:03:04 -07:00
Gururaj Pandurangi
26e153f820 qcacld-3.0: Change return type to QDF_STATUS
Change return type of following APIs from int to QDF_STATUS.
wmi_unified_register_event()
wmi_unified_register_event_handler()
wmi_unified_register_raw_event_handler()
wmi_unified_unregister_event()
wmi_unified_unregister_event_handler()

Change-Id: I534b499edbcfec6eddea0e9ed48f9eb1a2e872c8
CRs-Fixed: 2791275
2020-10-23 07:56:41 -07:00
Abhinav Kumar
4d12626530 qcacld-3.0: Discard 5G candidates based on RSSI threshold
To discard 5G candidates based on RSSI threshold, Introduce
a new INI "min_rssi_for_2g_to_5g_roam" to configure the RSSI
for High RSSI Trigger.

Min: -120
Max: 0
Default: -70

Change-Id: If4545296ef1b53d18b8ae4abf12d450f5e690240
CRs-Fixed: 2789017
2020-10-20 17:21:29 -07:00
Min Liu
f33ad9d759 qcacld-3.0: API to report congestion
API to report congestion to userspace.

Change-Id: I324ae6701dace590daaa2c3f80412d6633cbf8f0
CRs-Fixed: 2766432
2020-10-13 23:18:32 -07:00
Chaoli Zhou
13fd5d9173 qcacld-3.0: Enable/Disable intrabss for Rome IPA
In the Rome IPA case, it need wlanhost side to
enble/disable intrabss by WMI_VDEV_PARAM_INTRA_BSS_FWD.
If set to 1, the ip data transfer between two wlan clients
should be:
wlan client1 -> wlan fw -> wlanhost -> wlan fw-> wlan client2.
If set to 0, the ip data transfer between two wlan cleints
should be:
wlan client1 -> wlan fw -> ipa -> wlan fw -> wlan clients2.

Change-Id: I105ddbdb58f2cd01bdf94521bd7934508889de5d
2020-10-13 04:13:15 -07:00
Wu Gao
9471529a96 qcacmn: Don't reset vdev id if stop spectral scan
Host gets spectral scan data after stopped spectral scan, then it
can't find out current vdev since vdev id is reset when stopping
spectral scan.

Change-Id: I082b784e998a7600c7f8ef14bf67b790942f3a5f
CRs-Fixed: 2779397
2020-10-11 05:06:16 -07:00
Deeksha Gupta
01487928b4 qcacld-3.0: Enable the Partial scan for roam triggers
Currently the roam scan scheme for each trigger is hardcoded to
either full scan or partial scan followed by full scan. Based on
the new requirement for home scenario,the user space configures
roam scan scheme for various triggers. Add support to send scan
scheme type for indvidual roam triggers enabled from userspace.
The default value of roam scan scheme can be modifed for
below roam triggers:
WMI_ROAM_TRIGGER_REASON_PER,WMI_ROAM_TRIGGER_REASON_BMISS,
WMI_ROAM_TRIGGER_REASON_LOW_RSSI,WMI_ROAM_TRIGGER_REASON_BSS_LOAD,
WMI_ROAM_TRIGGER_REASON_BTM

Change-Id: If8b185897b813afc44af362d31172705ea4d7b5c
CRs-Fixed: 2785233
2020-10-09 06:47:17 -07:00
Chaoli Zhou
eb134979c1 qcacmn: Add and enable GPIO Component
Add the common GPIO component code for MCC and WIN

Change-Id: Id93629856d42afc433844b568deb2fa63a5b67e6
2020-10-08 15:33:59 -07:00
Visweswara Tanuku
df74860811 qcacmn: Configure TWT AP pdev count for QCA6490
QCA6490 expects twt_ap_pdev_count 2, to bring up twt sap on 2g.
Currently twt_ap_pdev_count is derived from num of radios and is
1 in case of MCC.
Configure twt_ap_pdev_count value equal to number of phy
advertised by firmware in wmi service ready ext event, configure
under flag WLAN_TWT_AP_PDEV_COUNT_NUM_PHY if defined in kbuild

Change-Id: Ib3fa81d140b473daa253e32cde2e11aad1b78b4d
CRs-Fixed: 2786512
2020-10-06 12:03:18 -07:00
Abhishek Ambure
8c33aa9fb8 qcacld-3.0: Add support to send wfa test config to FW
User sends wfa test configs to host using vendor command
QCA_NL80211_VENDOR_SUBCMD_WIFI_TEST_CONFIGURATION. Host parses the
vendor command and sends wfa test configs to FW using WMI command
i.e. WMI_WFA_CONFIG_CMDID

Change-Id: I5aa0bc8b0a0064828b48368e47d53a5ad5e7ff2f
CRs-Fixed: 2772013
2020-10-06 04:10:51 -07:00
gaurank kathpalia
d22c681cb4 qcacld-3.0: Add vdev id in RSO stop commands
Add vdev id in RSO stop commands to make sure that command is sent
for proper vdev. Also add vdev id in all RSO commands logs

Change-Id: Iefa1e8ba177a64e141726ebaef15b250446a0af2
CRs-Fixed: 2789615
2020-10-01 23:58:26 -07:00
Shwetha G K
bc3e92d1d6 qcacmn: Print oneshot/periodic CFR failure stats
Print oneshot/periodic CFR failure stats as well during CFR stop

Change-Id: Id81f0b79fd59e11c8170855aded88af7870162b3
2020-09-28 03:35:03 -07:00
Srinivas Girigowda
c2d762bccf qcacld-3.0: components: Remove logs for qdf_mem_malloc() checks
qdf_mem_malloc() function already takes care of logging the
caller function name and line number in case of any allocation error.
Hence there is no need to add the error log again.

Getting rid of these unnecessary logs reduces driver memory footprint.

Change-Id: If0b9425f82f9ed793c7639c0ed09eb1f868b6d5c
CRs-Fixed: 2781932
2020-09-25 12:59:42 -07:00
hqu
d83cd73596 qcacld-3.0: Send roam scan_mode/deauth/idle/trigger when rso enabled
In the process of rso update config, need to send roam
scan_mode/deauth/idle/trigger commands when rso enabled.

Another fix is to call csr_cm_roam_scan_offload_fill_rso_configs()
with ROAM_SCAN_OFFLOAD_STOP in wlan_cm_roam_fill_stop_req().

Change-Id: Ibcc2ab5d7da1bf838b386e0e1e486cd43072225a
CRs-Fixed: 2779549
2020-09-22 07:59:17 -07:00
Naman Padhiar
e7a325ffee qcacld-3.0: Send HOST wake up to FW over QMI
As part of WOW feature in WCN6750, send HOST wake up
to FW over QMI instead of WMI. To send HOST wake, add
PLD layer and call platform driver API to send QMI
EXIT_POWER_SAVE to FW.
When FW receive EXIT_POWER_SAVE QMI, it will implicitly
consider that it also received HOST_WAKEUP_FROM_SLEEP
and send ACK for it through CE2.

Change-Id: Ia0a3f4c15662f9ee58649f5c6de965f65aeafe32
CRs-Fixed: 2779370
2020-09-21 16:55:38 -07:00
Edayilliam Jayadev
8c77df3b7a qcacmn: Fix synchronisation between process context and tasklet
Spectral parameter state information is accessed in both
process context and tasklet context. Currently
qdf_spin_lock/qdf_spin_unlock is used to protect these data structures.
This can lead to deadlock in the scenario where the process holding the
lock gets preempted by the tasklet. To avoid this use
qdf_spin_lock_bh/qdf_spin_unlock_bh.

CRs-Fixed: 2776902
Change-Id: I6d188e55d5066241b5f38a655f4a587c9edb0b8b
2020-09-18 10:38:10 -07:00
Hariharan Basuthkar
547c60d7d7 qcacmn: Change return type to QDF_STATUS
wmi_unified_register_event has a return type of QDF_STATUS.
Handle the same return type in the following callers:

1. target_if_dfs_reg_ocac_event
2. target_if_dfs_reg_offload_events
3. target_if_reg_phyerr_events_dfs2

Change-Id: I622f6f6c4ff3b428a6407b6526e823083cc1fd8a
CRs-Fixed: 2767507
2020-09-17 18:34:10 -07:00
Manikanta Pubbisetty
b36165ae23 qcacmn: export CMEM FST firmware capability to DP
Firmware advertizes its support to place FST in CMEM,
export this capability to DP.

Change-Id: I265246bcfd38a36e34c4ede66e117a92bb185032
CRs-Fixed: 2772238
2020-09-17 10:18:34 -07:00
Alok Singh
60e5004ace qcacmn: Change return type to QDF_STATUS
wmi_unified_register_event return QDF_STATUS
Handle same return type in caller function

CRs-Fixed: 2764185
Change-Id: I29fd5e645c7b43c74e28494c83a6f7d460165e2e
2020-09-15 18:24:56 -07:00
Alok Singh
8ae5bcc124 qcacmn: Change return type to QDF_STATUS
wmi_unified_register_event return QDF_STATUS
Handle same return type in caller function

CRs-Fixed: 2764185
Change-Id: If77efc6a5b451bf2cf4acb59d5a2126ce486f02f
2020-09-15 18:24:52 -07:00
Alok Singh
45298ac99f qcacmn: Change return type to QDF_STATUS
wmi_unified_register_event return QDF_STATUS
Handle same return type in caller function

CRs-Fixed: 2764185
Change-Id: Ia6d1781f2bf1eea85d4af357e37a00b1f78e264e
2020-09-15 18:24:49 -07:00
Alok Singh
68874e3c6b qcacmn: Change return type to QDF_STATUS
wmi_unified_register_event return QDF_STATUS
Handle same return type in caller function

CRs-Fixed: 2764185
Change-Id: I18c687ad0564ec70e28cf1f33f26501dda6ee5c5
2020-09-15 18:24:45 -07:00
Alok Singh
54aae4d5e6 qcacmn: Change return type to QDF_STATUS
wmi_unified_register_event return QDF_STATUS
Handle same return type in caller function

CRs-Fixed: 2764185
Change-Id: I1dc098793e1df658666343d4293fe3f1c02daf34
2020-09-15 18:24:42 -07:00
Alok Singh
43932952ca qcacmn: Change return type to QDF_STATUS
wmi_unified_register_event return QDF_STATUS
Handle same return type in caller function

CRs-Fixed: 2764185
Change-Id: Icfa7946a447f3cfe8c6ce933a618e8dbb67bd6a0
2020-09-15 18:24:39 -07:00
Alok Sing
40502e26b4 qcacmn: Change return type to QDF_STATUS
wmi_unified_register_event return QDF_STATUS
Handle same return type in caller function

CRs-Fixed: 2764185
Change-Id: I87b1e6ee5e06e4e6af81395d977595335fe0bc5c
2020-09-15 18:24:35 -07:00
Abhishek Ambure
280444688d qcacld-3.0: Add support to get pmf bcn protect stats
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. Host extracts PMF beacon protection stats from wmi_update_stats_id
event. Host adds PMF beacon protection stats in the response of vendor
command QCA_NL80211_VENDOR_SUBCMD_GET_STA_INFO for STA mode.

Change-Id: Ib3cb06e03dbccdb9fa1782d414ed734bd97aa309
CRs-Fixed: 2705236
2020-09-12 01:59:34 -07:00
hqu
20f0e2e990 qcacld-3.0: Add additional debug logs for rso commands
Add debug logs on the sending WMI_ROAM_SCAN_RSSI_THRESHOLD
/WMI_ROAM_FILTER_CMDID/WMI_ROAM_BTM_CONFIG_CMDID
/WMI_11K_OFFLOAD_REPORT_CMDID commands path.

If mawc roaming is not supported by firmware, don't send
WMI_ROAM_CONFIGURE_MAWC_CMDID command.

Add rssi reject AP list to the roam params process in function
csr_cm_roam_scan_filter().

Change-Id: I89e6dcac801e552877f7e918d1179dfa3466857a
CRs-Fixed: 2775101
2020-09-11 23:39:30 -07:00
Min Liu
b0d29c4764 qcacmn: Add NULL pointer check for reg_rx_ops
Add NULL pointer check for reg_rx_ops of regulatory component.

Change-Id: If0917361f900d299fa9da519449781459c49ad17
CRs-Fixed: 2773937
2020-09-11 13:55:46 -07:00
Jianmin Zhu
b2589333fe qcacld-3.0: Add 3 ini for data rssi check when roaming
3 ini:
roam_data_rssi_threshold_triggers
roam_data_rssi_threshold
rx_data_inactivity_time
If there's rx activity during latest rx_data_inactivity_time
and avg of data_rssi is better than roam_data_rssi_threshold, then
suppress roaming triggered by roam_data_rssi_threshold_triggers: low
RSSI or bg scan.

Change-Id: I5b41c4119e61392b50e52ab8ccb8650e5758f3b3
CRs-Fixed: 2768053
2020-09-07 03:17:49 -07:00
Pragaspathi Thilagaraj
7ab7d7e665 qcacld-3.0: Add changes to send WMI_CHAN_LIST_CMD in connection mgr
Add changes to send WMI_CHAN_LIST_CMD in connection mgr

Change-Id: I79f96c400314be4e8a0b1aad5ecfe04e638d552d
CRs-Fixed: 2768812
2020-09-03 19:27:30 -07:00
Srinivas Girigowda
6182feee60 qcacld-3.0: Remove redundant __func__ from the logs
The logging macros implicitly takes care of embedding function name
in the log, hence there is no need to include __func__ again.
Getting rid of redundant __func__ reduces driver memory footprint.

Change-Id: Idf4685539991f65205f19b27551cef699230c82e
CRs-Fixed: 2768575
2020-09-03 19:27:18 -07:00
Edayilliam Jayadev
8afea1031d qcacmn: Stop finite Spectral scan internally in host
When user programs a non-zero scan count(say N), after receiving  N
samples Spectral scan is supposed to be stopped. This change keeps track
of number of Spectral reports received from target and stops the
Spectral scan when programmed number of samples arrives at host.

CRS-Fixed: 2764935
Change-Id: Ibea0eeece4577fd6e0da302716869b05c900f917
2020-09-03 05:58:03 -07:00
Debasis Das
ec3e25bf03 qcacmn: Fix array index out of bounds
The 2nd argument passed to the function is_primaryseg_expected
is used to index the array spectral->rparams.fragmentation_160 which
is of size 2.If the value of the argument is greater than or equal
to 2, the indexing will lead to array-out-of-bounds access.
The fix is adding the relevant validation check.

Change-Id: Iccf98b06c0546ad11ec67e93e14183214100107f
2020-09-02 08:48:31 -07:00
Pragaspathi Thilagaraj
c327b9ad9a qcacld-3.0: Add support for roam scan mode command in connection mgr
Add changes to send roam scan mode over RSO start/stop/update_cfg
from connection manager. Update the roaming params and roam scan
params to new structure.

Refine send_roam_scan_offload_mode_cmd_tlv().

Change-Id: I6adce2e8a24ece93a079032d0e66760393fcdccd
CRs-Fixed: 2766023
2020-09-01 18:14:21 -07:00
Pavankumar Nandeshwar
42c974a68d qcacmn: Target_if changes for QCN9100 bringup
Initial changes for bring up of QCN9100 in
target_if layer

Change-Id: I216cb52001b6e0c87a1c4b45990aad0ea83b4933
2020-09-01 01:49:54 -07:00
hqu
9d7fecdacc qcacld-3.0: Move rso related process to connection manager [PART 8]
Move below two changes from legacy to connection manager:
'Change-Id: If3bb344ec7058d4149d0064975d7c91f213fd105',
'Change-Id: I39a84d06b9c696179da1b854985a23b874a399c5'

Change-Id: I33921497d966f08a0ca476a373cfe6527888ca39
CRs-Fixed: 2765469
2020-08-29 12:24:56 +05:30
gaurank kathpalia
f1e4cc9cfe qcacld-3.0: Add RSO logic to send roam trigger from target if
Add RSO logic to send roam trigger from target if along with
some optimization to move old logic in ROAM_OFFLOAD_V1.

Change-Id: I38e7fb4f8873328097df7e3a25d6c709f8d69b33
CRs-Fixed: 2765155
2020-08-28 23:31:08 -07:00
Srinivas Pitla
bf0f1c90b3 qcacmn: Dynamic Tx VDEV config
This change allow Tx VDEV of MBSS mode to configured
dynamically by reset the VDEVs.

This change includes FW service bit parsing, checking
VDEV state of all VDEVs, sending MBSS information in
VDEV start command

Change-Id: I46b13629bd1c07be86b408d72c2967642ce8542e
CRs-Fixed: 2759229
2020-08-26 23:57:44 -07:00
Sandeep Puligilla
cb6735ac35 qcacmn: Release wakelock in response path
Release delete wakelock in delete response handler.
Release stop wakelock after sending the down command to
firmware so that it completes the disconnect sequence.

Change-Id: I0f47be04652178494d9cf0475af74ea573978005
CRs-Fixed: 2760116
2020-08-25 16:10:42 -07:00
Pragaspathi Thilagaraj
7cf3535595 qcacld-3.0: Add support to send RSSI_CHANGE_THRESHOLD
Add support to send WMI_RSSI_CHANGE_THRESHOLD command to firmware
in connection manager.

Change-Id: I97d4b8f8fc0e938ede0e61d44eb8ffbcbb0fb4ff
CRs-Fixed: 2761043
2020-08-25 05:41:15 -07:00
Abhishek Ambure
fb27821b98 qcacmn: Enable CFR support for target QCA6750
Host enables CFR support for QCA6750 target.

Change-Id: I3e68d3984eef7faa94739a71124315336922e417
CRs-Fixed: 2754922
2020-08-24 12:40:16 -07:00
Srinivas Girigowda
40f652caf5 qcacmn: target_if: Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF
Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF.

CRs-Fixed: 2760938
Change-Id: Ic2a0a703210bb64aee57e5e3edb4028906f62dc9
2020-08-23 23:09:44 -07:00
Srinivas Girigowda
3f87cf2e5d qcacld-3.0: components: Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF
Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF.

CRs-Fixed: 2752355
Change-Id: I2d776be789df3e83e0c13211844b66d595498829
2020-08-22 16:00:40 -07:00
Amruta Kulkarni
f9c5c541c1 qcacmn: Update the dfs api
To get the channel state for 5g bonded channel using the freq
use wlan_reg_get_5g_bonded_channel_state_for_freq.

Change-Id: I0b42e9c547ba70259e88137a5a26c238cd66da8d
CRs-Fixed: 2756463
2020-08-21 06:47:51 -07:00
Paul Zhang
1123940de7 qcacmn: Fix bitwise comparison issue
When the option -Werror=tautological-compare is enabled, the compiler
reports error because bitwise comparison always evaluates to false.

Change-Id: I7532dc9bccb69e02be5f04897a6ecaff44e84a0d
CRs-Fixed: 2734883
2020-08-21 04:46:43 -07:00
Anirban Sirkhell
c19a2cd793 qcacmn: Get max user capabilities from WMI ready
Retrieve the max users per-PPDU supported in Uplink
and Downlink direction, from the fixed params of WMI
service ready ext2 event.

CRs-Fixed: 2747218
Change-Id: Ib9f9bd4313dd1955c607d4fe77b02e34761d1c20
2020-08-20 15:42:18 -07:00
hqu
de62531961 qcacld-3.0: Move rso related process to connection manager [PART 7]
Add new code to implement below functions for connection manager
roam part:
Filling below WMI cmd parameters related process:
WMI_ROAM_CONFIGURE_MAWC_CMDID
WMI_ROAM_BSS_LOAD_CONFIG_CMDID

Rename file wlan_cm_roam_public_srtuct.h name to
wlan_cm_roam_public_struct.h

Change-Id: I64d54bb78b71dadc49d119b9083658347cc4f807
CRs-Fixed: 2758130
2020-08-20 15:42:04 -07:00
Adwait Nayak
5e8254061e qcacmn: Modify data type of timestamp
The 'timestamp' field in CFR meta data corresponds to TSF
at the reception of PPDU in micro second unit. To capture
timestamp for one shot, periodic and repetitive channel
capture, this field is being used.

case 1:
For one shot and periodic capture, the clock used for
timestamp is private to the target and not visible to host.
So it is being passed by FW to host and the placeholder
being exchanged between Host and target is of 32 bit.

case 2:
In case of repetitive channel capture, the
timestamp is being populated from the received PPDU,
which is 64bit.

To accommodate the timestamp, in both above cases, change
the data type to u_int64_t from u_int32_t

Change-Id: Ifa612bd97dc4f597368daefcd4224b84f2484c03
CRs-Fixed: 2751408
2020-08-18 14:43:35 -07:00
Adwait Nayak
9b8183fef6 qcacmn: Enable CFR support for IPQ5018
Enable CFR support for IPQ5018.
Calculate stream FS buffer length based on CFR payload,
CFR uCode header and CSI metadata.

Change-Id: Idd903ead75d635ce87ffc0df80e5c32fb62d15aa
CRs-Fixed: 2751408
2020-08-18 14:43:27 -07:00
Adwait Nayak
a265096932 qcacmn: Change data type of modified_in_curr_session
Repetitive channel capture configurations usually support
16 groups to be confugured. To check if a particular group
is enabled by user, qdf_test_bit is being used here.

qdf_test_bit usually operates with uint32_t and it takes
the argument as unsigned long type. Since,
modified_in_curr_session is declared as uint16_t, and then
typecasted into unsigned long.

Change the data type of modified_in_curr_session
from uint16_t to 'unsigned long' to avoid compiler
issues.

Change-Id: Iec778dc36d5671f2cfb643c9ced1bd2a6104de2b
CRs-Fixed: 2753267
2020-08-18 11:01:05 -07:00
Rhythm Patwa
759a833fdc qcacmn: Add API to get target capability for Preamble Puncturing Tx
Add API to get target capability for 'Preamble Puncturing Tx'

Change-Id: Ieb09bb4920112b52caf567381efb380e21d9c5cb
2020-08-16 15:03:03 -07:00
Ashish Kumar Dhanotiya
dc2d337116 qcacmn: Fill correct max BW to set channel params
Currently wifi positioning api to update channel bandwidth
info is invoking regulatory component api to set the channel
params with BW as CH_WIDTH_MAX, because of which regulatory
component is returning the maximum BW supported for the current
regdomain which is 160MHz. If target does not support 160MHz in
that case it may lead to undefined behavior.

To address this issue, pass max supported BW by target as
argument to regulatory component so that regulatory component
does not return the BW greater then the target supported BW.

CRs-Fixed: 2730665
Change-Id: I6051336ab2f3ea902a70ed80290e5a5f060de5b9
2020-08-15 16:56:10 -07:00
Abhishek Ambure
d4b5e25e98 qcacmn: Update proper band to mac param in INIT cmd
Host updates band to mac params and sends to FW in INIT command, FW uses
it to configure MACs. If host configures DBS in INIT command param but
FW doesn't advertise wmi_service_dual_band_simultaneous_support service
then host does not configure band to mac params in INIT command and let
the FW initialize MACs with default value.
As FW supports DBS and at the same time doesn't advertise
wmi_service_dual_band_simultaneous_support, host configures band to mac
params for only one MAC i.e. MAC0. FW either expects both the MACs
configuration from host or both not configured. If host configures only
one MAC, second MAC i.e. MAC1 configure remains empty. FW crashes as it
starts operation on MAC1. Hence host doesn't configure band to mac params
in INIT command.

Change-Id: I00104d7e6b911e0f792597346629b3c77c102c70
CRs-Fixed: 2752248
2020-08-14 14:44:21 -07:00
hqu
eadb9c42b8 qcacld-3.0: Move rso related process to connection manager [PART 6]
Add new code to implement below functions for connection manager
roam part:
And below two RSO command related process:
ROAM_SCAN_OFFLOAD_STOP
ROAM_SCAN_OFFLOAD_UPDATE_CFG

Change-Id: I378b969ddae77fff49ad1d4d8ce21764b292e5ac
CRs-Fixed: 2753011
2020-08-14 04:12:14 -07:00
Min Liu
ce06f6cbcb qcacld-3.0: Move get_peer_info into cp_stats component
Move WMI_REQUEST_PEER_STATS_INFO_CMDID related statistics into
cp_stats component.

Change-Id: I636221b0bc0e28180c97cd269440a7c733716a1d
CRs-Fixed: 2680618
2020-08-14 04:12:10 -07:00
Shwetha G K
31533ab3d9 qcacmn: Update signal strength calculation logic to consider -ve SNR
Update the signal strength calculation logic in CFR to consider
negative SNR i.e., a signal below the noise floor.

CRs-Fixed: 2753751
Change-Id: I2e2b95cc2ac2cf50ad5b7e38977ab971ddeb1ecf
2020-08-13 10:33:13 -07:00
Visweswara Tanuku
9c2ba119a4 qcacld-3.0: Extract Peer TWT session parameters
WMI handler is registered for twt_session_stats event.
Upon wmi event twt session parameters are extracted and
cached in peer mc_cp_stats. UMAC APIs are provided to
retrieve TWT session parameters from north bound
interface(hdd) using twt peer's mac_addr/session dialog_id

CRs-Fixed: 2730732
Change-Id: I8ce38ac6be97e844e26e03751c6d6cca981b82b4
2020-08-13 02:09:56 -07:00
Shwetha G K
5ae97cd65b qcacmn: Add freeze_tlv_version in cfir_enh_dma_hdr
Add freeze_tlv_version in cfir_enh_dma_hdr where,
    version 1: Cypress/HastingsPrime which supports single user
               channel capture
    version 2: Maple/Spruce/Moselle which supports MU channel
               capture for up to 4 users
    version 3: Pine which supports MU channel capture for up to
               37 users

CRs-Fixed: 2741027
Change-Id: Iadd6dc2ff82030f502776ce35988b4472450337e
2020-08-12 19:53:23 -07:00
Amruta Kulkarni
2f48b53345 qcacmn: Prevent link down for SAP on DFS channel
For SAP on DFS channel, the PCIe link down should be prevented
so that HalPhy can access DDR memory to report Radar found event.

Change-Id: I5eb1076196c509f0279781dbe3269d62132aeabc
CRs-Fixed: 2712800
2020-08-12 13:56:38 -07:00
Edayilliam Jayadev
fa65000c6b qcacmn: Add helper APIs to check scan radio capabilities
A new BDF option is added for scan radio boards to disable/enable DFS
detection. This flag is advertised to host via scan radio capabilities
TLV in ext2 service ready event. If customer sets the BDF so that DFS
need to be disabled, host skips the CAC timer and ignores the Radar
detection event. This change adds the following APIs.

1) Check given radio is a scan radio
2) DFS needs to be enabled/disabled for scan radio

CRs-Fixed: 2746779
Change-Id: Iabd34261aaa1067c7bbb76677aebcc8a3f89de43
2020-08-12 08:47:45 -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
wadesong
df734fa783 qcacld-3.0: Fix compilation error for LFR2+BLM
With the newly introduced BLM enhancement, APs may get enlisted
and sent to FW for (re)assoc restraint. However, the FW side
AP restraint is only required when LFR3 is enabled.

With LFR2, no FW side AP (re)assoc restraint is required and all
actions will be done within driver code.

Use LFR3 specific conditional macro to enclose all the code
needed for sending reject AP list to FW.

Change-Id: I9a8bc0e25bc4b319bf1841324ef1b711f0659093
CRs-Fixed: 2751791
2020-08-10 22:30:40 -07:00
Rhythm Patwa
aa78367f33 qcacmn: Add support to handle preamble puncturing Tx WMI parameters
Add service ready parameter to update the capability for Preamble Puncturing
Tx support from target. Add WMI support for configuration of Punctured
band setting from Host.

Change-Id: If5714c162356c35c7c385c4596043c0bc671be9a
2020-08-10 16:45:55 -07:00
Utkarsh Bhatnagar
4987746ee6 qcacmn: Change WAPI Tx IV PN Sequence
Change the receive and transmit Iv in wlan_crypto_set_wapi_key
such as:
	tx_iv[16] = {0x5c, 0x36, 0x5c, 0x36, 0x5c,
		     0x36, 0x5c, 0x36, 0x5c, 0x36,
		     0x5c, 0x36, 0x5c, 0x36, 0x5c,
		     0x36};

	rx_iv[16] = {0x5c, 0x36, 0x5c, 0x36, 0x5c,
		     0x36, 0x5c, 0x36, 0x5c, 0x36,
		     0x5c, 0x36, 0x5c, 0x36, 0x5c,
		     0x37};

This is done as wpi_key_tsc_counter sequence was been sent
in reverse order. 0x365C365C365C365C365C365C365C365C was
sent although 0x5C365C365C365C365C365C365C365C36 was expected.
This is because new chipset firware expects the format to be
in big endian. Also, taken care for the backward compatibility
required for the old chipset firware with the feature flag.

Change-Id: I8c795df5a9143e5089e93aaebe7787e51b570c74
CRs-Fixed: 2743162
2020-08-07 15:02:06 -07:00
hqu
e08002ded7 qcacld-3.0: Move rso related process to connection manager [PART 5]
Add new code to implement below functions for connection manager
roam part:
Filling below WMI cmd parameters related process:
WMI_11K_OFFLOAD_REPORT_CMDID
WMI_ROAM_DEAUTH_CONFIG_CMDID
WMI_ROAM_IDLE_CONFIG_CMDID

Change-Id: I346b921a6f378e7c4d8860acd7c3bec45a0b9d3a
CRs-Fixed: 2749430
2020-08-06 16:39:57 -07:00
Rakshith Suresh Patkar
2bd4ec3c09 qcacmn: Add debug log to trap unsuccessful dbr vaddr lookup
In direct buf rx, if physical address is not intact or
is corrupt, the dbr lookup for vaddr will fail and result
in vaddr being NULL. There is no validation for this vaddr
in the caller and hence results in NULL access in the
callstack.

Add debug log and return error status when dbr
vaddr lookup fails, which indicates that there is
corruption in paddr received and avoid NULL access.

Change-Id: I76ee300ce3e686765dd5c4ee73fa71d1735c163a
CRs-Fixed: 2748529
2020-08-05 17:35:15 -07:00
hqu
1812c1ad2b qcacld-3.0: Move rso related process to connection manager [PART 4]
Add new code to implement below functions for connection manager
roam part:

Filling below WMI cmd parameters related process:
WMI_ROAM_BTM_CONFIG_CMDID
WMI_ROAM_SCAN_STOP_CMD
WMI_ROAM_PER_CONFIG_CMDID

And RSO command:
ROAM_SCAN_OFFLOAD_RESTART

Change-Id: I18480941980a55957abd48e0329fe4ef213a1243
CRs-Fixed: 2747578
2020-08-05 04:24:03 -07:00
Sandeep Puligilla
9c7c6259ca qcacmn: Enable VDEV response wakelock
Enable VDEV response converged wakelock logic.

Change-Id: I67917d5798d9279cb104d0e7ff2cbe26365658c1
CRs-Fixed: 2738667
2020-08-05 00:03:57 -07:00
Pragaspathi Thilagaraj
e8dd7062ef qcacld-3.0: Add connection manager RSO init/deinit support
Add connection manager changes to send roam scan offload init
deinit. Add new enum roam_offload_init_flags to fill the roam
init/deinit flags, 4-way handshake offload, bmiss skip full scan
flags at connection manager instead of getting the ini and filling
at target if.

Change-Id: I558e868efd341b508d3df76c8d6ab90eac512432
CRs-Fixed: 2745585
2020-08-01 21:08:44 -07:00
hqu
672e5ac9f8 qcacld-3.0: Move rso related process to connection manager [PART 3]
Add new code to implement below functions for connection manager
roam part:

Propagate 'Change-Id: I49d64671f74b86c516d286c4b2aad69eda744b52'
Filling below WMI cmd parameters related process:
WMI_ROAM_AP_PROFILE
WMI_ROAM_FILTER_CMDID

Change-Id: I4870c69a0e0ca1e8cad734a591f09e402b7a32fa
CRs-Fixed: 2745468
2020-08-01 11:02:13 -07:00
Shwetha G K
282b71f640 qcacmn: Support CFR capture_count and MO marking requirement
Support a new capture_interval_mode: capture_count, where after
capture_count+1 number of frames, MAC stops channel capture and
waits for capture_interval duration before enabling again.

Add nob(capture_intervalmode_sel) to switch to capture_count or
capture_duration mode in wlanconfig application, where
capture_intervalmode_sel=0 indicates the old capture_durarion
mode where MAC stops channel capture after capture_duration
instead of capture_count. capture_intervalmode_sel=1 indicates
the capture_count mode.

Support MO marking: Current ENH CFR uses the existing MD/MO,
type/subtype filters to filterin the packets with programmed
type/subtype as either MD/MO. But for m_TARA it is also required
to consider the bw/nss/ta/ra setting. Therefore, it is possible
that not all the filtered-in PPDUs have channel capture and lead
to processing of packets which does not have captured data.
To overcome this issue, from QCN9000 onwards, MAC has MO marking
feature added for M_TARA filter mode, where MAC will consider
all TARA group configuration as filterin criteria & provides
an option to HOST to choose either filterin mode as FP or MO.
en_ta_ra_filter_in_as_fp is added to support MO marking.
Based on the discussion between HOST, FW & MAC teams, 0 is the
recommended & default setting for en_ta_ra_filter_in_as_fp.
Add nob to configure en_ta_ra_filter_in_as_fp but do not expose
to user.

Change-Id: I790d7ce500a7d779ea571635690f73dbc582cf33
2020-07-29 09:39:51 -07:00
Rachit Kankane
13b4322e3b qcacmn: Add runtime support for Inter-Band MCC
To handle no-inter-band MCC scenarios for dual MAC non-DBS solutions,
add changes to detect capability at run-time based on service bits.
If the service is set then code for only intra-band MCC will be
exercised.

Change-Id: I402311fcecfd03bba67fedfb2b52f779f60b81ce
CRS-Fixed: 2730374
2020-07-27 04:54:22 -07:00
Wu Gao
b43c68dedf qcacmn: Gets vdev by id in spectral component
It starts spectral scan without vdev object, and uses the first vdev
as current vdev. which cause vdev mismatch in some platforms. So pass
vdev object or id when finding current vdev.

Change-Id: Iab55afbe2c98906021a008918f186d3d2dce5871
CRS-Fixed: 2716460
2020-07-24 02:01:08 -07:00
Gururaj Pandurangi
b1f6686944 qcacmn: Enable three new 5.9 ghz channels for US
Add new channel bonding pairs as well as frequency
pairs for 40, 80 and 160 MHz with the support of
three new 5.9 GHz channels 169, 173 and 177.
Add new API reg_modify_chan_list_for_5dot9_ghz_channels
to enable/disable these new channels based on
INI value and service bit.

Change-Id: I8598e705ba4047e96e7167661ba70d4236cde251
CRs-Fixed: 2696211
2020-07-23 17:24:06 -07:00
hqu
3a0d51c272 qcacld-3.0: Move rso related process to connection manager [PART 2]
Add new code to implement below functions for connection manager
roam part:
WLAN_ROAMING_IN_PROG/WLAN_ROAM_SYNCH_IN_PROG related handler.
Filling below WMI cmd parameters related process:
WMI_VDEV_PARAM_BMISS_FIRST_BCNT
WMI_VDEV_PARAM_BMISS_FINAL_BCNT
WMI_VDEV_PARAM_ENABLE_DISABLE_ROAM_REASON_VSIE
WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON_CMDID
WMI_ROAM_SCAN_PERIOD

Change-Id: I28439393a57c72012f9de51f24050f95366294bc
CRs-Fixed: 2738353
2020-07-23 06:59:59 -07:00
Shwetha G K
a87d0fe709 qcacmn: freeze_tlv changes due to 37 UL-MU users in Pine
Add freeze_tlv changes due to 37 UL-MU users in Pine

Change-Id: Ibe794b83e7d8722b5ea8709fa23d33fb823bd992
2020-07-22 07:45:19 -07:00
Wu Gao
5a754eb0c4 qcacmn: Enable spectral scan gen3 for QCA6490
Enble host sopport of spectral scan gen3 for QCA6490 target.

Change-Id: Ic99520bb6db94a0f41c2cd4c94b77e9795617f4c
CRs-Fixed: 2716598
2020-07-20 21:54:21 -07:00
Shwetha G K
5ebf659ba8 qcacmn: Enhanced CFR code cleanup
Enhanced CFR code cleanup

Change-Id: Ie27a0523c8216fc12f24ba6c707ce45cc61fb5c8
2020-07-20 19:26:40 -07:00
Huashan Qu
0809f7d32d qcacld-3.0: Move rso related process to connection manager [PART 1]
Add macro ROAM_OFFLOAD_V1 for new code and implement below functions
for connection manager roam part:

csr_handle_roam_state_change() roam offload state related handler.
Filling WMI_ROAM_SCAN_RSSI_THRESHOLD cmd parameters related process.

Change-Id: I0351155ca5a3d68ade6568c7527c5708582ccf1a
CRs-Fixed: 2730826
2020-07-18 18:13:31 -07:00
Surabhi Vishnoi
bb9b9ec907 qcacmn: Compilation fixes when WLAN_CFR_ENABLE config is enabled
For adrastea targets, enhanced CFR is not supported. When only
CONFIG_WLAN_CFR_ENABLE is set, some compilation errors are
observed as CONFIG_WLAN_ENH_CFR_ENABLE is not set true.

Fix these compilation errors when only CONFIG_WLAN_CFR_ENABLE
is set for targets which do not support enhanced CFR.

Change-Id: I96a769d8f10144033e48e123bb68d48a54cdf8ab
CRs-Fixed: 2706904
2020-07-17 17:23:23 -07:00
Shashikala Prabhu
bdecef61b5 qcacmn: Add wrapper functions to get the correct pdev_id
Add wrapper functions to get the host pdev id from target pdev id and
vice versa.

Change-Id: Ib10f6f5625b4a9e1f44a13e9185de75f6df88b3c
CRs-Fixed: 2711423
2020-07-17 01:51:34 -07:00
Basamma Yakkanahalli
81e70bb153 qcacmn: Enable Spectral feature for ipq5018 target
a. Enable DDMA support and FFT bin length adjustment SWARs
b. Similar to QCN9000,
Skip 16 bytes of unused padding added after Spectral summary report
FFT report header length is 24

Change-Id: I870f198511771dccbb0300ff62fc15ab0d64ee7f
2020-07-09 15:54:29 -07:00
Srinivas Dasari
d272368a4c qcacld-3.0: Ini bitmap to enable/disable a particular NAN feature
NAN protocol runs in firmware and controlled by framework.
Framework configures multiple NAN discovery params while enabling
NAN. Framework configurations would be based on the framework
constraints or realtime scenarios like resource(memory/power/..)
consumption. But some of these params might need to be controlled
explicitly based on the usage.
NAN DW is one such parameter, which is configured as 4 seconds
when the device is in sync role and the screen is off. But
for some usecases, this param might have to be 512ms always
irrespective of screen off/on for some targets. Add an ini param
"nan_feature_config" to set a bit to indicate firmware whether to
honor framework configured DW value or the firmware default value.
Send the vdev param on NAN supported vdev by setting the "bit 0"
to indicate firmware to allow framework configured DW value.
If this bit is not set, firmware shall consider its default value.

Change-Id: I0476bca2bbe676beccfff207f5b4ea31e89031e2
CRs-Fixed: 2721970
2020-07-08 18:55:48 -07:00