Commit Graph

87 Commits

Author SHA1 Message Date
Vignesh Mohan
48c594436d qcacmn: Add API to identify true 160 and restricted 80p80 support
In a future product, 160MHz mode of operation is acheived through
a single detector, unlike Hawkeye and its variants where 160MHz mode
is acheived using two 80MHz detectors.

Because of this change, the maximum segment ID is 0 in the new chipset,
whereas 1 in Hawkeye and its variants. Also the Agile detector ID
is 1 in the new chipset, 2 in Hawkeye and its variants.

In light of these changes, to identify the true 160MHz capability,
add a new API that checks the target type and returns true 160MHz
capability based on the target type. Also introduce a new dfs
variable that maintains the agile detector ID (based on the
true 160MHz capability).

In the future product, there is a support of restricted-80p80MHz
(a.k.a 165Mhz) where channels 132,136,140,144,149,153,157,161 are
available for operation as an 80p80Mhz channel.
Add a DFS API to check if this support is enabled.

CRs-Fixed: 2623964
Change-Id: If813e9d6fc649ce99c7780c04fbcb61acbd1af86
2020-03-18 15:38:48 -07:00
Sumedh Baikady
d188789876 qcacmn: Enhancement in Minidump feature
Handle minidump logging using dynamic
configurablity options. Data structures
to be logged in minidump can be configured
using internal INI file.

Change-Id: I99f12b3f98c4a9c0e15c3e5d611019e6b8d0909a
2020-02-26 08:35:46 -08:00
hqu
fed4bfb049 qcacmn: Add dcs component
Add dcs component to implement interference detection algorithm
and dynamic channel selection frequency control.

Change-Id: Ia201d77e77feb9de3aff03d6e389d4891dde118e
CRs-Fixed: 2594837
2020-02-13 04:12:30 -08:00
Yu Wang
1cd103900e qcacmn: Initial version of coex component
Add initial set of coex files, implement the basic functions.
Coex component is used to process coex related configurations.

CRs-Fixed: 2565088
Change-Id: I8b9600809691b808f97c621cb329a6ab9941814c
2020-01-09 02:40:23 -08:00
Hangtian Zhu
62547ed826 qcacmn: Enable configurable dfs_pri_multiplier
Enable configurable dfs_pri_multiplier. The ETSI typ2 type3 radar
detection ratio is lower than expected(>80%) while channel loading is
high(>30%). The host improvement for this are:
	1. Add configurable dfs_pri_multiplier, controlled by
	   DFS_PRI_MULTIPLIER. Default value 2, min 1, max 10.
	2. Lower adrastea ETSI type 2/3/4 radar filter rssi_threshold,
	   controlled by DFS_OVERRIDE_RF_THRESHOLD, dfs log shows that
	   QCS405 target report RSSI range [18, 45] while radar power
	   is 3 dbm. By using default rssi_threshold 24 will reject
	   many radar pulses, which leads to low detection ratio.
	3. Calculate deltapri for each searchpri based on dfs_pri_multiplier
	   in dfs_count_the_other_delay_elements(), check deltapri
	   between [1, dfs_pri_multiplier] * refpri and searchpri, if
	   the primargin is desired, mark it as matched pulse.
	4. Pick lowpri as refpri for the radar filter with
	   rf_ignore_pri_window equals to 0 while DFS_PRI_MULTIPLIER is
	   enabled. Observed original findref logic has some problems
	   which selects refpri is bigger than lowpri, which leads to
	   the lowpri pulses pri_match are set to 0, and in this case,
	   radar was not detected. Example for the issue, assume
	   rf->rf_pulseid 34 (ETSI type 2) has 7 pulses with pri:
	   1489, 2978, 2978, 2978, 1489, 2978, 1489 us in this case,
	   highscore is 4 (2978), scoreindex is 5, refpri is 2978, which
	   leads to: index 0, 4, 6 pulses with pri_match 0 in
	   dfs_count_the_other_delay_elements(). The fix is to select
	   lowpri as refpri(1489 in this case).

