Commit Graph

463 Commits

Author SHA1 Message Date
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
Santosh Anbu
99028d078d qcacmn: Support multivdev restart response handling
Add TGT_IF change to support consolidated multi vdev restart
response handling.

Change-Id: I8d507dda8f39d36102a7aa7a7baf425335097047
CRs-Fixed: 2595769
2020-01-17 01:21:57 -08:00
Linux Build Service Account
2729e6d5d9 Merge "qcacmn: Fix WMI event registration context" 2020-01-12 23:38:38 -08:00
Naga
cb4e5140f4 qcacmn: Fix WMI event registration context
Fix WMI event registration context for peer
delete all event.

Change-Id: I310c5f4f0ea1d52d7d02adbbf22c70322c1bb1ea
CRs-Fixed: 2597430
2020-01-12 22:29:50 -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
Manoj Ekbote
b91d7bee26 qcacmn: Store DBR pdev objects in psoc
In dynamic HW mode switch feature, DBR pdev object of primary device
needs to be re-assigned after HW mode change. Store the DBR objects
in psoc for all devs and then use the mapped pdev to retrieve the
corresponding DBR object.

Change-Id: Ie56bdf9d430a5a3ca7e4e9a872018257d032c908
CRs-Fixed: 2589447
2020-01-02 13:09:39 -08:00
Pavankumar Nandeshwar
61392d0275 qcacmn: cmn_ops changes in umac, tgt_if for umac-dp decoupling
umac and tgt_if module changes due to umac-dp decoupling changes in
cmn_ops APIs.

Change-Id: If8a7bdb879660f1d15a067ce9c76f96e6dfb7140
2019-12-27 03:25:25 -08:00
Ashish Kumar Dhanotiya
89029e4d9e qcacmn: Send CTL info to firmware
In regulatory non-offloads feature, send conformance_test_limit_2G,
conformance_test_limit_5G, reg_domain, reg_domain_2G and reg_domain_5G
information to firmware using WMI_PDEV_SET_REGDOMAIN_CMDID.

If all these attributes are not populated then CTL power limit is
not applied by the firmware.

Change-Id: I1523ab447aec64ec0af42da32318136f90fd17ca
CRs-Fixed: 2518246
2019-12-26 11:38:36 -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
Yue Ma
4b48131ce2 qcacmn: Clean up wmi.h in target_if_scan.c
Add WMI unified APIs to extract PNO related WMI events in order to
remove wmi.h inclusion in target_if_scan.c.

Change-Id: I7fd28f175de002b48c294783f69b819ce2f3e37a
CRs-fixed: 2519032
2019-12-13 07:03:53 -08:00
Akshay Kosigi
28d1d127aa qcacmn: Use correct vdev_id to fetch the vdev_rsp timer info
Fetch correct vdev_rsp timer info in case of multivdev restart case
using the right vdev_id.

Change-Id: I0d9cbb886ffcc66ada354e6db2b084beb2417bcb
2019-12-13 01:59:55 -08:00
Edayilliam Jayadev
b3a66311cc qcacmn: Add Agile channel width to SAMP message
Add a new member to SAMP structure describing the channel width of
Agile Spectral scan.

Change-Id: Ib27fe9ed63bf8f89c59762150fb58943e6bcf7ea
CRs-Fixed: 2582670
2019-12-12 18:14:27 +05:30
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
Hariharan Basuthkar
379ebfe4e3 qcacmn: Use channel frequency instead of channel number
1) Add the API wlan_reg_get_5g_bonded_channel_and_state_for_freq
   that returns  the state for a 5G or 6G channel frequency,
   based on the channel width and and state of the bonded channels.

2) In the API target_if_calculate_center_freq, remove the instances
of IEEE channel number, and provide regulatory support, with the
channel frequency based structure - bonded_channel_freq and the API -
wlan_reg_get_5g_bonded_channel_and_state_for_freq.

3) Remove the usage of band_info and replace it with reg_wifi_band within
the target_if of the spectral module.

Change-Id: If5108b55097208d33fafb48968ea8b6dc83011fa
CRs-Fixed: 2571906
2019-12-09 20:38:52 -08:00
Pooventhiran G
9a1b59247c qcacmn: Reset keys to zero after use
In functions that use key values, reset the local variables (key) to
zero after use to avoid security vulnerability.

