Commit Graph

103 Commits

Author SHA1 Message Date
Daniel Kim
c20cb89340 qcacmn: Derive pdev_idx from pdev instead of target_pdev
Derive pdev_idex from pdev object, not from target_pdev, as
target_pdev's pdev_idx can change in run-time when dynamic
mode switch feature is enabled.

Change-Id: Iff1bf0370764ec462d66f145dddbd1868fae426c
2019-12-24 03:46:54 -08:00
Shashikala Prabhu
1e7bd262fd qcacmn: Add restricted 80+80 MHz bit in soc caps
Restricted 80+80 MHz  capability is reported by FW in service bitmap.
Based on this support set soc's extcap feature bit.

Please note, wmi_service_bw_165mhz_support will be renamed as
wmi_service_restricted_80p80_support once the FW changes are available.

Change-Id: I88f89eecd916c40ea8669c792dde3a335e4bac56
CRs-Fixed: 2579543
2019-12-10 00:51:42 -08:00
Edayilliam Jayadev
97b8676b4e qcacmn: WMI changes for Agile Spectral
1) Add Spectral scan mode and agile center frequency in WMI
   commands to indicate the current mode.
2) Obtain the Agile Spectral capability from the chain mask table.

CRs-Fixed: 2455967
Change-Id: I88ba6fc1ecf9b530a6b516d0c1e4ce88702c6d1f
2019-11-12 04:03:58 -08:00
Daniel Kim
c4ffad74c3 qcacmn: Add WMI changes for dynamic HW mode switch (Phase 2)
Add WMI changes for dynamic HW mode switch (Phase 2) as below.

1. Define new enum for dynamic hw mode switch type.
2. Extract tgt_pdev_id from mac_phy_caps_service_ready_ext event.

Change-Id: I2f0f3d4ab78a3043fb56b4d7796678a5e68bed0f
2019-11-11 16:44:26 -08:00
Amar Singhal
5fbd62d6e3 qcacmn: Add 6ghz support functions
Add API to know whether 6ghz is supported. Also add API to know
whether an operating class is 6ghz operating class.

Change-Id: I75747502c0033e31d119e58a2254b220646bba10
CRs-Fixed: 2556998
2019-11-09 22:08:12 -08: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
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
Sumeet Rao
eda56478de qcacmn: Process RX FSE Support service advertised by firmware
A new firmware capability advertising support for flow search engine
in HW has been added. Process the new service for flow tagging.

CRs-Fixed: 2475913
Change-Id: Ie69cfd5733b6d6c02792da59dee4f823a72fb431
2019-08-07 04:58:13 -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
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
Himanshu Batra
453eea49a9 qcacmn: Replace void * wmi_hdl with abstract type (4/10)
Replace void * wmi handle with abstract type handles
provided by wmi component.

Change-Id: I4bb0f9fd921bf53d38dfb257818fee48c4516cd8
CRs-Fixed: 2475457
2019-07-18 03:45:58 -07:00
Himanshu Batra
6abe4bebd6 qcacmn: Replace void * wmi_hdl with abstract type (3/10)
Replace void * wmi handle with abstract type handles
provided by wmi component.

Change-Id: I04cd3ce5b4f36f7073d4644e2fd0d52da41e1af3
CRs-Fixed: 2475447
2019-07-18 01:07:26 -07:00
Himanshu Batra
29bc991911 qcacmn: Replace void * wmi_hdl with abstract type (2/10)
Replace void * wmi handle with abstract type handles
provided by wmi component.

Change-Id: Id12d6446aed8fd389b8677f08765bb31cabf2fb0
CRs-Fixed: 2475444
2019-07-18 01:07:23 -07:00
Akshay Kosigi
c36e354311 qcacmn: Fix for removal of void pointer usage
Add changes to remove usage of void pointer for wmi_handle
Instead use an opaque pointer(set 2)

Change-Id: I06a89adaf15c6b398dbc901518aa83927b7ca16a
CRs-Fixed: 2479298
2019-07-02 09:47:56 -07:00
Shashikala Prabhu
84f2effd3f qcacmn: Fix target assert caused due to DBS band limitation WAR
In some boards, FW can send preferred HW mode as DBS and num HW modes as 2.
In this scenario, with I65ab1b803f652cf6b636cd885c6c0afd2251b0ce change we
observed a target  assert.

To fix the assert, apply the DBS mode phy0 band limitation WAR only if FW
sends preferred mode as DBS and DBS_SBS.

Change-Id: If71d143b4b6a60df7499c0f7b9da00ebf73f2b4e
CRs-Fixed: 2465391
2019-06-30 23:47:18 -07:00
Gyanranjan Hazarika
91005b0b3f qcacmn: Add WAR for DBS mode phy0 band limitation
The limitation of having a single BDF for both DBS (2 radio)
and DBS_SBS (3 radio) capable board is leading to FW sending
 per-phy band-to-mac mapping as regulatory capability