Change-Id: I1f3ca3298c9ab1f1e2651ad6b4a0a4810f83f8a1
CRs-Fixed: 2531811
2019-10-01 02:16:19 -07:00
Debasis Das
285561b9ab qcacmn: Support dma_ring_caps info processing
EXT2 event carries the dma_ring_caps info.Necessary
support to process the same is being provided.

Change-Id: Id8ef1840470b272db00fa5e8f98d1fe9dc273a7e
2019-09-17 12:12:43 -07:00
Sourav Mohapatra
6561456601 qcacmn: Add support in host to receive ext2 ready event
Currently the host gets service_ready_event and service_ready_ext_event
during the init sequence as a part of handshake with firmware. As the
size of the service_ready_ext_event exceeds on adding further
parameters, new event is created.

Add support for WMI_SERVICE_READY_EXT2_EVENT to be processed after
WMI_SERVICE_READY_EXT_EVENT based on the service bit
WMI_SERVICE_EXT2_MSG.

Also add support to extract the reg db/bdf version information that
comes inside the ext2 event.

Change-Id: If0b57af362e7eb653f9189b912ec1dd3efb0f731
CRs-Fixed: 2501132
2019-09-04 11:31:00 -07:00
Vignesh Viswanathan
3e31e2babd qcacmn: Add support for checksum from FW for pktlog
If the FW sends a pktlog checksum in the FW ready event, store that in
pl_dev and use it as buf_hdr.version in the pktlog buffer header.

Also, use a new magic value to identify the checksum in the
buf_hdr.version field.

If the FW does not send the checksum, then the existing magic number
and standard version number would be maintained.

Change-Id: Ib08c093a9b54495a2c5b7e0e163207f2b1eb4ce2
CRs-Fixed: 2508828
2019-08-22 02:53:10 -07:00
Abhishek Ambure
c76db37021 qcacmn: Clean up CMN_VDEV_MGR_TGT_IF_ENABLE
WIN and MCL both uses common targer_if code for vdev manager.
So legacy code and "CMN_VDEV_MGR_TGT_IF_ENABLE" macro is removed.

Change-Id: I2984ae44f3a7cfa01b8f1455353d09deb4db5759
CRs-Fixed: 2503804
2019-08-11 10:38:20 -07:00
Gyanranjan Hazarika
8e0ae99446 qcacmn: Add target_if changes for dynamic hw-mode config
This feature enables a user to change HW mode dynamically
from DBS to DBS_SBS mode and vice-versa. Currently, HW
mode configuration is only possible through INI setting
requiring a subsequent reboot.

Primary target_if changes are:

1. Add structure definition wlan_psoc_host_hal_reg_cap_ext
to parse and store the new extended regulatory capability
info in WMI_MAC_PHY_CAPABILITIES tlv sent in EXT service
ready WMI event
2. Add API target_psoc_get_num_radios_for_mode to retrieve
the number of radios corresponding to a hw-mode
3. Add API target_psoc_get_mac_phy_cap_for_mode to retrieve
the pointer to the mac_phy_cap info of the first radio
corresponding to the input hw-mode.

Change-Id: Ia10f0fd5e50c0ce0cbe99f9281147266aedce4e9
CRs-fixed: 2490212
2019-08-09 11:18:45 -07:00
Aditya Sathish
7de5d4f264 qcacmn: Add support for RF characterization WMI event
Add support to read the RF characterization WMI event
and parse each individual TLV containing the channel's
center frequency, bandwidth and RF characterization
metric.

Also, remove the support for reading the RF
characterization metrics from the extended
service ready WMI event.

Change-Id: I560583f9304005282c09a27f47c8d5c2778b1645
CRs-Fixed: 2487415
2019-08-02 03:13:52 -07:00
Akshay Kosigi
4002f765f1 qcacmn: Change to remove void pointer usage for HIF handle
Add code to remove void pointer usage for hif_handle
and use opaque pointer hif_opaque_softc and also use
cdp_soc for opaque DP soc handle

