Commit Graph

170 Commits

Author SHA1 Message Date
Linux Build Service Account
0bc90ed6d4 Merge "qca-wifi: Add support for 160MHz precac tree" 2020-03-24 05:53:44 -07:00
Linux Build Service Account
ff323f757d Merge "qca-wifi: Handle capture interval and capture duration for RCC" 2020-03-24 00:13:59 -07:00
Linux Build Service Account
a8200ea0e5 Merge "qca-wifi: RCC cannot coexist with M_TX_ACK mode" 2020-03-24 00:13:58 -07:00
Linux Build Service Account
ed8f61c5c1 Merge "qcacmn: Add protection while accessing cfr lookup table" 2020-03-23 10:40:55 -07:00
Adwait Nayak
c7c91947c2 qca-wifi: RCC cannot coexist with M_TX_ACK mode
Coexistence of RCC and M_TX_ACk mode is not supported

Change-Id: Ib5b5432f991e0cf5213f2d630f9322a3603ed088
2020-03-22 10:15:32 +05:30
Adwait Nayak
25eea0893c qca-wifi: Handle capture interval and capture duration for RCC
FW may limit the interval and duration during which HW may
use user provided values and attempt to capture.
These values range from 1 us to roughly 16.8 sec.
Max value is 0xFFFFFF which is 16.777215 sec.

Add check to make sure that capture duration cannot exceed
capture interval.

Change-Id: If6f75c737f8ac8cda527eee60f0e67d75e3b5420
2020-03-20 13:49:49 -07:00
Vignesh U
7a47973638 qca-wifi: Configure 165MHz Agile channel
The FW has updated the wmi command wmi_vdev_adfs_ch_cfg_cmd_fixed_param so
as to configure the restricted 80p80 channel as the Agile channel.

Add support in ADFS parameter to enable the 165MHz channel as the Agile
channel.

Change-Id: I757bbd9b209118f19e51b7a95881124000f362c8
CRs-Fixed: 2642555
2020-03-20 06:56:50 -07:00
Vignesh U
a5540082df qca-wifi: Add support for 160MHz precac tree
Rebuild the precac tree with 160MHz root channels. Add support to mark the
160MHz precac channel nodes as CAC done and NOL.

Go through the list of available channels to find the unique PreCAC Tree
roots. Find the root channels that are not part of the 160MHz channel.
Example, consider a case where a country supports only until channel 144,
then the precac tree will have two 160MHz root nodes(36HT160, 100HT160) and
one 80MHz root node(132HT80).

Add support include the 165MHz channel to the precac tree for Pine by
considering the 165MHz channel as a 80p80MHz channel with a center channel
number 146. Adjust the channel frequency offset to mark the 165MHz
channel as precac done and NOL.

When a 160MHz or the 165MHz channel encloses a nonDFS channel, mark that
nonDFS channel as precac done.

Change-Id: Ia9bb2cc5c845c4d636e35329cdf76ace2eb63c72
CRs-Fixed: 2628373
2020-03-20 06:56:26 -07:00
Padma Raghunathan
c68c9e44b3 qcacmn: Add protection while accessing cfr lookup table
Protect access to cfr lookup table, since error handling
mechanism attempts to cleanup CFR entries in timer context,
this leads to contention between bottom-half and timer.

Change-Id: I6a414e0da883250a90451824367c12fcca33c27e
2020-03-20 13:42:36 +05:30
Vignesh U
2935efd278 qca-wifi: Change the current-channel-width to agile-channel-width mapping
For Pine, the agile channel width needs to be 160MHz when the current
channel width is 160MHz or restricted 80+80MHz.

Change-Id: Id1339400c6e86daf9febe364de62be42c9732f14
CRs-Fixed: 2628370
2020-03-19 04:31:45 -07:00
Vignesh Mohan
764dcecbb9 qca-wifi: Assign agile detector id based on true 160MHz
For Pine chip, where true 160MHz (single detector for 160MHz)
is supported, the agile detector ID is 1 (instead of 2 for
chipsets like Hawkeye with two primary 80MHz detectors).
Assign the dfs_agile_detector_id to the proper value based on
true 160MHz capability.

Introduce a new API to get the agile_detector_id based on the
chip's capability. Use the new API to get the agile_detector_id
instead of using the existing enum.

