Commit Graph

47 Commits

Author SHA1 Message Date
Linux Build Service Account
377dfe439d Merge "qca-wifi: Add a DFS API to reset ADFS config" 2019-08-04 11:05:52 -07:00
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
Linux Build Service Account
86991bff4c Merge "qca-wifi: Address RDKB compilation issue" 2019-03-15 19:34:16 -07:00
Linux Build Service Account
20f65cc8c8 Merge "qca-wifi: Adds support for Agile DFS feature" 2019-03-15 15:34:05 -07:00
Srinivas Pitla
2ea53466ff qca-wifi: Address RDKB compilation issue
This change adds braces to fix compilation error for RDKB issue

Change-Id: Ie6943e527d5e2b9b60c4d83d287f0b50fa489374
CRs-Fixed: 2400987
2019-03-14 19:24:29 -07:00
Abhiram Jogadenu
a8065f6377 qca-wifi: Updating CFR's DBR handler API
DBR event handler needs parameters to config number of events to
be packed and timeout until it can wait to pack these events.
Add these parameters in CFR's DBR event registration.

CRs-Fixed: 2415489
Change-Id: Id417221f3bebef40b8f8d75c0365c3c4ec01fec3
2019-03-14 05:56:36 -07:00
Linux Build Service Account
b6db0cb654 Merge "qca-wifi: Fix cfr max clients reference" 2019-03-08 23:05:57 -08:00
narayan
15f9397f82 qca-wifi: Fix cfr max clients reference
Fix cfr max clients ref cnt decrement when periodic
cfr is stopped.

Change-Id: I0f855e3de0f19e45243f1a49e5a5902319328ec1
CRs-Fixed: 2412533
2019-03-08 20:15:53 +05:30
Abhiram Jogadenu
d18e21fcba qca-wifi: Register and correlate dbr and tx events
Register tx and dbr events and extract data required from
these events to pass it on to relayfs.

Change-Id: I9be9d0f9d47fa926406ee525742886d55229bab0
2019-03-07 20:36:56 +05:30
Shaakir Mohamed
73adf7d672 qca-wifi: Adds support for Agile DFS feature
Agile Dynamic Frequency Selection refers to the mechanism in which DFS
scanning takes place on a separate dedicated synthesizer
(agile DFS sythesizer), while the access point is receiving data on a
separate channel. Once DFS scanning completes in the aDFS
synthesizer, AP can switch its primary channel to this preCAC done
channel, without having to do a Channel Availability Check of 60
seconds

Hawkeye has native support for A-DFS unlike Cascade, which uses a
dedicated radar detector for background scanning. Each radio has two
synthesizers, one of which can be used for A-DFS.
Host driver will configure an A-DFS channel along with maintaining
pre-CAC Done list of channels.
PreCAC list caching of channels is limited to ETSI domain.

Once off channel CAC completes in the agile channel, HOST receives
O-CAC complete indication. O-CAC status included as a apart of event
params has information if the preCAC is successful or not. If RADAR
is found on the agile channel, host receives indication through the
existing radar indication event. HOST identifies the detection as
agile channel radar using the detector id value.

For SBS mode, there can be 2 pdev's which can include DFS channels.
Although the preCAC list is maintained separate for each pdev,
preCAC can only be performed for a single pdev at a time.
This is implemented by making the host timer common
for both pdevs,i.e psoc level timer.

The following commands can be used to set/get preCAC enable,as long
regdomain is ETSI along with agile capability enabled in the target
advertised to host in WMI ready event.
	iwpriv wifiX get_preCACEn
	iwpriv wifiX preCACEn 0/1

Change-Id: Id8eaf7526942cbf01a9a62a2b109813624ae550f
CRs-Fixed: 2385536
2019-03-05 23:22:50 -08:00
Linux Build Service Account
8d4b490186 Merge "qca-wifi: Fix per peer config cfr stop command" 2019-03-05 05:36:59 -08:00
narayan
57cc49dfbe qca-wifi: Fix per peer config cfr stop command
Fix cfr stop wmi command and some other fixes checking for
sanity, error handling.