Change-Id: I2896f7704ffb809214c5b08756c4b8673307fd9e
CRs-Fixed: 2487247
2019-07-27 13:43:00 -07:00
Himanshu Batra
032d352263 qcacmn: Replace void * Host Target Communications handle with abstract type
Replace void * Host Target Communications handle with abstract type handles
provided by Host Target Communications component

Change-Id: I16ca87e4f9716791d340da2fda0a8a640fa2ec34
CRs-Fixed: 2487151
2019-07-25 00:25:49 -07:00
Vevek Venkatesan
ad55b14e32 qcacmn: converge target type defines for both MCL and WIN
Converge definitions of target types for both MCL and WIN.

Change-Id: I501d39ff5989747ddd22b08cb390bb4601c5dd0b
CRs-Fixed: 2484512
2019-07-24 21:43:24 -07:00
Himanshu Batra
556930bba9 qcacmn: Replace void * tgt_if_handle with abstract type
Replace void * tgt_if_handle of objmgr psoc/pdev with
abstract type handles provided by target interface

Change-Id: I9e0ae991776daa0c25c4ad7b4e4dc022441318a3
CRs-Fixed: 2482708
2019-07-19 02:48:20 -07:00
Akshay Kosigi
dc8e095f30 qcacmn: Fix for removal of common_wmi_handle
Add changes to remove usage of common_wmi_handle
Instead use wmi_unified_t as opaque pointer

Change-Id: I85ae8581ce8e4f7fd02fb753e3f482f8a6edebac
2019-06-20 12:00:00 -07:00
Aditya Sathish
ce928dcd67 qcacmn: Add support for chan RF info from service_ready_ext event
Channel RF info contains metrics that signify the throughput
availability of all the supported channels. This information
is sent in as discrete TLVs (per channel) as part of the WMI
extended service ready event.

Each TLV contains the frequency, bandwidth represented and
the actual channel metric.

Add support to read the above-mentioned TLVs from the extended
service ready event

Change-Id: If947e179c1ca41466997cc48840a8d36b6236780
CRs-Fixed: 2441921
2019-06-03 02:27:10 -07:00
Subrat Mishra
13d57c69d2 qcacmn: Configure TWT pdev count dynamically
Configure TWT pdev count based on number of active radios.

Change-Id: I8b297c2f2398774a57932bd1fafc83aba2f891d2
CRs-Fixed: 2449799
2019-05-27 04:23:36 -07:00
Jeff Johnson
eee26f7b76 qcacmn: target_if: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within target_if replace any such comparisons with
logical operations performed on the pointer itself.

Change-Id: I436bb3ec12d331df2260507b6a9afbab84a8a54f
CRs-Fixed: 2418256
2019-03-29 00:48:05 -07:00
narayan
d9e53400e9 qcacmn: CFR Feature support
Add CFR component specific Rx-Ops callbacks

Change-Id: Ic1e89ca2ba049f9579964de50d7285cd40a0d3a7
CRs-Fixed: 2397716
2019-02-22 22:52:26 -08:00
Jeff Johnson
6889ddf7bb qcacmn: Replace CONVERGED_TDLS_ENABLE feature flag
The CONVERGED_TDLS_ENABLE feature flag was originally introduced when
the TDLS feature was being componentized so that one could select
either the legacy implementation or the componentized implementation.
That componentization activity has concluded and the legacy
implementation no longer exists. To align with the current usage
remove all legacy TDLS code and switch to using the FEATURE_WLAN_TDLS
feature flag since that more accurately describes the code being
protected.

Change-Id: Ieef785844bd25b06604167eae2f52e39717f502f
CRs-Fixed: 2395694
2019-02-20 09:09:44 -08:00
Abhiram Jogadenu
880ba01add qcacmn: Add target_if support for CFR
Add target_if support for CFR.

