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
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
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
This changes removes references to dp_handle in CFR component, to ensure
consistency with FR#56622.
Change-Id: I3539e958ed3fe4ef68f22adf473349b5639cb4b1
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
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
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
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
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
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
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
For new CFR captures with AoA data, Meta data version is 2.
Updating meta data version to 2.
CRs-Fixed: 2537866
Change-Id: I4c6cb9775e5a9760630b1f28d61fb4bdfd084c6c
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
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
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
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
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
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
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
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
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
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
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
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
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
Replace mlme void * data members having different types across
different drivers with specific type.
Change-Id: I8d16fe8fb8af65c30b2ee17b9b018b9903e968fa
CRs-Fixed: 2463030
Replace cp_stats void * data members haing different types
across different drivers with specific type
Change-Id: I1a5ed35428607dbfb070459b88358b68f49f8cb3
CRs-Fixed: 2462355