Change-Id: I105b1abf7c707102ef99bbe4fa213708039d933e
CRs-fixed: 2581402
2019-12-09 18:57:51 -08:00
Yeshwanth Sriram Guntuka
65d547730f qcacmn: Cleanup local peer id from DP APIs
Local peer_id is being cleaned up across DP, HDD and PS/WMA.
So, any references to local peer_id/sta_id will be replaced
by peer mac address and all interactions between the layers
will be based on peer mac address.

Cleanup local peer id usage from DP APIs.

Change-Id: I930e1c6a09092a373c093239632d6f310fee18e2
CRs-Fixed: 2529041
2019-12-06 01:52:16 -08:00
Akshay Kosigi
71d3820a97 qcacmn: Move vdev_mlme timers to psoc_mlme
Add code to change the vdev_mlme timers to psoc_mlme timers
and also change code to send vdev_delete to FW while physical
destruction of vdev obj.

Change-Id: Ie041182155c75d0cc3825dc97b26abc6be38d76c
CRs-Fixed: 2563931
2019-12-05 11:50:53 +05:30
Arun Kumar Khandavalli
eaac8c195b qcacmn: Move wakelock to psoc level
Wakelock is system level lock not required to be taken
for every vdev, Hence move the wakelock to the psoc
hierarchy.

Change-Id: I525baf5f4b5dcadb493d84900dbd0a2e7c6407f6
CRs-Fixed: 2563406
2019-12-05 10:46:33 +05:30
Arun Kumar Khandavalli
614d1e4476 qcacmn: create the vdev response timers in psoc_mlme
Move the vdev response timer from the vdev object manager structure
to the psoc mlme structure.

Change-Id: Ieb87ac6549aa23e0beb61441fea459d3db78c2f3
CRs-Fixed: 2563410
2019-12-05 10:45:08 +05:30
Pavankumar Nandeshwar
7c7089627e qcacmn: tgt_if changes for removal of ctrl_path handles
Remove the ctrl_path handles from tgt_if module

Change-Id: I32242dc9e66a377bb04bd537999eb86aad375ca7
2019-12-04 07:44:51 -08:00
Shwetha G K
7887593414 qcacmn: Log Spectral FFT timestamp WAR parametrs
Log Spectral FFT timestamp WAR related parameters

Change-Id: I11e3107f41049e9fb05c3f9f7960279b88392598
CRs-Fixed: 2556803
2019-12-03 04:52:57 -08:00
Shwetha G K
389eae6224 qcacmn: Check discrepancies in Spectral timestamps
If the timestamp field in the current Spectral report is equal to the
timestamp field in the previous report, assert the FW.

Change-Id: Idb32807f0cdd59a2eaab5dd6c1e62567fd5a45d0
CRs-Fixed: 2478593
2019-12-03 03:26:32 -08:00
Shwetha G K
8db4b4ac32 qcacmn: Control path support for Spectral DMA debug
All gen III chipsets use Direct-DMA mechanism to copy Spectral reports to
the Host for further processing. This mechanism involves ring and buffer
management in the Host, FW, and uCode, where improper/incomplete DMA and
improper tail update issues are seen. DBR framework provides support to
debug such issues. Add Spectral control path support to facilitate the
configuration of these debug options.

CRs-Fixed: 2478596 2478595
Change-Id: I094616c4137145389b6984ccab933e5ebd0aa1ab
2019-12-03 03:26:22 -08:00
Liangwei Dong
49472056b2 qcacmn: Enable Fils Discovery frame sending in 6GHz SAP
To enhance visibility of 6GHz AP, 6G only AP shall send
Fils Discovery frame periodically in one beacon interval.

Change-Id: I51487380fca10418d2260dc2612e2adcf6cbb93b
CRs-Fixed: 2562434
2019-12-02 05:22:42 -08:00
Shwetha G K
0c000df15e qcacmn: Add poisoning support for Spectral DDMA buffers
All gen III chipsets use DDMA method to copy the spectral reports to
the Host. It is possible that the buffers can be improper/incompletely
DMAed, which leads to wrong values being present in the Spectral report.
To detect improper DMA, the DBR framework has the support to poison the
buffers before handing them over to the target. This framework expects
the buffer owner modules to check for poison values in key fields.
So, validate the Spectral reports and assert the target upon failure.

Change-Id: I519bf8abd87cfc9758fe7d126a195f39656d8ecc
CRs-Fixed: 2478592
2019-12-02 00:43:04 -08:00
Shwetha G K
29121213c8 qcacmn: Add debugfs support for DBR ring debug
For each DBR ring, add debugfs entry to dump at real-time the ring
parameters like head, tail index, the timestamps at which a buffer is
received and replenished. Issues that are specific to tail index
movement from the target can be identified with this debugfs entry.

