コミットグラフ

170 コミット

作成者 SHA1 メッセージ 日付
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
Linux Build Service Account
8b73b3c50d Merge "qca-wifi: Configure proper agile preCAC timeout value" 2019-07-23 20:35:16 -07:00
Linux Build Service Account
2ea12f29e2 Merge "qca-wifi: Update pdev restart bmap from restart send bitmap" 2019-07-20 06:05:14 -07:00
Linux Build Service Account
7cec258273 Merge "qca-wifi: Replace void * tgt_if_handle with abstract type" 2019-07-19 04:10:12 -07:00
Santosh Anbu
4fde2e5169 qca-wifi: Update pdev restart bmap from restart send bitmap
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
2019-07-19 16:20:29 +05:30
Vignesh Mohan
fb2c9f9864 qca-wifi: Configure proper agile preCAC timeout value
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
2019-07-18 15:29:24 +05:30
Vignesh Mohan
2ec51b254e qca-wifi: Check for proper channel width during Agile CAC
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
2019-07-17 14:41:45 +05:30
Himanshu Batra
37b16cda06 qca-wifi: Replace void * tgt_if_handle with abstract type
Replace void * tgt_if_handle of objmgr psoc/pdev with
abstract type handles provided by target interface

Change-Id: I903bbae99ec784fe445dc55f954792542d91f380
CRs-Fixed: 2467129
2019-07-16 22:40:06 -07:00
Vignesh Mohan
245170b6a6 qca-wifi: Provide 20/40/80MHz Agile DFS support
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
2019-07-08 09:57:49 -07:00
Naga
43742fe519 qca-wifi: Add cp_stats support for vdev delete all peer
Add counters for vdev delete all peer requests
and responses in cp_state component.

Change-Id: Ifbd9a35abe32b3e20db1ac784e1db78b415e46f2
CRs-Fixed: 2477610
2019-06-24 17:17:30 +05:30
Hariharan Basuthkar
4a439c7a2a qca-wifi: Free precac_entry from ETSI Precac required list on radar detect
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
2019-06-04 03:18:22 -07:00
Himanshu Batra
e460ccec98 qca-wifi: Consolidate IEEE80211_ADDR_LEN to QDF_MAC_ADDR_SIZE
Consolidate multiple (redundant) IEEE80211_ADDR_LEN to QDF_MAC_ADDR_SIZE

Change-Id: I30790ed7b8e6299353e639fc4cd39f72e8e699cd
CRs-Fixed: 2439274
2019-05-26 21:58:23 -07:00
Vignesh Mohan
445f14c8fc qca-wifi: Add support for InterCAC channel switch in Hawkeye
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
2019-05-23 03:28:34 -07:00
Linux Build Service Account
d3daa53e99 Merge "qca-wifi: Move peer delete req/resp stats from pdev to vdev" 2019-05-13 04:35:26 -07:00
Santosh Anbu
403dfb711c qca-wifi: Move peer delete req/resp stats from pdev to vdev
Added change to handle peer delete request and response stats at per
vdev layer instead of pdev layer

Change-Id: Ie58ed9f1916f226411fe16a569fa81f2f20b9db0
CRs-Fixed: 2445668
2019-05-07 12:49:02 +05:30
Vikram Kandukuri
605c8118aa qca-wifi: Fix KW issues in cfr component
Fix Suspicious dereference of pointer 'payload' before NULL check.
Fix 'status' might be used uninitialized in this function.

Change-Id: Ib799043555faafc655919c1e42d0fbc43c716b2f
2019-05-02 17:08:07 +05:30
Linux Build Service Account
da643ab5c7 Merge "qca-wifi: Fix KW issues" 2019-04-25 15:05:10 -07:00
narayan
80554f5219 qca-wifi: Fix KW issues
Fix KW issue in cfr_common.c and wlan_cfr_tgt_api.c

Change-Id: I23e0ce3bf41ca9e6250800b7945c92ace80f037e
CRs-Fixed: 2439699
2019-04-22 23:21:10 +05:30
Hariharan Basuthkar
34601e1662 qca-wifi: After NOL timeout add channels to ETSI PreCAC Required List
After NOL timeout, if ETSI PreCAC is supported, add the HT20 Channel
to ETSI PreCAC Required List.

Change-Id: I45812d0f7a9dd20e4fb1f03e6a71548ff2f6e5b4
CRs-Fixed: 2403489
2019-04-19 06:59:24 -07:00
Hariharan Basuthkar
d2e9132ee0 qca-wifi: Remove Channels from ETSI PreCAC Required List when in NOL
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
2019-04-11 05:51:05 -07:00
Abhiram Jogadenu
c0f1ac1dff qca-wifi: Correct data populated in csi_cfr_header
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
2019-04-08 11:10:36 +05:30
Linux Build Service Account
19704f4867 Merge "qca-wifi: Updating CFR's DBR handler API" 2019-04-04 15:21:39 -07:00
Srinivas Pitla
5570c7b4cb qca-wifi: Block stop request till restart response is received
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
2019-03-28 01:57:12 -07:00