CRs-Fixed: 2637793
Change-Id: I8033e541c09632a9e4c7be1a5067d1dbcedd0d48
2020-03-14 02:57:48 -07:00
Linux Build Service Account
3090979e4b Merge "qca-wifi: Reset "dfs_agile_precac_freq_mhz" after radar detect" 2020-03-04 07:07:33 -08:00
Linux Build Service Account
332fe12c3c Merge "qca-wifi: Add a new API to exclude channels for preCAC" 2020-03-03 22:17:34 -08:00
Vignesh Mohan
9d35cca695 qca-wifi: Add a new API to exclude channels for preCAC
While excluding the current operating channel for preCAC, the
entire tree is skipped if the current operating channel is selected
by the algorithm. In case of a tree node with two 40MHz nodes, if the
selected channel is the current operating channel but the other 40MHz
channel is still pCAC required, that channel should be selected.

To achieve this, move the logic, of excluding the current operating
channels, inside the tree traversal algorithm.

CRs-Fixed: 2621410
Change-Id: Ib8ea3dea168d27ea98a0bf2a9ea1eb57872b285f
2020-03-03 12:45:18 -08:00
Jeevan Kukkalli
ca2eea84a4 qca-wifi: Revert "qca-wifi: Handle multivdev restart request failure"
This reverts commit 45f510a90868226282a1a5cf5e2193a00ab8ff13.

Change-Id: I56d897856c4b71f73686fb038e35229a864f4285
2020-03-03 20:30:56 +05:30
Priyadarshnee S
96dd43c073 qca-wifi: Reset "dfs_agile_precac_freq_mhz" after radar detect
Issue:
Bring up the AP on channel 100 HE80 in ETSI domain and enable preCAC config
(option preCACEn 1). The AP begins CAC on channel 100 and does preCAC
on the channel 58 (the first HE80 channel in the preCAC list). The default
preCACtimeout is 6 min.  Inject radar on channel 100 using bangradar.
AP does a VDEV RESTART to a new random channel (say 36) and aborts
preCAC on channel 58. After VDEV RESTART on new random channel (say 36),
AP chooses a new random channel to do preCAC and marks channel 58 as
preCAC done. Channel 58 can be marked preCAC done only after 6 min
of CAC completion. However, within 6 min, if primary channel detects
radar, channel 58 incorrectly marked as preCAC done.

When primary channel 100 is marked as NOL, "dfs_agile_precac_freq_mhz"
(the variable that holds the value of the last agile frequency)
which was assigned 5290MHZ (chan 58) is not cleared.
"dfs_agile_precac_freq_mhz" continues to hold the preCAC channel freq
5290. After VDEV RESTART to new random channel (36), preCAC is initated
again invoking dfs_start_agile_precac_timer() using a zero second
timer. As "dfs_agile_precac_freq_mhz" is not 0,
dfs_mark_precac_done_for_freq() marks channel 5290 (58) as preCAC done.

Solution:
To solve the issue mentioned above, reset "dfs_mark_precac_done_for_freq"
to 0 on radar detect so that preCAC done channel is not marked
incorrectly.

Change-Id: If6dae4b3527f060d5512d82ebd437ea1b6db1425
CRs-Fixed: 2631779
2020-03-03 03:58:43 -08:00
Linux Build Service Account
b8a344d2df Merge "qca-wifi: CFR: Update RCC specific debug counters" 2020-02-29 01:06:14 -08:00
Linux Build Service Account
3d7cabd566 Merge "qca-wifi: Handle multivdev restart request failure" 2020-02-28 06:11:38 -08:00
Adwait Nayak
412cc0e7e1 qca-wifi: CFR: Update RCC specific debug counters
RCC specific debug counters has been moved to DP layer.

Update capture BW from RXTLV instead of VDEV
Capture BW is the bandwidth at which Station operates.

Error handling for pdev referencce count.
Add support to clear CFR ppdu counters
Use same event ENUM for HKV2 and Cypress.

Change-Id: Ic1f5da16c5c1ac5893dce1023eb57f96d78d4cfa
2020-02-25 12:17:35 +05:30
Santosh Anbu
eb69985553 qca-wifi: Handle multivdev restart request failure
When multivdev restart request fails due to any reason, the
same is not notified to the vdev state machine. Due to VDEV
SM is stuck in restart state indefinitely.