as part of service_ext_ready. The boards which have the capability
of switching between DBS and DBS_SBS modes through init-time
(INI) file configuration are limited to 5G upper bound only
even in DBS mode becasue of the above constraint.

This WAR overwrites, in psoc-reg_cap, phy0 low or phy0 high frequency
depending on whether it is mapped to upper or lower 5G band by FW/hal-phy.

Change-Id: I65ab1b803f652cf6b636cd885c6c0afd2251b0ce
CRs-Fixed: 2465391
2019-06-30 23:47:15 -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
Padma Raghunathan
93549e15a1 qcacmn: Framework to use pdev_id to lmac_id mapping from FW
FW assigns the pdev_id to lmac_id mapping for each platform(HK, CYP, etc).
This information is passed on to host via WMI_MAC_PHY_CAPABILITIES tlv.

Instead of hard-coding the mapping again in host, use the info sent by FW.

Change-Id: I01ad81e97a1b4aa1f0fea3951f6e8285a0f0c039
2019-04-25 06:02:23 -07:00
Basamma Yakkanahalli
6d4e001c2e qcacmn: Remove skipping 160 80_80 check for qca6018 target
qca6018 support max 80MHz.
Skipping the check to return success for 160 and 80_80.
So, these values can be updated from fw capabilities.

Change-Id: I3c846a343b74251521b978c4569204ad2f4aadcc
2019-04-22 18:21:17 -07:00
Arun Kumar Khandavalli
65b02b4a8e qcacmn: Update wmi ready to false when the legacy cb returns error
Presently even when the ready event legacy callback fails in
creation of the pdev, the error is not propagated correctly. This
can result in accessing the invalid memory.

Check the legacy cb return status and update wmi ready status to
false in case pdev creation fails.

Change-Id: Ia4f94154357debedc94b4b20e789bff80a4047f7
CRs-Fixed: 2426611
2019-04-21 23:43:52 -07:00
Rhythm Patwa
49064081e8 qcacmn: Modify the description for peer assoc and service ready param
Modify the comment to avoid the use of restricted words in the
wmi_unified_param and service_ready_param

Change-Id: I50f474bdeed6cfdfd05f0c4bff5bb0c0ed56127f
CRs-fixed: 2427333
2019-04-05 18:45:47 -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
Rhythm Patwa
e409a8fd44 qcacmn: Add peer assoc and service ready param for hecap_info_internal
'hecap_info_internal' has been added to indicate support for 11ax
proprietary PHY features: 400ns SGI support in 1X/2X LTF and 2X LTF
support in 160/80+80MHz modes. Added the corresponding peer assoc
and service ready parameter.

Change-Id: I34ead9278d8d84ecbc5525867f1584f8c8a4d7b8
CRs-fixed: 2414163
2019-03-26 01:24:49 -07:00
Shaakir Mohamed
14ac61de4d qcacmn: Add target interface support for Agile DFS feature
Add target interface support for Agile DFS feature. This includes:
	1)target interface to send agile dfs request command
	2)target interace to send  off-channel cac abort command

Change-Id: Ica0cecd08dc1cd90fe71a618afe749b50dc1cb6d
CRs-Fixed: 2385536
2019-03-14 14:28:26 -07:00
Dustin Brown
b5b21cac42 qcacmn: Remove qdf_*_outline() APIs
Several qdf_*_outline() APIs exist which are straight aliases to their
regular qdf_*() counterparts. Remove them, and update any callers to use
the regular APIs instead.

Change-Id: Ibe6e9cced521b93061e89690ab817ceafe49a469
CRs-Fixed: 2408267
2019-03-12 13:58:27 -07:00
Manoj Ekbote
6db1ddac13 qcacmn: Add pdev level feature flag for MBSS IE
A service bit is used to indicate support for MBSS IE.
This is set as capability in host at psoc level.
In host, we also maintain a flag for user to configure
MBSS support at pdev level. It could be used in future.

Change-Id: I31a27a755fb027de93bfe6c9639fdbda9693bace
CRs-Fixed: 2403030
2019-03-08 12:06:04 -08:00
Chaithanya Garrepalli
0e2d7fc5ad qcacmn: Handle failure in service ready event
Handle error case if unable to allocate peer map
memory.

Change-Id: Id11b04e6ae0714a9f09f051fc61231b758b56179
CRs-fixed: 2396533
2019-03-03 22:25:19 -08: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
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
Aditya Sathish
73d452f3d2 qcacmn: Add support for UL_RU26 WMI service
Add support for UL_RU26 WMI service which will notify the host if
the target has allowed UL_RU26

