Commit Graph

92 Commits

Author SHA1 Message Date
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
Priyadarshnee S
a084820db6 qca-wifi: Add frequency-based APIs in ADFS to communicate with DFS module
The IEEE channel numbers in the 6GHz band overlap with the IEEE channel
numbers in 2.4GHz, 4.9GHz (e.g. Channel number 1) and 5GHz
(e.g. Channel number 149). Currently many APIs in Agile DFS (ADFS),
have channel number as a parameter. This leads to the channel number
collision. To overcome this, new APIs with channel center frequency
(in units of megahertz or MHz) as a parameter are created, as
channel center frequency is unique for 2.4 GHz, 4.9 GHz, 5GHz,
and 6GHz channels.

Each new API performs the same function as its old counterpart.
For example dfs_find_cac_status_for_chan() and
dfs_find_cac_status_for_chan_for_freq() perform the same operation. The
difference in the latter, is that the channel center frequency is given
as an input parameter instead of IEEE channel number, and the function
body is modified to suit channel center frequency.
The new channel frequency based APIs are placed under the macro
"CONFIG_CHAN_FREQ_API" and the existing channel number based APIs are
placed under the macro "CONFIG_CHAN_NUM_API". The APIs under the macro
CONFIG_CHAN_NUM_API will be removed, when when all the references to
the APIs are removed.

CRs-Fixed: 2526360
Change-Id: Icff94f518af3621b039f059f1409106a5639ed8b
2019-10-18 06:30:33 -07:00
Linux Build Service Account
b59b1c73d1 Merge "qca-wifi: Remove redundant ETSI preCAC APIs" 2019-10-08 09:06:33 -07:00
Vikram Kandukuri
9782ab28b4 qca-wifi: Correct meta data version for CFR captures wiht AoA
For new CFR captures with AoA data, Meta data version is 2.
Updating meta data version to 2.

CRs-Fixed: 2537866

Change-Id: I4c6cb9775e5a9760630b1f28d61fb4bdfd084c6c
2019-10-03 23:50:53 -07:00
Vignesh Mohan
a6c90df9e3 qca-wifi: Remove redundant ETSI preCAC APIs
As part of the ETSI preCAC feature, every 20MHz channel that is CACed
and not in NOL is maintained in a list which is then checked during every
channel switch for CAC reuse (avoiding CAC).

With the introduction of preCAC list (Binary Search Forest) for
20, 40 and 80MHz channels which also includes the current channel CAC
information, the ETSI preCAC list has become redundant.

Remove all APIs and changes that support the redundant ETSI preCAC list.

Change-Id: I76656807bc117af1f6909160ade86ae13d390f1a
CRs-Fixed: 2484864
2019-10-01 17:07:08 +05:30
Linux Build Service Account
9d730ccf95 Merge "qca-wifi: Set FW ADFS support flags in dfs" 2019-09-25 22:38:09 -07:00
Linux Build Service Account
7ab9f4720e Merge "qca-wifi: Reset the agile channel after radar in primary detector" 2019-09-24 17:50:28 -07:00
Vignesh Mohan
8628ae9e72 qca-wifi: Reset the agile channel after radar in primary detector
If radar is detected on the primary channel, agile DFS is restarted
after vdev start response by triggering a zero second timer.
The timer fires immediately and the existing agile precac channel
is marked as CAC done. Since the agile preCAC channel was never cleared,
it was marked as CAC done.

Reset the agile channel if radar is detected on the primary channel.
In case of radar in agile detector, the channel change will not involve
any zero second timers and the agile channel will be overwritten by a
new channel.

Also, consider the case where radar is detected on the primary
channel. HOST will now select a new primary channel and issue vdev start
to FW. After vdev response, HOST will pick a new agile channel.
Since the agile engine was never stopped, FW may issue OCAC complete
for the old agile channel at this instant. Now, since HOST has picked a
new agile channel, this new agile channel will be marked as CAC done
due to the OCAC complete event from FW, without preCAC being started.

Send OCAC ABORT command after radar detection to properly restart
the agile state machine and avoid any race conditions like above.

CRs-Fixed: 2528567
Change-Id: I455cd513ba612bf48f057583b7529c7c3ef2f6c6
2019-09-18 07:15:23 -07:00
Vignesh Mohan
3645c81071 qca-wifi: Set FW ADFS support flags in dfs
When the current chainmask is updated, the FW ADFS support flags are
sent to DFS object in the API "dfs_set_fw_adfs_support". Update
the DFS flags representing the FW Agile DFS support based on the
new values.

Before starting (or) restarting agile DFS, check if user configuration
and FW Agile support is present and only then start the agile
state machine. If the current operating bandwidth of the pdev is
80P80 or 160MHz, check the FW flag "fw_adfs_support_160" and if
it's false, do not start the agile engine.

