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
Add change to copy the contents of multivdev restart send bitmap
to the pdev restart attribute holder which will be reset when all
the vdevs of the pdev are in the UP state
Change-Id: Ieef13fd5b5db25ddd2b8736c9d01786c537c3483
CRs-Fixed: 2492538
According to the ETSI speculation, off-channel CAC has a
minimum timeout value of 6 mins (non-weather) and 1 hour (weather). The
maximum timeout value is 4 hours (non-weather) and 24 hours (weather).
Current implementation always took 60 seconds (1 min) as the default
preCAC timeout value. Add changes to implement proper timeout values
based on the channel (weather or non-weather). As part of this change,
add an API to determine if a channel is within this range based on
the edge channels of the given bandwidth.
The API (dfs_start_agile_precac_timer) is called inside
dfs_get_ieeechan_for_agilecac which is used to find the next channel
for agile CAC. Move dfs_start_agile_precac_timer outside
to functionally differentiate each APIs.
Change-Id: Idf3f371b0ab839a746cfba69e86f58202698f3c3
CRs-Fixed: 2482929
While picking a channel to start Agile CAC on, the current channel
width enum is checked if it is non zero and only then a channel is picked.
However, the channel width value of 0 indicates the width is 20MHz.
Check if the channel width value is not CH_WIDTH_INVALID and only then
start Agile CAC.
Change-Id: Id024631fc7b034fe87f2070d150da64cf07c49ae
CRs-Fixed: 2491517
Replace void * tgt_if_handle of objmgr psoc/pdev with
abstract type handles provided by target interface
Change-Id: I903bbae99ec784fe445dc55f954792542d91f380
CRs-Fixed: 2467129
In the current Agile DFS design it is assumed that the agile detector's
bandwidth is always 80Mhz. However, the agile detector inherits the
bandwidth of the current operating channel with the following
mapping:
Current Chan BW --- > AGILE BW
20 20
40 40
80/80+80/160 80
Provide support for Agile DFS on 20/40/80MHz channels based on the
current channel's bandwidth. Maintain a Binary Search Forest,
with each Binary Search Tree (BSTree) rooted by an 80MHz channel
structure. These BSTrees are connected by the preCAC list.
The primary key (identifier) of each node in the BSTree is an IEEE
channel. Each level of the BSTree has a unique bandwidth.
Remove the three existing precac lists: precac_required_list,
precac_done_list, precac nol_list.
Maintain
1) regular CAC and preCAC
2) regular NOL and preCAC NOL
information in the same Binary Search Forest.
Operations available on the preCAC BSF:
1. Allocate nodes of each tree in the forest:
Use level order BST insertion to create and add individual nodes of
the tree.
2. Deallocate nodes of each tree in the forest:
Use an algorithm to add current node's right subtree to the last leaf
node and remove left nodes (from the root) iteratively [O(N)].
3. Print precac tree states:
Use morris preorder tree traversal to print the states of the nodes
in the entire forest.
User space command: radartool -i wifi[x] showprecaclists.
Example: For a HT80 channel list,
[Syntax of each node: <center_channel_ieee>(<CAC_status>,<NOL_status>)]
106(0,0)
|
|------- 102(0,0)
| |
| |------- 100(0,0)
| |
| |------- 104(0,0)
|
|------- 110(0,0)
| |
| |------- 108(0,0)
| |
| |------- 112(0,0)
4. Find a channel for preCAC for a given bandwidth:
Use the current status of the node to find the appropriate channel
from the Forest based on it's bandwidth. [O(N)]
5. Find if channel is preCAC done:
Search the tree (Binary tree search) which has the channel requested
and return the CAC status.
6. Mark/unmark the channel as CAC done:
Given a channel, find all 20MHz subchannels and mark/unmark as CAC
completed.
7. Mark/unmark the channel as NOL:
Given a channel, find all 20MHz subchannels and mark/unmark as NOL.
CRs-Fixed: 2464929
Change-Id: If4a806207025edfd9e9b99de310963bb8a3a5007
Add counters for vdev delete all peer requests
and responses in cp_state component.
Change-Id: Ifbd9a35abe32b3e20db1ac784e1db78b415e46f2
CRs-Fixed: 2477610
When the CAC timer is in progress and radar is detected, a NULL pointer
dereference is observed when the radar detected channels are removed
from etsi required lists and added to NOL.
This issue is seen as the next etsi precac entry in the etsi required
list is freed instead of the current etsi precac entry.
This issue is fixed by freeing the current etsi precac entry in the
etsi precac required list.
Change-Id: I609174b23b0d6d2ea36ca26b011359dcf5876c3a
CRs-Fixed: 2463762
Currently if InterCAC support is enabled:
1. If the user configures a DFS channel in 80MHz mode, the
radio switches to an intermediate channel and the user
desired channel is added on the top of the lists of the
channels to be CACed using AgileDFS.
2. If the user configures a DFS channel in 160MHz mode, the
radio switches to an intermediate channel and the user
desired channel is split into two 80MHz channels and are
added on the top of the list.
3. After agile CAC is completed on the user configured channel,
the radio stays on the intermediate channel.
Change the current channel (and mode) back to user desired
channel, after agile CAC is completed on the desired channel.
Change-Id: Ib3e7757316ebddfc75f1b1f1f4bb8c5debd04d62
CRs-Fixed: 2448224
Added change to handle peer delete request and response stats at per
vdev layer instead of pdev layer
Change-Id: Ie58ed9f1916f226411fe16a569fa81f2f20b9db0
CRs-Fixed: 2445668
Fix Suspicious dereference of pointer 'payload' before NULL check.
Fix 'status' might be used uninitialized in this function.
Change-Id: Ib799043555faafc655919c1e42d0fbc43c716b2f
After NOL timeout, if ETSI PreCAC is supported, add the HT20 Channel
to ETSI PreCAC Required List.
Change-Id: I45812d0f7a9dd20e4fb1f03e6a71548ff2f6e5b4
CRs-Fixed: 2403489
When a channel is marked as radar detected and added to preCAC NOL
list, it is removed only from etsi precac done list, but not from etsi
precac required list. Since a channel that is part of NOL, cannot also be
a part of etsi precac required list, this needs to be corrected.
Therefore, once radar is detected on a channel, remove it from both etsi
precac required list and etsi precac done list.
Change-Id: I4d809a24acd4b73db254790e2698ffc5414cf0fe
CRs-Fixed: 2403489
Two fields got swapped while polulating csi_cfr_header and
a field was missed. Corret and add missing fields.
CRs-Fixed: 2421237, 2421241, 2421209
Change-Id: Ife8ebc663292af021cc4556985c088092509b339
Currently, for restart response cases, if Restart is not in progress and if
stop is issued, VDEV SM is allowing Stop request to send to FW.
This fix would prevent such cases.
Change-Id: I0d4d74c5eb2a9c9bbb588f7114fbbd5611c37cd5
CRs-Fixed: 2400987