Change-Id: I639c0872f541cf30776c9f76b87c4b950c1e17f4
CRs-Fixed: 2390350
2019-02-12 11:24:37 -08:00
Tallapragada Kalyan
a702362d34 qcacmn: Check for MAX_AST entries when adding AST entry
check for max_ast entries supported by FW and add the
entry on host accordingly.

Change-Id: Ief70ba631bb41d50c79d3673e3eea0c45b0c1e19
CRs-Fixed: 2355947
2019-02-12 04:47:37 -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
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
Nandha Kishore Easwaran
1d17599f43 qcacmn: Call qwrap_config_enable from ext_handler
Call qwrap_config enable from both ready and extended service ready
handler. This change is needed for lithium chipsets where the number
of radios per soc is more than 1. Number of radios is updated only
in extended service ready handler and this qwraP_config_enable should
be called in extended service ready

Change-Id: I12289c38996f3bb4274e5795d434dd86c83f34c0
CRs-Fixed: 2384604
2019-02-01 03:42:34 -08:00
Yeshwanth Sriram Guntuka
c4a14ea149 qcacmn: Add host support for db2dbm RSSI changes
Add host support for db2dbm RSSI changes. Firmware
indicates this capability when underlying hardware
has RSSI reporting feature. Based on this capability
host will know if firmware sends SNR or RSSI. If no
capablity is present then host will convert SNR to
rssi using a fixed offset of -96. If capability is
present host will directly use the rssi as it is.

Change-Id: I9058f16c6280d466feb96cf88a8a0d8cd7b02032
CRs-Fixed: 2364025
2018-12-24 03:33:04 -08:00
Arif Hussain
ee8d84061c qcacmn: Add null pointer validation in init_deinit_alloc_num_units()
Make sure mem_reqs is not null in init_deinit_alloc_num_units().

Change-Id: Id93616fa8b4bfda8216b34e15169fa1636efa5f3
CRs-Fixed: 2347695
2018-12-21 19:23:47 -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
Bala Venkatesh
c05f8e47be qcacmn: Avoid possible integer overflow
In function init_deinit_chainmask_table_alloc, alloc size is declared
as uint32 and is assigned the value the multiplying non zero value
sizeof(struct wlan_psoc_host_chainmask_capabilities) and uint32
value ser_ext_par->chainmask_table[i].num_valid_chainmasks.
This can lead to overflow as multiplies value can be more than uint32.

Change-Id: I9a886d9ee5213ae8989a2c5d4502336cc275418a
CRs-Fixed: 2347650
2018-11-27 02:01:39 -08:00
Basamma Yakkanahalli
5f7cfd49c2 qcacmn: Device and Target type support for qca6018
Added target and device type support for qca6018.

Change-Id: I85382bf053d0a5f34cfaf0cca78a4b66b4265989
CRs-Fixed: 2323023
2018-11-27 00:32:00 -08:00
Aniruddha Paul
c34164e97e qcacmn: Add support for NSS DBTC mode
Add dbtc support for NSS offload mode.

Change-Id: I3673c0a42071f7d7767e086618c0171658e8a6f0
CRs-Fixed: 2330655
2018-11-21 22:59:16 -08:00
Harprit Chhabada
9f5e60128f qcacmn: Fix OOB read in init_deinit_handle_host_mem_req()
num_mem_reqs used as for loop vairable in init_deinit_handle_host_mem_req,
will give user control over tgt_hdl->info->num_mem_chunks used in
init_deinit_alloc_host_mem()  which is later passed to
init_cmd_send_tlv().

In init_cmd_send_tlv() num_mem_chunks is used as a for loop variable,
and can result in OOB issue.

Change-Id: Ica9bd42e596da19a4033ffd9424ddeedb593bad1
CRs-Fixed: 2331844
2018-10-19 10:49:20 -07:00
Pratik Gandhi
8af026a2ca qcacmn: Abstract BMI and add export symbols for ko separation
Abstract BMI callback from common module and move it to specific component.
Add Export symbols to support modularization in WIN. (BMI)

CRs-Fixed: 2324081
Change-Id: I1ec463d41d238ce81254ecc1f0bb1dc545e1248e
2018-10-18 06:32:45 -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
Gyanranjan Hazarika
2c54581814 qcacmn: Changes for BSS Color Enahancement FR40903
1. QDF_MODULE_ID_BSSCOLOR added for logging
2. BSS Color Offload supported trace added
   as target_if_info

Change-Id: I00db87f6619f7857dd83cf1eb5d805780c501805
CRs-fixed: 2242109
2018-10-05 22:10:06 -07:00