CRs-Fixed: 2372061
Change-Id: I8ad14d714306acc20c9a7e09c8d6f17f7caeae16
2019-02-20 06:21:18 -08:00
Chaitanya Kiran Godavarthi
6df18d4da8 qcacmn: Remove service ready callback for smartlog enable
Remove service ready callback for smartlog enable.

Change-Id: I1d2807b0ec59b4f38bb8e2ac5365f3b57cf37437
2019-02-17 08:41:20 -08:00
Madhvapathi Sriram
0c5bdd7e73 qcacmn: Remove error log for qdf_mem_malloc in target_if files
qdf layer already has the error trace

Change-Id: I2d752fafb6ee805206047bae9711aa0387f22f69
CRs-Fixed: 2376430
2019-02-11 02:30:02 -08:00
Naga
f3a70cea4e qcacmn: Add target_if/mlme/vdev_mgr for vdev mgmt ops
Add target_if/mlme/vdev_mgr to handle vdev
mgmt related ops inorder to send corresponding
requests to WMI and processing response events
and Tx callbacks are introduced in MLME LMAC
Tx Ops structure which are initialized from
target_if main.

Change-Id: I9d02b17fdb04757d7dc523dd41e409c0fb1e5edf
CRs-Fixed: 2383346
2019-02-05 06:29:48 -08:00
Edayilliam Jayadev
d4b7e3b572 qcacmn: Populate spectral capability and send via cfg80211
Populate Spectral capability structure with scaling parameters
from extended service ready event parameters. Send the spectral caps
via cf80211 interface.

CRs-Fixed: 2379652
Change-Id: Id0372bdd40843c2101df32d2e71920027a24909f
2019-02-05 04:02:20 -08:00
Edayilliam Jayadev
ac0ddecb36 qcacmn: Get Spectral bin scaling params
Extended service ready event has a tlv
containing the spectral bin scaling parameters.
Populate the spectral capabilities using this info.

CRs-Fixed: 2379652
Change-Id: I0b4648302e7170b5965cf1aec68638e70cd36e73
2019-02-05 04:02:17 -08:00
Kiran Kumar Lokere
25531c4717 qcacmn: Add support for SET KEY convergence
Make changes to the cmn driver to support SET KEY
convergence feature

Change-Id: I17b5f368a1f735eb394ea70f9b61cc033c3eb20a
CRs-Fixed: 2358796
2019-01-08 18:21:17 -08:00
Arif Hussain
c2cd7cce95 qcacmn: Rename target_if_open/close() to target_if_init/deinit()
Rename target_if_open() to target_if_init() and target_if_close()
to target_if_deinit() as these handles global target_if
initializations.

Change-Id: I935eb6461f1774043adaa0539b6e8e0ea9824382
CRs-Fixed: 2352015
2019-01-02 09:28:11 -08:00
Kiran Venkatappa
c0d010216a qcacmn: Add support to choose hw_mode_id from FW supported modes
Add support to choose the hw_mode_id from FW supported modes. Preferred
mode will be selected if it is not configured in ini params. It is
selected based on the precedence as per capabilities supported by the
mode. For eg., if FW supports DBS and DBS_SBS, DBS_SBS is selected as it
supports three radio compared to DBS's two radio.
This can be overridden by user by setting proper hw_mode_id in ini file.

Change-Id: I162c3a66182882890c416a68f7f64d5149b8f1e5
CRs-Fixed: 2361280
2018-12-14 14:26:25 -08:00
Nachiket Kukade
2b5448d685 qcacmn: Remove NAN component and related files from CMN
NAN will not be needed in CMN codebase, to reduce the
unnecessary lines of code all the NAN related files have
been merged into CLD. Remove all those files from CMN,
remove NAN related API's and structures from init-deinit,
target if and lmac components.

Remove NAN component and related files from CMN.

Change-Id: I8fa22b84aff30cfbb7a8cd0a573acf6e0a9d8744
CRs-Fixed: 2338061
2018-12-03 15:18:11 -08:00
Amar Singhal
9ff61bb709 qcacmn: Check for OOB for phy_id value
Phy_id value in reg_process_master_chan_list comes directly from firmware.
Therefore, check for OOB value for phy_id.