Change-Id: I0c44fd9d7d57042f82808979421284be02065c77
CRs-Fixed: 2521654
2019-09-18 15:15:54 +05:30
Vignesh Mohan
8f00992e04 qcacmn: Add the channel structure as an argument for ETSI preCAC check
While checking if ETSI preCAC is already done on a given channel
in this API "dfs_is_etsi_precac_done", dfs_curchan is always used as
the channel to be checked. Since there are APIs such as
"dfs_is_cac_required", which may be called before dfs_curchan is
updated, add the channel structure which is to be checked for
ETSI preCAC in the argument list.

Change-Id: I77cf059f9afd83c850a7603f6197ac2b78fa2586
CRs-Fixed: 2528023
2019-09-17 12:26:42 +05:30
Linux Build Service Account
aba33e0087 Merge "qca-wifi: Reset the picked agile channel if it is an excluded channel" 2019-09-10 08:11:28 -07:00
Vignesh Mohan
aea46f34e4 qca-wifi: Check if channel is already marked before marking as CAC done
Consider the case where preCAC is running on channel 120 (20MHz)
bandwidth and 116 (20MHz) channel is already preCACed. One possible tree
structure, with the scenario mentioned above, is shown below:

122(1,0)
 |
 |------- 118(1,0)
 |        |
 |        |------- 116(1,0)
 |        |
 |        |------- 120(0,0)
 |
 |------- 126(0,0)
 |        |
 |        |------- 124(0,0)
 |        |
 |        |------- 128(0,0)

where 122 and 118 have 1 subchannel (116) as CAC done. While the preCAC
is running on 120(20Mhz), the preCAC is restarted with a new channel
of 40MHz bandwidth. If the new channel picked is 118(40Mhz) in which 116
is already CACed, once the preCAC is completed on 118 (40Mhz),
the entire band (with both 20MHz channels) will be marked as CAC done.

In the API "dfs_mark_tree_node_as_cac_done", the number of CACed
subchannel of the parent node is incremented without checking if the
child has been marked. In the above case, after preCAC is completed
on channel 118, each 20 MHz channels in channel 118 (116 and 120) are
marked individually in this API.
While marking the tree for preCAC completion on the subchannel 116,
the number of CACed subchannels is incremented to 2 for 122 and 118, but
124 is already marked. While marking the tree for preCAC completion on
the other subchannel (120), the CACed subchannels count is incremented
to 3 for 122 and since it cannot increment the subchannel count to more
than 2 for 118, it returns, leaving 128 unmarked. The preCAC tree
structure will now look like:

122(3,0)
 |
 |------- 118(2,0)
 |        |
 |        |------- 116(1,0)
 |        |
 |        |------- 120(0,0)
 |
 |------- 126(0,0)
 |        |
 |        |------- 124(0,0)
 |        |
 |        |------- 128(0,0)

which is wrong.

To fix the above problem, check if a tree node is already marked as
CAC done and only then increment their parent's CACed subchannels count.
This issue is not seen for other cases (e.g. marking NOL channels), since
preCAC can be performed on the same channel again (incase of different
bandwidths) whereas NOL marking is unique.

Change-Id: Ie683a011a86233dd2c1ff8e21aa78638a1d63c2a
CRs-Fixed: 2520790
2019-09-09 11:52:31 +05:30
Linux Build Service Account
1d2110f2e0 Merge "qca-wifi: Correct CFR data version" 2019-08-30 03:12:37 -07:00
Linux Build Service Account
ce0b3795b6 Merge "qca-wifi: Restart agile DFS in vdev start response after radar" 2019-08-30 00:06:51 -07:00
Vignesh Mohan
51f85cc861 qca-wifi: Restart agile DFS in vdev start response after radar
If radar is found on primary channel, aDFS channel change is triggered
immediately after marking the primary channels as NOL. This may result
in picking the channel that the AP may come up in, for agile DFS.

To avoid running aDFS on the pdev's current channel, restart
agile DFS engine after new channel is selected, in vdev response.

Also, consider the scenario where the device has two DFS pdev objects.
When the API "dfs_prepare_agile_chan" is called to start preCAC, it
uses a round-robin logic to pick a DFS object for preCAC and
the preCAC timer maybe started for a different dfs object than the
one calling it (argument of the function). But the channel width of
the preCAC channel is always fetched from the dfs object calling
the API, which may result in wrong channel width sent in adfs_start
command.
Use temp_dfs structure (indicating the DFS object picked for preCAC)
to fetch the channel width, instead of fetching it from the dfs
object passed as argument to the function.

Change-Id: I243cf978b3caaadb771eb9a5e0cf83f7ac82c876
CRs-Fixed: 2515440
2019-08-29 17:59:31 +05:30
Abhiram Jogadenu
5bf0f819dc qca-wifi: Correct CFR data version
Correct the version where CFR data is being populated.