CRs-Fixed: 2466514
Change-Id: Iafbc61726264464212cb783a1cce46e16b8a48ff
2019-12-02 00:42:54 -08:00
Shwetha G K
215bac70f5 qcacmn: Add poisoning support for DBR buffers
Improper/incomplete DMA by the target affects the functionality of modules
that are using DBR framework. Add debug infrastructure to poison DBR
buffers with a given poison value before handing buffers over to
the target. Buffer owner modules can explicitly check for the poison
value in order to detect the improper DMA.
All modules that use DBR framework can use this debug infrastructure.

Change-Id: Ib3923c13202990e0f1198645b680c44a20736167
CRs-Fixed: 2466518
2019-12-02 00:42:41 -08:00
Shwetha G K
df696de7cc qcacmn: Add support to track DBR ring index movement
Add debug infrastructure to track the movement of head and tail pointers
of the DBR ring along with the time at which each buffer is received and
replenished. All modules that use DBR framework can use this
infrastructure. Issues that are specific to tail index movement from
the target can be identified with this debug infrastructure.

CRs-Fixed: 2439460
Change-Id: I6b486a73cf6a3174dfa297f8fb370fd298b46b67
2019-12-02 00:42:31 -08:00
tinlin
21f7286344 qcacmn: Add MIB statistics
Add new stats_id WMI_REQUEST_MIB_STATS &
WMI_REQUEST_MIB_EXTD_STATS in WMI_REQUEST_STATS_CMDID
to retrieve MIB statistics from fw.

Change-Id: I17bccc2673d1a2ce035db04d8426bab49db80790
CRs-Fixed: 2548165
2019-12-01 17:42:21 -08:00
Edayilliam Jayadev
52c9b9fe51 qcacmn: Hard code properties of Spectral parameters
Till a FW advertisement which specifies the properties of
Spectral parameters is in place hard code these values
in driver.

CRs-Fixed: 2569385
Change-Id: I02c042946ff30771df6a66f49004c01aa5d53ac0
2019-11-26 02:15:52 -08:00
Edayilliam Jayadev
f3cc90e236 qcacmn: Check aSpectral capability for current chainmask
Reject Agile Spectral scan request if the current chainmask
doesn't have Agile capability.

CRs-Fixed: 2565027
Change-Id: I0ac79f9846ef015ec16500ae29528c8e5d03da3e
2019-11-20 10:44:54 -08:00
Jianmin Zhu
7ec8548fe6 qcacmn: Fix uninitialized parameters in cmn
fix uninitialized parameters in cmn

Change-Id: Ice6e9ab0a337de04a693615c607f0d5c4019defe
CRs-Fixed: 2559018
2019-11-17 01:39:35 -08:00
Edayilliam Jayadev
68c2881b76 qcacmn: Init Agile Spectral capability based on HW generation
Initialize Agile Spectral capability from chain mask table for
3rd Spectral generation chipsets onwards. Chipsets before 3rd
generation doesn't support Agile Spectral.

CRs-Fixed: 2566328
Change-Id: I46fa7a9232f610fce06cffd67d81a59b7d6fead4
2019-11-16 03:51:20 -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
Jianmin Zhu
367c36003b qcacmn: Handle vdev start stop delete event in mc thread
vdev start/stop/delete event need be handled in mc thread to
avoid race condition issue.

Change vdev start/stop/delete event handler as static

Change-Id: I360c3b34a18c41c506179225168d3bb490fc8823
CRs-Fixed: 2554731
2019-11-01 08:17:42 -07:00
Guisen Yang
2b07141773 qcacmn: Fix the build failure of illegal usage of log
In function target_if_direct_buf_rx_register_events(), the
API direct_buf_rx_info() is used to record log, but the
format is wrong. Fix the log format.

Change-Id: I81bc128e110570d96ca95dfbe773121272eb2588
CRs-Fixed: 2547235
2019-10-28 04:16:27 -07:00
Wu Gao
5988e8b7d2 qcacmn: Remove unnecessary logs in loop
There is unnecessary logs in loop which affect useful log capturing.

Change-Id: I37b2c8123a280e4ec080ac1fb75e43135936fd79
CRs-Fixed: 2552104
2019-10-27 19:27:56 -07:00
Krishna Rao
5304724e59 qcacmn: Add Agile Spectral frequency to Spectral SAMP message
Add Agile Spectral frequency to Spectral SAMP message and populate the
same. This coexists with the pre-existing operational frequency in
SAMP message for the sake of flexibility.