Handle multivdev restart request failure by dispatching
RESTART_REQ_FAIL event.

Change-Id: I1cdbcf8efb5cd51e803cef4a8980d1276c410e13
CRs-Fixed: 2622197
2020-02-21 10:38:07 +05:30
Adwait Nayak
862792aa58 qca-wifi: CFR: Fixes during initial WMI being sent to FW
1. Change the default values of TA\RA entries

Host sends out one default RCC setting to FW during
the initialization of target specific CFR component.

Change the default setting of TA, RA address from
00:00:00:00:00:00 to FF:FF:FF:FF:FF:FF and TA_MASK and RA_MASK
should be 00:00:00:00:00:00. This will avoid
the scenario where the system will allow all packets
irrespective of the filter settings provided by the user.

2. In case default configuration is being sent to the FW
successfully during CFR init, those configurations will
be updated as part of global config. So that it can be
reflected as part of rcc_config_details command.

3. Code clean up

Change-Id: I719ddeee48f14992b2210562596b1ea3d61fcc1c
2020-02-20 17:51:08 +05:30
Linux Build Service Account
dd73cd9b86 Merge "qca-wifi: Add multivdev restart wait timeout" 2020-02-19 04:13:44 -08:00
Linux Build Service Account
962957f5b6 Merge "qca-wifi: CFR: Introduction of new flag to enable RCC" 2020-02-17 03:53:37 -08:00
Himanshu Batra
a24e7b7d12 qca-wifi: Add multivdev restart wait timeout
In the current implementaion, if multivdev restart req is not sent
due to error cases, then the multivdev restart timer gets restarted
after every timeout and the vdev sm is stuck in same state.
Add multivdev restart timeout wait counter and assert after the wait
timeout expires.

Change-Id: I5e249583e309660281b4a9cd7253b0731c5483cd
CRs-Fixed: 2621230
2020-02-17 12:30:12 +05:30
Adwait Nayak
22aef01be3 qca-wifi: CFR: Introduction of new flag to enable RCC
A new flag "is_cfr_rcc_capable", is introduced to enable RCC.
Currently, this flag is enabled only for QCA6018.

Change-Id: Ifdd1922c655c0bb743147e3f51d3ca32cac3dd2e
2020-02-12 10:13:48 +05:30
Adwait Nayak
aac53d0bf9 qca-wifi: CFR: Add enhanced debug counters
Add counters for following scenarios -

1. Ucode aborts DMA of CFR data when a higher priority TX/RX activity
needs to be scheduled, add counters in host to identify the no. of
aborts.

2. Add counters to track the total no. of TX-based CFR captures since
wifi up.

Change-Id: I3c0e0e68651348c3484a14dfcd1f664962c8647f
2020-02-12 10:12:53 +05:30
Padma Raghunathan
fe7f2fbf6a qca-wifi: CFR: Cleanup unused code/datastructures
1. Remove the handler that flushes all pending DBR and txrx
events, since that is not being used.
2. PPDU TLV subscribe logic is integrated with ol stats layer,
remove redundant subscriber alloc.
3. Downgrade debug level of timer prints, as error handling timer
fires every 3 secs.

Change-Id: I2a5d2ae10ebee069dd30c1ed87d6560b30f77427
2020-02-12 10:08:14 +05:30
Padma Raghunathan
cc9e0e7376 qca-wifi: CFR: LUT ageout timer fixes
In CFR error handling lut ageout timer, following fixes are made -
1. Fire error handling timer every 3 secs
2. Start/Stop timer only when pdev->cfr_rcc_mode transitions from enable
to disable and vice versa
3. Stop/Free timer during deinit of pdev, incase user issues wifi down
without disabling cfr

Change-Id: I2f9819706d1440d675edfdd933839dbc3ebddbb0
2020-02-12 09:20:00 +05:30
Linux Build Service Account
684fb31964 Merge "qcacmn: Add APIs to get peer delete req and resp stats" 2020-02-10 08:39:16 -08:00
Adwait Nayak
172ff30046 qca-wifi: CFR: Fix in flush pending DBR event logic
Do not flush the DBR event for which the corresponding
TX/RX event is yet to be received.
Once the new PPDU TLV is received, flush the previous
pending DBR events.