Change-Id: I0b634e2630c4d6e5d4a15a86953e7a0ed3df6f47
CRs-Fixed: 2327711
2018-10-15 17:32:58 -07:00
Aditya Sathish
a06a063b7d qcacmn: Add host WMI support for EAPOL minrate resource config
Add host WMI support for EAPOL minrate resource configuration.

Through the use of the global.ini configuration parameter -
eapol_minrate_set and eapol_minrate_ac_set, the user can set EAPOL
frames to be sent in minimum rate in tunnel mode. In addition to
this, the user can also select between the 4 ACs (BE, BK, VI, VO)
to send the EAPOL frames.

The changes are reflected in the target resource config which
is sent to the firmware.

Change-Id: Ib9a264b64305bf43708c3c2af3ff254b6cc28477
CRs-Fixed: 2298020
2018-10-08 01:53:22 -07:00
Akshay Kosigi
0987f2dcf7 qcacmn: Add FTM build flags
Add FTM flags to enable/disable FTM and enable NL80211 only, enable TX99
only or both.

Change-Id: I18bbbadd65d23221dc4d739e05235f4d81c12043
CRs-Fixed: 2240572
2018-08-29 14:03:02 -07:00
Nirav Shah
1b9674e21e qcacmn: umac: Add logging macros without function/line info
Add per module logging macros without function/line info
to avoid adding function/line info where it is not required.

Change-Id: I34ba6f6485f9b506264daf4e116052d2858bed40
CRs-Fixed: 2278876
2018-08-14 21:44:21 -07:00
Ryan Hsu
919ecb00a7 qcacmn: add utf event exception handler for invalid pdev_id
For the case in DBS, the psoc and pdev is one-to-one mapping,
but firmware will send per pdev_id information to host according
to the radio being tested, add a backup query to SOC_ID if the
pdev_id passed along from utf_event is invalid/unsupported to
work around this case.

Change-Id: I67645da67a968b66b720f211a9a0815a4cc22845
CRs-fixed: 2286291
2018-07-29 09:36:25 -07:00
Nirav Shah
87668f872b qcacmn: Add compilation flag for enter/exit macros
Map all enter/exit log macros to enter/exit QDF TRACE macro
to provide option to compile out enter/exit logs if required

Change-Id: I913ef0fb2486fde6b2ec4dfe8465884ca4d66ce4
CRs-Fixed: 2274857
2018-07-25 09:40:54 -07:00
Srinivas Pitla
d898ceddfa qcacmn: Change wmi ready wait to qdf_event
In current implementation, wait_queue is used for waiting on WMI ready
event, it is now changed to event mechanism

Change-Id: I08b4f088874b7c63e20b129f14dbac01851496e5
CRs-Fixed: 2276900
2018-07-19 23:12:53 -07:00
Nirav Shah
a175314c51 qcacmn: Map all module logs to per-level log APIs
Map all module level log APIs to per-level log APIs
to compile out specific log level if required.

Change-Id: I4072b6740cb43200fd95c40943b66e1d5f8f1847
CRs-Fixed: 2266719
2018-07-13 10:36:22 -07:00
Rajeev Kumar
8716234661 qcacmn: Clean up excessive console logging from target if and qdf
Clean up excessive logging from target if and QDF to avoid spamming
kernel log buffers.

Change-Id: Ib81d6bb68bae9d5c477755b31dc20e10663147d5
CRs-Fixed: 2259283
2018-06-22 18:41:06 -07:00
c_cgodav
b69942b3c9 qcacmn: CE Debug Enhancements WMI interface
Add WMI interface for the smart logging feature.

Change-Id: Ife3784020d1b9458c2b09b6a2f31f55aab5f57ec
CRs-Fixed: 2001507
2018-06-21 05:22:17 -07:00
Jeff Johnson
bd6e61f610 qcacmn: Fix typo "funtion"
Replace typo "funtion" with correct spelling "function".