Change-Id: Iadb8efeaac924df5b0ac9a83f630206b2ef93052
CRs-Fixed: 2545763
2019-10-27 17:28:49 -07:00
Yue Ma
93fe6e55b4 qcacmn: Add WMI unified header file for crypto
The header file will contain WMI API definitions specific to
crypto component.

Change-Id: I97a3366e66bc424a820cdc02e6a17571ad89c737
CRs-fixed: 2533529
2019-10-21 21:31:37 -07:00
Bala Venkatesh
00a0c37e87 qcacmn: Update the vdev_id in the vdev_chain_rssi stats
In tgt layer, rssi_stats are copied by comparing the vdev id
filled in the target layer and last reqested stats vdev id.
But in target layer api, target_if_cp_stats_extract_vdev_chain_rssi_stats
vdev id is not filled and that can lead to wrong stats in the upper
layers.

Update vdev id in the rssi stats.

Change-Id: I6a8bd032152b43b90ffd4acfc760e218bf4bba5b
CRs-Fixed: 2530148
2019-10-15 06:45:06 -07:00
Rajeev Kumar Sirasanagandla
816b503c44 qcacmn: Ignore regulatory offload indication from FW
Based on the ini "ignore_fw_reg_offload_ind" ignore regulatory
offload indicatin from fw.

Change-Id: Ia95b5bdda6ee1fcc2b07f28f997a7c80afcbc32b
CRs-Fixed: 2533001
2019-10-12 19:03:56 -07:00
Aditya Sathish
fbf9ece75d qcacmn: Rename TX_DECAP_TYPE to TX_ENCAP_TYPE
The macros attributing the Tx encap type have been erroneously
named as TX decap.

Rename all occurences of TX_DECAP_* to TX_ENCAP_*. Also add support
to send WMI vdev params for tx_encap and rx_decap values.

CRs-Fixed: 2533710
Change-Id: Id6ef2955868010b264e76d2a416d22d30d2acedc
2019-10-10 22:59:18 -07:00
Edayilliam Jayadev
454c6d7be3 qcacmn: Restrict Agile Spectral start scan in SBS mode
Ensure that at a time only one Agile Spectral scan is
happening across all the 5G pdevs in SBS mode.

CRs-Fixed: 2517522
Change-Id: If31a4451b82ce1d7d8a46bc604ca91bf4b6dac29
2019-10-06 23:54:53 -07:00
Edayilliam Jayadev
b38cb7a8f0 qcacmn: validate user given agile center frequency
Validate user provided agile center frequency and throw
an error if it is invalid.

CRs-Fixed: 2529280
Change-Id: Ibb43dda98d29d8bc8360d1a204c67b64ca987ca6
2019-10-03 12:34:44 -07:00
Nisha Menon
5acef23430 qcacmn: Assert due to excessive logs
Exceeded 500 logs per second in target_if_get_dbr_data().
Move the info level logs to debug level in direct buf rx as
heavy logging is triggering an assert.

Change-Id: I725bd50f83dc65f4e5378c4a882829a0ad1b7893
CRs-Fixed: 2534298
2019-10-03 00:21:04 -07: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
Krishna Rao
54a3931f9f qcacmn: Add and populate Spectral pri80 indication
Spectral generation III hardware sets the Spectral primary 80 MHz
(pri80) indication in Spectral Summary reports to inform software
whether the Spectral sample was gathered on the primary 80 MHz
segment. But this may also be set in the case of Spectral scans
intended to be carried out on the Agile frequency or secondary 80 MHz,
due to a channel switch of the Spectral chain from Agile/secondary 80
MHz to primary 80 MHz. Software can ignore samples for which the pri80
indication is set for Agile mode or for secondary 80 MHz in normal
mode.

Add and populate fields for pri80 indication, one intended for primary
80 MHz/Agile and the other for secondary 80 MHz.

CRs-Fixed: 2524733
Change-Id: If592d664cebfe1e08026e55d4031c74d9a9db2e0
2019-09-28 23:41:01 -07:00
Abhishek Ambure
f1feeae916 qcacmn: Flush target_if response timers for vdev
Flush target_if response timers for vdev for given psoc. This API
used to flush target_if response timers for vdev while wlan driver
shutdown.

Change-Id: I1700893cdf0b0eb9d3419505c88c71fc86da0dab
CRs-Fixed: 2529284
2019-09-27 05:20:33 -07:00