Change-Id: I4495a45db139128d2af01f79744021c6ad6bf322
2020-02-06 14:43:26 +05:30
Naga
3a2fd4fca1 qcacmn: Add APIs to get peer delete req and resp stats
Add APIs to get peer delete, peer delete all request and response stats.

Change-Id: I8a14e72c3ae71706c66af1c26498495fabdf2391
CRs-Fixed: 2610303
2020-01-30 22:26:31 -08:00
Linux Build Service Account
04a5547d02 Merge "qca-wifi: Address compilation issues" 2020-01-28 19:39:18 -08:00
Vignesh U
e06939f58d qca-wifi: Address compilation issues
Address the compilation issues when the DFS feature Auto channel
switch support is disabled(WLAN_DFS_PRECAC_AUTO_CHAN_SUPPORT=0).

Change-Id: I6eda4bf133552e145a49a60aea50a0ce29a11373
CRs-Fixed: 2608450
2020-01-27 14:03:31 +05:30
Priyadarshnee S
0beec74ee3 Revert "qca-wifi: Remove duplicate invoke of restart clear API"
This reverts commit 93fd212313864b5a2e693cefadc0b48763d522af.

CRs-Fixed: 2604433
Change-Id: I0ddf7971c1438650f28a0e0bf1d1f3ffb4aa9bc1
2020-01-25 21:30:00 +05:30
Linux Build Service Account
fe39b24b66 Merge "qca-wifi: CFR: Remove dp_handle references in CFR" 2020-01-13 13:39:06 -08:00
Linux Build Service Account
84b905d059 Merge "qca-wifi: Display CFR debug counters in default loglevel of CFR module" 2020-01-13 13:39:05 -08:00
Linux Build Service Account
6e44717a85 Merge "qca-wifi: CFR: Fixes in error handling path" 2020-01-13 13:39:05 -08:00
Adwait Nayak
a58487f97b qca-wifi: CFR: Fixes in error handling path
1. In CFR RCC mode, when ucode aborts DMA of CFR data, 2 (or)
more PPDU status TLVs are likely to have same phy_addr+cookie in
RX location TLV, so the host will be flushing out the older PPDU
status TLV events instead of DBR events in LUT table,
since DBR events signify the actual DMA completion.

2. Same fix has been made for LUT entry ageout logic.

Change-Id: Ifc0717e97d21ba3463cc2f5ceb2f22a657177002
2020-01-10 12:54:25 +05:30
Padma Raghunathan
82cc8e46d8 qca-wifi: Display CFR debug counters in default loglevel of CFR module
Change log level of CFR debug counters from QDF_TRACE_LEVEL_INFO to
QDF_TRACE_LEVEL_ERROR

Change-Id: Ib0d36ec458de2d8d562d34a80ab8128f934ad459
2020-01-10 11:38:16 +05:30
Padma Raghunathan
1a8dfb04ef qca-wifi: CFR: Remove dp_handle references in CFR
This changes removes references to dp_handle in CFR component, to ensure
consistency with FR#56622.

Change-Id: I3539e958ed3fe4ef68f22adf473349b5639cb4b1
2020-01-07 23:57:43 +05:30
Vignesh Mohan
29948edda0 qca-wifi-oss: Reinit DFS after HW mode switch (phase 2)
Supported dynamic HW mode switches:
DBS (full band 5G and 2G) <-> DBS_SBS (low band 5G, high band 5G and 2G)

Description of the changes:

1. NOL conversion:
  a. Introduce a temporary NOL list copy structure in DFS psoc obj.
  b. When mode switch is triggered:
    i.   Stop the NOL timers and clear the data, to avoid processing NOL
	 expiry during mode switch.
    ii.  Allocate the psoc NOL copy for the target num_radios.
    iii. Store the NOL data of each radio to the target pdev ID
	 (pdev ID after mode switch) in the psoc NOL copy,
	 using a unified mux/demux API.
  c. After mode switch is completed:
    i.   Resume NOL by re-initializing the list from the temporary psoc
         copy.
    ii.  Free the psoc copy after mode switch is complete.
    iii. Note: changes are made to support pause and resume of NOL,
	 increasing NOL timeout by a few milliseconds.