Change-Id: I4c55b5beefb2f93e09df47162406876a1861fa00
2019-08-29 02:02:03 -07:00
Linux Build Service Account
2e9c30351f Merge "qca-wifi: Fix FIND_IF_OVERLAP_WITH_WEATHER_RANGE API" 2019-08-28 22:49:27 -07:00
Vignesh Mohan
e1b684588c qca-wifi: Fix FIND_IF_OVERLAP_WITH_WEATHER_RANGE API
While checking if the current channel overlaps with the
weather channel range, the first sub channel was checked if it is to
the left of weather channel start and the last sub channel was
checked if it is to the right of the weather channel end.

By the above logic, the API returns true only if the entire
weather channel range is within the current channel.

Fix the formula by checking if the first sub channel of the current
channel is to the left of the weather channel end and the last sub
channel is to the right of the weather channel start to find if any
of the current channel is a weather channel.

CRs-Fixed: 2515365
Change-Id: I8ca779f6dd8116a85121185e3ea71bca610f9ba4
2019-08-27 11:45:47 +05:30
Vignesh Mohan
46d8993c09 qca-wifi: Reset the picked agile channel if it is an excluded channel
While selecting a channel for aDFS, the current channel(s) are skipped
for preCAC (since they are CACed by the primary detector).

If no other channels are found and if the current channel
is the last in the preCAC list, aDFS is started on this channel.
This is because, the channel variable defined in the API locally
is not reset if it is an invalid channel.

Reset the agile channel at the end of the loop if it is one of the
excluded (current) channel.

Change-Id: I48cbfc3c511c05bed86b60eb9e2ca22f9b8e0362
CRs-Fixed: 2515324
2019-08-26 17:01:54 +05:30
Abhiram Jogadenu
fb6844f781 qca-wifi: Fill extracted phase information in CFR header
As part of FR 56301, phase data is being captured in CFR.
Fill the extracted information in CFR header.

Change-Id: Ia1f6245a1a18d1d11b266328b17e6506bd8439f4
CRs-Fixed: 2501944
2019-08-24 07:41:19 -07:00
Abhiram Jogadenu
ea20fa5e53 qca-wifi: Add support for CFR capture on unassociated clients
As part of FR 56301, add support to capture CFR data for
unassociated clients on its Probe response's ACK

Change-Id: I14a4eead4ceeb3eb21d8f2bdf76007f873db1f4e
CRs-Fixed: 2501938
2019-08-22 11:48:38 +05:30
Shreedhar Parande
77ac19d602 qca-wifi: Separate APIs for getting values of precac and agile precac
Currently single API is used to get dfs_precac_enable and
dfs_agile_precac_enable. This API was wrongly returning value for
dfs_precac_enable since agile capability was set even for Cascade.

Sepate out the GET APIs for getting dfs_precac_enable and
dfs_agile_precac_enable so that getting these flags becomes independent
of each other.

Change-Id: Ie617c04269f91db32f851871880c4df884517a67
CRs-fixed: 2501266
2019-08-12 02:51:59 -07:00
Linux Build Service Account
9ef0c191fe Merge "qca-wifi: Build the preCAC list only for ETSI domain" 2019-08-07 23:09:35 -07:00
Linux Build Service Account
377dfe439d Merge "qca-wifi: Add a DFS API to reset ADFS config" 2019-08-04 11:05:52 -07:00
Vignesh Mohan
8d81493bc3 qca-wifi: Build the preCAC list only for ETSI domain
The preCAC list (forest) is built irrespective of the current DFS domain.
But since preCAC feature is only supported by ETSI spec., the list will
not be used by other domains.

Build the preCAC list only for ETSI domain.

Change-Id: I5949fda8b2c51237f80ce5335d9c9453f46ef3a4
CRs-Fixed: 2499643
2019-07-30 15:30:28 +05:30
Priyadarshnee S
4842dac1b4 qca-wifi: Add a DFS API to reset ADFS config
Add an API to reset Agile DFS config variables. This will make sure that
ADFS config variables are consistent when we dynamically disable/enable
a PDEV.

CRs-Fixed: 2481535
Change-Id: I3842ed45f8a071523c3de1face0463d21da737bb
2019-07-30 07:00:27 +05:30
Linux Build Service Account
b6bd878499 Merge "qca-wifi: Replace void * data members of mlme with specific type" 2019-07-29 09:38:19 -07:00
Himanshu Batra
ada6f9d07d qca-wifi: Replace void * data members of mlme with specific type
Replace mlme void * data members having different types across
different drivers with specific type.

Change-Id: I8d16fe8fb8af65c30b2ee17b9b018b9903e968fa
CRs-Fixed: 2463030
2019-07-26 04:44:49 -07:00
Himanshu Batra
dd4f3f1e19 qca-wifi: Replace void * data members of cp_stats with specific type
Replace cp_stats void * data members haing different types
across different drivers with specific type

Change-Id: I1a5ed35428607dbfb070459b88358b68f49f8cb3
CRs-Fixed: 2462355
2019-07-26 10:33:06 +05:30