Change-Id: I9f0939fee2301f85e6e7b3338fd26e84676d7d6d
CRs-Fixed: 2407354
2019-03-04 00:21:34 +05:30
Srinivas Pitla
0d598a6dc0 qca-wifi: Add flag for Multi VDEV restart synchronization
In current code, channel number is checked to enable multivdev restart
synchronization, this assumption is not valid as channel width change
can also be requested.

To fix this, used a flag to enable multivdev restart synchronization.

Change-Id: I30b766d4430e3ce98de29d6194dc43cc42bbf0f6
CRs-Fixed: 2400987
2019-03-02 19:46:39 -08:00
Linux Build Service Account
0f8041a4fb Merge "qca-wifi: Enhancement of auto channel zerowait PreCAC for 160MHz mode" 2019-03-02 12:34:13 -08:00
narayan
6ffa911be3 qca-wifi: Fixes needed to enable cfr compile flag
Compilation fixes required to enable cfr compile flag

Change-Id: I0dd739a695d89a0effb6c116919ae915b2e22f0e
CRs-Fixed: 2407354
2019-03-01 22:43:07 -08:00
Shreedhar Parande
abbc0faf94 qca-wifi: Enhancement of auto channel zerowait PreCAC for 160MHz mode
If user configures DFS channel in 160MHz mode,
1. change mode to 80MHz and do PreCAC on primary and
   secondary channels of 160MHz.
2. Use intermediate channel to operate.
3. Once PreCAC done on the both primary and secondary channels and is clear
   then change mode back to 160MHz.
4. Change the channel from intermediate to configured DFS channel.
Use Broadcast and Unicast OMN frame to notify mode change.

Change-Id: I451e35516ab4a44adea52a1342b5ea76d6e3d04f
CRs-fixed: 2395431
2019-02-27 17:49:43 +05:30
narayan
70480abe44 qca-wifi: CFR feature Component Support
Add CFR component support for legacy chipsets including
the implementation of stream filesystem interfacing

Change-Id: Id92a4592425e901cc86061ae5eccefc5438efd45
CRs-Fixed: 2397716
2019-02-21 22:28:24 -08:00
Vikram Kandukuri
1f97c2c40e qca-wifi: Add CFR component
Add Channel Frequency Response component,
This provides dispatcher and core API that can
be used by other modules.

Change-Id: I032b312c6b88494756a21afb5a36179bceb2f214
CRs-Fixed: 2372061
2019-02-09 09:50:40 +05:30
Srinivas Pitla
c68e9fb218 qca-wifi: Remove QDF_BUG on channel check failure
This change removes QDF_BUG if channel match fails with other vdev,
prints would help to debug further on any issue.

Change-Id: I9566fe699d6124542dbb3075e470c887de1a612a
CRs-Fixed: 2391464
2019-02-01 22:49:25 +05:30
Srinivas Pitla
77752e288e qca-wifi: VDEV SM action implementation
Few trivial SM actions are being moved to converged code

Change-Id: I60c4bedf072d9cddaf872e9c3ea9364b70c65b6d
CRs-Fixed: 2307722
2019-01-17 13:37:04 +05:30
Naga
b01d2ed754 qca-wifi: Add new files in cp_stats component
Add new files in cp_stats component which are WIN
specific and moved from cmn_dev

Change-Id: I80236dd6fbe9caf1960033b2fa50982e187ec80e
2018-11-27 15:20:31 +05:30
Hariharan Basuthkar
fa65cbe5a8 qca-wifi: Add WIN only DFS files from qca-wifi-host-cmn
WIN DFS only files are moved from qca-wifi-host-cmn to qca-wifi-oss

Change-Id: Ieeb658331fd9990a48744248e83a35760259d27d
2018-10-23 21:11:43 -07:00