2. PreCAC list conversion:
  a. When mode switch is triggered:
    i. Stop the existing preCAC timer and send ADFS abort command to FW.
  b. When mode switch is completed:
    i.  Unify/separate the preCAC list if the target mode is DBS/DBS_SBS
	respectively, using a single API.
    ii. Start ADFS again.

3. Radar detection lock:
  a. While detecting radar, acquire a lock to avoid handling user triggered
     mode_switch during this process. Release the lock once radar
     processing is completed and CSA start is triggered.

4. Radar detection/CAC completion defer during mode switch:
  a. While detecting radar or CAC completion, check if mode switch is
     in progress. If yes, wait for mode switch to complete before
     handling the events.
  b. Note: Precedence is Radar over CAC, i.e., if CAC processing is waiting
     and radar is received, CAC completion is no longer handled.

CRs-Fixed: 2535058
Change-Id: I55e03dae9da994c21b1aafe7b7686f5299221a40
2020-01-02 22:01:42 -08:00
Adwait Nayak
1a4ad8923f qca-wifi: Enhanced channel capture UCFG framework
Framework to accumulate RCC configurations until user issues commit
command. Once commit command is issued, all the gathered configurations
are sent to FW through WMI fixed and variable TLVs.

Change-Id: I84fec42d22a3b4eceb710b72d89a7c3047fed1f6
CRs-Fixed: 2582833
2019-12-26 20:14:00 -08:00
Padma Raghunathan
5df9a9481d qca-wifi: CFR: Implementation of CFR for QCA6018 platforms
Channel Frequency Response(CFR) captures FFT bins corresponding to a PPDU
received and this is relayed to user space application along with
additional information about the PPDU gathered in the host. Usecases of
this feature include location sensing, motion detection.

Change-Id: If0da492bc1fcc0fc2b6e42339c56f9a54ee813f7
CRs-Fixed: 2541307
2019-12-26 20:13:08 -08:00
Pavankumar Nandeshwar
5a9ef8ffef qca-wifi: Add a new parameter for rx decrypt errors
Add a new parameter 'cs_rx_decryptcrc' for rx decrypt
errors in rx protected management frames.

Change-Id: I0aaeea7971d2ad8a0ffff91e291c09d27d0c9908
2019-12-16 20:01:16 -08:00
Srinivas Pitla
aa231bd28c qca-wifi: Remove duplicate invoke of restart clear API
On sending STOP req, RESTART pending, RESTART send flags are being cleared.
This is already being done before moving out of RESTART_PROGRESS sub state,
so avoiding it.

Change-Id: If8b358eb83571e11d6e0d3bcbedcf833894bf0d6
CRs-Fixed: 2578106
2019-12-06 10:07:04 -08:00
Linux Build Service Account
a5d06d69dc Merge "qca-wifi: Add extra time for agile precac timeout" 2019-11-04 15:11:00 -08:00
Vignesh Mohan
ee04d7a71b qca-wifi: Add extra time for agile precac timeout
While configuring the precac timeout as part of starting the agile
engine, the timeout value sent to FW and HOST timer were both equal,
resulting in two separate timeout.
1. Zero second timeout due to OCAC complete event from FW.
2. preCAC timer timeout.
Because of these timeouts, same channel is marked as OCAC complete
twice. To avoid this, increase the HOST timer timeout value by
2 seconds.

Change-Id: I9b649b5c783df962df2b8410691ee00d1abb4a9d
CRs-Fixed: 2556726
2019-11-04 20:29:59 +05:30
Vignesh U
4ab84aff2b qca-wifi: radartool synthetic pulse
Introduce a phyerror sample analogous to the phyerrors given by FW and
store itin the text file. Read the text file and Inject this phyerror to
the DFS algorithm.

Change-Id: Iff33b6554911e4f3e8101cb81df5c500cd96f041
CRs-Fixed: 2484584
2019-10-30 05:41:14 -07:00
Linux Build Service Account
7a65f57adf Merge "qca-wifi: Add frequency-based APIs in ADFS to communicate with DFS module" 2019-10-29 11:36:33 -07:00
Akshay Kosigi
26a6f53871 qca-wifi: Add code to introduce new opaque pointer
Introduce new opaque pointer mlme_psoc_ext_t to store AP side
psoc structure.

Change-Id: If8d12796cbb3a05e58e9d8b5376034e5e5f9afeb
CRs-Fixed: 2533945
2019-10-24 08:59:09 +05:30