Change-Id: I05db828dd5830d4b95467ed5494f319113de9252
CRs-Fixed: 2238309
2018-05-17 00:47:29 -07:00
Akshay Kosigi
dbbf2c45da qcacmn: Replace ucfg prefix with lmac
Replace functions with ucfg as prefix in init_deinit_ucfg file with lmac as
prefix

Change-Id: I90d77dd5ddae4854ea68eeb67dc1b4fc356c2fe3
CRs-Fixed: 2182449
2018-05-11 22:40:16 -07:00
Akshay Kosigi
2a216edab0 qcacmn: Replace void pointers with appropriate/common structure types
Void pointer usage may lead to memory corruption due to
wrong pointer is typecasted. Hence define structure for all, and modules
internally typecasting based on their type

Change-Id: I6271ed8aa3f94254fd85f41962f23ea36895154e
CRs-Fixed: 2182452
2018-05-11 22:40:13 -07:00
Pratik Gandhi
b002f889e7 qcacmn: Converge dbglog and diag_event_log
Converge dbglog and diag_event_log component through fwlog api
interface. It abstracts dbglog and diag_event_log from other
components.

Change-Id: I8f86a4381fbb9af8386320906337638113c8f189
CRs-Fixed: 2217556
2018-05-01 23:01:44 -07:00
Sathish Kumar
77f3c438f0 qcacmn: Fix memory leaks in direct buffer receive(DBR) module
Module param capabilities stored per module per pdev and overall
target dbr ring capabilities allocated and stored during service ready
are not freed during detach.

Fix above mentioned memory leaks through below changes
1. Free module param capabilities allocated per pdev during ring deinit
2. Free DBR ring capabilities allocated during service ready event
   as part of target psoc info free.
3. Free DBR entries allocated per event received from target

Change-Id: I93d5126063d3fa0094e15d57a75f03cf63b3c494
CRs-Fixed: 2228428
2018-04-27 05:26:39 -07:00
Naga
f2d4e23818 qcacmn: Add support for cp_stats in target_if
Add support to register cp_stats for lmac Tx Ops and
provide inline APIs to get cp_stats lmac Rx and Tx Ops
structure

CRs-Fixed: 2192386
Change-Id: I33e7e22018a3aa3d3e76836ef9ddf1ead21209ea
2018-04-06 17:49:40 -07:00
Nandha Kishore Easwaran
8bb56ebedc qcacmn: Initialize preferred_hw_mode to MAX
Initializing preferred_hw_mode to WMI_HOST_HW_MODE_MAX and removing
preferred_mode check. This is needed for Napier where preferred_hw_mode
of 0 is a valid configuation which represents single radio mode.

Change-Id: I8998745427427021f219667e03f767c66527d579
CRs-Fixed: 2192227
2018-03-02 16:34:35 -08:00
Varun Reddy Yeturu
1848acda2b qcacmn: Fix NULL pointer dereference issues in scan and power debug
get_pdev_wmi_handle() can return a NULL pointer in some cases.
Perform a NULL check before using the returned pointer.

target_psoc_get_service_ext_param() can return NULL pointer in
some cases. Perform a NULL check before using the pointer.

The power debug command can  take a maximum of WMI_MAX_POWER_DBG_ARGS
arguments. Check for the limit before indexing the array to avoid
illegal access of memory or overflow the array.

Change-Id: I264475e9f86c7a7e78b17b7a1fa025718a7c5af6
CRs-Fixed: 2196063
2018-03-02 16:30:44 -08:00
akosigi
6e19edc1e4 qcacmn: Update function name and remove redundant code
Rename scan_tx_ops_register for consistency
Remove redundant lines of code in tx_ops registration

Change-Id: I3ade89f7eeb1f506f75b5c859dd4bc4242414628
CRs-Fixed: 2127952
2018-02-21 18:20:52 -08:00