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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Add wrapper functions to get the host pdev id from target pdev id and
vice versa.
Change-Id: Ib10f6f5625b4a9e1f44a13e9185de75f6df88b3c
CRs-Fixed: 2711423
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
Decouple legacy FW headers for lithium builds since
its not required for the same
CRs-Fixed: 2719782
Change-Id: Ibdfdec51c5379fe42e23bf04a228ae6fb1a3eac9
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
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
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
Optimize the content change operation
code for action and non-action type frames.
Change-Id: Ie3719715eebbe465851f4b84ffb6deefbab81844
CRs-Fixed: 2684013
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
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
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
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
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
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