提交图

601 次代码提交

作者 SHA1 备注 提交日期
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Surya Prakash Raajen
7e56ece9a9 qcacmn: Decouple legacy FW headers
Decouple legacy FW headers for lithium builds since
its not required for the same

CRs-Fixed: 2719782
Change-Id: Ibdfdec51c5379fe42e23bf04a228ae6fb1a3eac9
2020-07-07 07:25:03 -07:00
Samanth Manjunath
53ffdd36b9 qcacmn: WLAN SON related functions cleanup
Code clean up and removal of WLAN SON related functions
which were unused.

Change-Id: Icb4fddc9ca9dee8735e91f6772d9978b69a01726
CRs-Fixed: 2703210
2020-07-03 15:00:37 -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
Lincoln Tran
a86b23ee68 qcacmn: Update scheduler_msg callback type
This fixes a CFI failure in callback assignment.

Currently, the callbacks in scheduler_msg are void function
pointers. Update them to have a defined type as
scheduler_msg_process_fn_t to catch type mismatch during
compilation.

Other changes to conform to this new type include:
	1. Cast callback to qdf_mc_timer_callback_t when
	   referencing, and back when assigning
	2. Cast wlan_serialization_generic_timer_cb to
	   take fit into scheduler_msg
	3. Cast target_if_vdev_mgr_rsp_timer_cb to fit
	   into scheduler_msg

Change-Id: I052bc54826d377ae92f5bcc80ca08afb6f5e01e3
CRs-fixed: 2719975
2020-06-27 06:18:28 -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
Jayachandran Sreekumaran
f71f32ada9 qcacmn: iot_sim code cleanup
Optimize the content change operation
code for action and non-action type frames.

Change-Id: Ie3719715eebbe465851f4b84ffb6deefbab81844
CRs-Fixed: 2684013
2020-06-24 03:34:48 -07:00
Abhishek Ambure
080bb9eeb9 qcacmn: Enable spectral scan support for QCA6750
Enable host support of spectral scan for QCA6750 target.

Change-Id: I0629e6f4563bd42ca07b7c5d82a71b8198b48c07
CRs-Fixed: 2702868
2020-06-18 03:44:04 -07:00
Edayilliam Jayadev
e3b05ae8ae qcacmn: Initialize start scan related parameters before sending WMI command
Host maintains a flag variable for ensuring that the start scan
response WMI event is received from FW before the spectral reports.

Following are the expected sequence of operations.
	1) is_resp_event_received = false
	2) start scan WMI command
	3) start scan response WMI event
           (is_resp_event_received is set to true here)

Current sequence of operations are the following.
        a) start scan WMI command
        b) is_event_received = false

If the start scan response WMI event is received in between a) and b)
there is a possibility that the flag is_resp_event_received is overwritten
to false by b). This can lead to an assert during the spectral
report processing.

CRs-Fixed: 2708320
Change-Id: I18020bf866b9cb3a3cc64df56398d751c91dd2f2
2020-06-16 16:23:45 -07:00
Edayilliam Jayadev
fb564225fb qcacmn: Check agile frequency forms a valid 80+80 channel
For agile scan request in 80 + 80 MHz check whether the user given
agile frequency forms a valid 80+80 channel.

CRs-Fixed: 2690964
Change-Id: Ia374333118d4f06861a1cfe0a75db349bca9e879
2020-06-09 06:29:08 -07:00
Lincoln Tran
01b486c6a3 qcacmn: Revert target_if_vdev_mgr_rsp_timer_cb
Revert the change for target_if_vdev_mgr_rsp_timer_cb
from change I760b41b81c006187efb162d410390e1c11878b82.
The change introduced a CFI error because timer
callbacks do not expect a return status.

Change-Id: I7502493b08d1a8bdb847e2c47165880143a6d708
CRs-fixed: 2685628
2020-06-09 06:29:05 -07:00
Edayilliam Jayadev
fd38ce125c qcacmn: release spinlock in the exit path
spinlock is not released in one of the exit paths
of target_if_start_spectral_scan function.
Fix it by releasing the spinlock before return.

CRs-Fixed: 2699762
Change-Id: I012c4151b3968ffbedb68eba64b30bc4c08cf44f
2020-06-09 01:00:33 -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
Shashikala Prabhu
d6fbcdd4e7 qcacmn: Do not dereference the NULL rx_ops pointer
Do not dereference the NULL rx_ops pointer.

Change-Id: I999f3876801b61014aedb59402d2816627d0f28a
CRs-Fixed: 2702455
2020-06-08 10:30:32 -07:00