Commit Graph

123 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Surabhi Vishnoi
d2c2a6aec6 qcacmn: Add support for CFR in adrastea target
Add the init and deinit CFR pdev api for adrastea target type.
cfr_adrastea_init_pdev api enables the CFR feature if both host and
firmware supports the feature, initialises the cfr pdev structure
and streamfs.

Also during allocation of memory requested by firmware, skip smaller
chunks memory allocation for CFR capture requested memory as firmware
expects contiguous memory.

Change-Id: Ib893dc8a845fea990a11e95e98d8a656f7df12ba
CRs-Fixed: 2687057
2020-06-29 19:15:56 -07:00
Rachit Kankane
4d124bfb1d qcacmn: Set preferred mode per target
Set preferred HW mode by default to HW_MODE_DETECT or HW_MODE_MAX
based on target type, also update preferred hw mode and num_band_to_mac
accordingly.

Change-Id: Iab231b182b54af15d09714e6cf3426c145d4ac3c
CRs-Fixed: 2711504
2020-06-26 05:37:38 -07:00
Shashikala Prabhu
a76f88adb8 qcacmn: Add support to populate target 11AX wireless modes
Add support to populate 11AX wireless modes advetised in ext2 service
ready message. To support older FW that do not advertise this, use
existing host workaround to populate these in host  itself.

Change-Id: I3b3b280672592c858bd3f6f0e368909a16bd30ee
CRs-Fixed: 2650136
2020-06-08 18:37:03 -07:00
Abhishek Ambure
23dab4b3a5 qcacmn: Add support to send max ndp sessions to fw
Firmware advertises max number of ndp sessions support in
wmi_service_ready_ext2 event. If the firmware advertised value of
max ndp sessions is non-zero, then host uses a minimum of max ndp
sessions of target_resource_config and firmware advertised max ndp
sessions to configure max ndp sessions in firmware using WMI_INIT_CMD.

Change-Id: Ied6891157ce589e5d36a4f8b9694a95b5c819ad6
CRs-Fixed: 2688393
2020-06-08 16:01:08 -07:00
Aditya Sathish
a88235db0e qcacmn: Add support for FW cap for chan_width_switch_cmd
WMI_PEER_CHAN_WIDTH_SWITCH_CMDID sent from host fragments the
command based on the size of the WMI buffer.

Add support to instead use a FW regulated value taken from the
WMI service ready extended_2 event.

CRs-Fixed: 2684788
Change-Id: Iaeccf785c64b385bf2ad6bc372da239981143fa0
2020-05-21 23:52:25 -07:00
Prathyusha Guduri
dcb2fc98f6 qcacmn: Add Tx desc limit check for exception packets
Soc level exception descriptors limit is sent from FW in WMI service
ready TLV. Using that to check for exception packets limit

Change-Id: I99d20ecbb6a5bfd61b5a8a205775d34749eae880
2020-05-13 06:46:01 -07:00
Nandha Kishore Easwaran
c6ca857257 qcacmn: Support for IPQ8074 2G PHYB mode 1/3
This mode is supported through hw_mode_id 7. A special mode for
IPQ8074 platform alone to bring up single pdev alone on 2G mode.
FW would advertise the mode 7 support through the WMI service
ready message and this mode will be the default mode for AP-HK10 alone.

Added a function to update the svc_id mappings for this mode as FW
requires WMI commands to be received through CE 7 for this mode.
Also adjusted the preferred mode precedence to give high precedence
to mode 7.

Change-Id: Id637c59e9528779e38737b7d74b000abf2e9db9d
2020-04-08 13:43:14 -07:00
Shashikala Prabhu
3aa150756b qcacmn: Use restricted 80+80 MHz service bit instead of 165 MHz
For restricted 80+80 MHz FR, target team initially added
wmi_service_bw_165mhz_support to indicate the target is capable of
supporting restricted 80+80 MHz.
Later, they have added wmi_service_bw_restricted_80p80_support to indicate
the same. Therefore rename wmi_service_bw_165mhz_support as
wmi_service_bw_restricted_80p80_support.

Change-Id: I12229b5d35911d4c34e63902c09592187d902bed
CRs-Fixed: 2621249
2020-02-14 10:46:07 -08:00
Shashikala Prabhu
29aca291c5 qcacmn: Add WMI support for native 160MHZ
A service bit is added to indicate Firmware supports sending NSS ratio
information to Host and Host receives the NSS ratio information from
Firmware as part of service ready ext event. Save this service bit in
soc's extcap feature bit. Extract the NSS ratio info from service ready
ext event and save the results in wlan_psoc_host_mac_phy_caps structure
to calculate NSS value.

Change-Id: I8fbee48d872b0724bbb629ad38b3c959736a3c39
CRs-Fixed: 2612959
2020-02-07 20:06:29 -08:00
Sourav Mohapatra
d6b3fee9b3 qcacmn: Rectify fetching PDEV before creation
In the change I0165f3bd4638280b45ad54391319806fba62e2fe, driver tries to
fetch the PDEV in init_deinit_handler before it is created in MCC. This
can cause driver init to fail.

Move the fetching of the PDEV to after the PDEV is created.

Change-Id: I028ac14da333084ce68f03f3d3771cdb6298933b
CRs-Fixed: 2611379
2020-01-31 08:38:48 -08:00
Shashikala Prabhu
8533bb54fe qcacmn: Add API to set/get number of monitor vdev counts in pdev
Add API to set/get monitor vdev count in pdev object.

Also update the max peer count in pdev and psoc when FW allocated peer
count is different than host requested.
Number of vdevs and beacon tx offload max vdevs in wlan_res_cfg are updated
in target_if_update_pdev_tgt_info().

Also, add radio related parameters to get number of vdevs and peers per
psoc and pdev.

Change-Id: I0165f3bd4638280b45ad54391319806fba62e2fe
CRs-Fixed: 2600984
2020-01-27 12:44:51 -08:00
Neha Bisht
5f25cbe8f2 qcacmn: remove fw headers in init_deinit component
Avoid direct fw headers usage in init_deinit component since
can have functional impacts. The inclusion is done at wmi level 
to fix the inconsistency of code. 

Change-Id: I73cc1aac500cec041de81750b9c7654d21344e6c
CRs-Fixed: 2505399
2020-01-19 23:40:21 -08:00
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