Commit Graph

91 Commits

Author SHA1 Message Date
Abhijit Pradhan
e556063bc7 qcacmn: Rename a DFS CAC function and corresponding function pointer
Rename the function dfs_mlme_deliver_event_up_afrer_cac() to
dfs_mlme_deliver_event_up_after_cac and rename the function pointer
mlme_deliver_event_up_afrer_ca to mlme_deliver_event_up_after_cac

Change-Id: I29c2094a0b45c9583b897e088ce9938c759e26ba
CRs-Fixed: 2251792
2018-06-25 17:37:30 -07:00
Arif Hussain
ecef5a4024 qcacmn: Add api to get dfs offload service bit in target_if
Add api to get dfs offload service bit in target_if.

Change-Id: I771ae8a2194250769d6e6d609b0a1863012110ea
CRs-Fixed: 2264477
2018-06-25 10:02:30 -07:00
Shaakir Mohamed
a0895b9989 qcacmn: Add support for ETSI pre-CAC cleared list
In ETSI domain, after CAC, channel is added to ETSI CAC cleared list,
so that next time it can skip CAC if channel is already present in this
list. If radar found, remove channel(s) from this list indicating that
when channel(s) is/are selected in future, the CAC needs to be re-done.

Change-Id: If6b31ecda2ab159188e7724bce7d1c2d8375fa3c
CRs-Fixed: 2143266
2018-06-20 21:23:28 -07:00
Shashikala Prabhu
ab1d4c30ca qcacmn: Cleanup dfs unused function
Cleanup dfs_mlme_channel_mark_radar unused function.

Change-Id: I16aeacbca8f44de4dcab5667b6065fbb9b5c39d7
CRs-Fixed: 2245665
2018-06-15 20:10:50 -07:00
Kiran Venkatappa
68cd728ed8 qcacmn: Fix compiler failure with HOST_DFS_SPOOF_TEST not defined
Callbacks are defined for both cases, so remove compiler
flag around callback declaration and assign callback for both
HOST_DFS_SPOOF_TEST enabled and disabled cases.

Change-Id: I5e3cedaaa5be550243ac090da3ab6499c5e83904
CRs-Fixed: 2249806
2018-06-15 12:39:36 -07:00
Wen Gong
67d105d445 qcacmn: Add DFS master feature flag
Add config flag to enable / disable DFS master feature

Change-Id: Iddd82dd5f117a4d75fda161f5a531aa7eab25016
CRs-Fixed: 2222557
2018-05-24 00:49:52 -07:00
bings
3a7cf9b158 qcacmn: Refine chirp check for ETSI type 4 radar
Currently if the delta peak of the ETSI type 4 radar pulse is 0, it will
be considered as radar false dection, which affects normal dfs ETSI type
4 certification test.

More checks are added when delta peak of the ETSI type 4 radar pulse is 0.
If psidx_diff, the difference in the FFT peak index between the short FFT
and the first long FFT, is greater than 4 and less than 16, it is still
considered as valid ETSI type 4 radar pulse.

Change-Id: Iee9c22e0c208023bb9f0f70121f8269169b63d18
CRs-Fixed: 2173576
2018-05-23 20:45:39 -07:00
Vignesh U
8785b9dd69 qcacmn: Process host DFS confirmation status from firmware
Process firmware status event on radar found and take necessary actions.

Change-Id: I7ddb2b1a45e97a4ea52eb9b2d718f467726aad04
CRs-Fixed: 2211883
2018-05-21 03:53:35 -07:00
Vignesh U
661654d376 qcacmn: Send radar found command to FW
In FCC domain, process the radar pulses and send the summary of radar
found information to FW.

Change-Id: Ib30f57927a9718315fd90f5c44d47dae38bf36f0
CRs-Fixed: 2211883
2018-05-21 03:53:32 -07:00
Arif Hussain
c8fe4680ae qcacmn: Fix sending dfs offload enable command sequence
Currently dfs offload command is sent during event registration
when psoc object is created. Dfs offload command is sent by accessing
pdev object, as pdev object during this time may not be created
or maybe in logically deleted state and sending command may fail.
This failure may cause wifi_dfs_psoc_enable and thereby effecting
other module objects.

To fix this, avoid using pdev objects during psoc enable, and send
pdev object specific command when pdev is created.

Change-Id: Ia10d493267259d0fbd918453e532b4f244029163
CRs-Fixed: 2179845
2018-02-23 06:05:56 -08:00
bings
0c590ceba4 qcacmn: Move dfs leakage from qcacld to qcacmn
Move dfs leakage from qcacld to dfs module of qcacmn.

Change-Id: I17276fedf575f1a4029265be58d8fd088c1d956d
CRs-Fixed: 2177679
2018-02-04 21:43:31 -08:00
Srinivas Pitla
ee54aea6d8 qcacmn: Add target_if changes to DFS
Use target_if APIs to get dfs offload capability

Change-Id: Ic23770b0407e33e4b031bbbc4a8224663ac57e32
CRs-Fixed: 2177109
2018-02-03 15:11:02 -08:00
bings
c83573954f qcacmn: Extend radar event structure for ETSI chirp radar detection
The pulse_delta_peak of chirp radar is not zero, which is one more radar
detection rule for ETSI chirp. Driver need delta peak related information
from FW for ETSI chirp radar detection.

Two more fields pulse_delta_peak and pulse_delta_diff are added in
wmi_dfs_radar_event_fixed_param.

Change-Id: Ief8dbea1c1336f45a24195853d5e1356bf3cad27
CRs-Fixed: 2179933
2018-01-30 09:25:49 -08:00
bings
9c524f5fc4 qcacmn: Restore WMI_DFS_RADAR_EVENTID for Rome FW
Currently WMI handler for WMI_PHYERR_EVENTID is used to handle DFS and
spectral scan phy errors; but Rome FW still uses WMI_PHYERR_EVENTID
and WMI_DFS_RADAR_EVENTID and does not have spectral scan phy errors.

Restore WMI_PHYERR_EVENTID and WMI_DFS_RADAR_EVENTID as Rome FW
requirement.

Change-Id: I16761f6da947619a5969ac8dcd09498d508ad715
CRs-Fixed: 2160954
2018-01-27 00:10:32 -08:00
Shashikala Prabhu
a072dc55f7 qcacmn: Replace substring IEEE80211 by WLAN in DFS component
Replace substring IEEE80211 by WLAN in DFS component

Change-Id: I77bcbe0fc34514928a14c6208e33083ef17834af
CRs-Fixed: 2148682
2017-12-04 21:32:40 -08:00
Abhijit Pradhan
9ae09aeace qcacmn: Have same dfs action for Fulloffload and legacy
After RADAR detection the function should be used for
1)FullOffload
2)Legacy [ partial offload and Direct attach]
chipsets.

Change-Id: Id99f9f25dc5a9f751f9ad74c07a78fb980673300
CRs-Fixed: 2126916
2017-11-21 23:25:41 -08:00
Shashikala Prabhu
2a9f2a0525 qcacmn: Rename dfs_ioctl.h as wlan_dfs_ioctl.h
Rename dfs_ioctl.h file as wlan_dfs_ioctl.h and
move it from cmn_services directory to dfs dispatcher.

Change-Id: I75e0337bd84b71cf77975656423f78f9b016285f
CRs-Fixed: 2127833
2017-11-21 07:32:05 -08:00
Abhijit Pradhan
f9df7db9b5 qcacmn: Avoid functions with a very long list of arguments
To avoid passing multiple parameters to MLME functions from DFS
component, use a common structure between these components and
pass the structure instead of long list of parameters.
Define the common structure in cmn_services directory to access
it in both the components.

Change-Id: I02dde0780eebbce0886685d1f72a62c84e5b4eeb
CRs-Fixed: 2146000
2017-11-21 07:32:03 -08:00
Shashikala Prabhu
d9bf209f70 qcacmn: ETSI 302-502 Radar Pattern for ETSI11
According to the updates of Regdomain_23 submitted on 2017-5-18,
added two pulses (ETSI 302-502) in the static ETSI radar table for
ETSI11 regdomain.These two pulses are applicable only for 5.8GHz
(greater than 5.725 GHz)  channels.

Change-Id: I2f1e5535040ced9847eedff65dbe892e4d0fb056
CRs-Fixed: 2145124
2017-11-17 07:21:06 -08:00
Abhijit Pradhan
7383ef9d7e qcacmn: Fix compilation issues for DFS component disable/enable
Header files are included in appropriate places to avoid compilation
errors. To disable/enable DFS component from non-common code at
compile time, use macro QCA_DFS_COMPONENT_ENABLE in config  file.

Change-Id: I0d4fe27ee0d76412c109aa3f64485ea1ac2a5e3a
CRs-Fixed: 2134355
2017-11-05 04:45:51 -08:00
Shashikala Prabhu
2427663f1f qcacmn: Cleanup old random channel function
Removed WIN based random channel selection algorithm.
To choose a new random channel, use converged random
channel  algorithm.

Change-Id: I0ece0cb71ffeb694c9f5264d97a25e49d59b1ae8
CRs-Fixed: 2120265
2017-11-04 06:59:52 -07:00
Shaakir Mohamed
f6cb4b8576 qcacmn: Avoid CAC when switching to the same channel
Changes related to If63678a7e9ce00c1166e7f6533e5eaa0b0ae67a5
on modifying declaration of dfs_mlme_start_csa function on mlme side.

Change-Id: Id746faaaa2cdbdb48f80056eec3dd661a30122e5
CRs-fixed: 2117811
2017-10-23 13:43:22 -07:00
Shaakir Mohamed
03a8b15221 qcacmn: Handle dfs pulse information in host side
Adds support to dump dfs pulse information from firmware to host
for debug purpose.

Change-Id: I3b2042f8df6e077eed1a3847cd2d8550794bc6f7
CRs-fixed: 2121833
2017-10-16 05:55:59 -07:00
Shaakir Mohamed
a1a7e163af qcacmn: Add support for bangradar for hawkeye
Add support for bangradar command to send unit test command
to firmware as a hook to simulate radar injection

Change-Id: Ieaa7eab6d452ab864a10beca1478d0e61d605107
CRs-fixed: 2113724
2017-10-15 15:48:09 -07:00
Shaakir Mohamed
6f35bb0636 qcacmn: Add usenol support for full offload
In fulloffload mode, based on the value of the usenol variable decide
whether to add the channel to NOL or not. In future, we need to merge
this code with non-full offload. That will remove redundant code.

Change-Id: I2bb403c3983a4a1eac906e6c13a3ec6a13fdc436
CRs-fixed: 2102829
2017-10-15 15:48:08 -07:00
Arif Hussain
6dfa7ee2a1 qcacmn: Add utils_ prefix to dfs public functions
Add utils_ prefix to all dfs public APIs.

Change-Id: I154c9f9a324c1af815363d3cbf52febd1bed342e
CRs-Fixed: 2124362
2017-10-12 14:22:22 -07:00
Shashikala Prabhu
41eff4f752 qcacmn: Initialize DFS radar table based on dfsdomain
* Initialize the radar table based on dfsdomain for country
  KOREA and CHINA.
* Move UMAC related APIs from lmac_api.c to utils_api.c  file.

Change-Id: I9dc2acdf23fc10469884d23bb91f352d2ac259ca
CRs-Fixed: 2110760
2017-10-12 14:21:55 -07:00
Abhijit Pradhan
09e53bd45c qcacmn: Wait for 2secs before sending CSA
Reverse CSA:
===========
Problem:
When Repater detects the RADAR, it sends RCSA to RootAP and
immediately switches to a new channel without waiting for CSA
from Root AP.

Expected behaviour:
When Repeater detects the RADAR, if uplink is present then it sends
RCSA to RootAP and waits for 2secs to receive CSA. If Repeater
does not receive CSA in 2sec, choose a random channel and
bring up the AP vap.

Solution:
In Repeater, if RCSA is sent successfully to RootAP then wait for
2secs to receive CSA from Root else choose a random channel and
bring up the vaps.

Change-Id: Ica204981db85917554c06cd86c0e016df624c45f
CRs-Fixed: 2104219
2017-10-03 08:24:07 -07:00
Shashikala Prabhu
76192e12a9 qcacmn: Register a DFS callback function to get AP CAC status
In Repeater AP scenario, when STA vap starts scan, it calls this
registered DFS callback function to get the AP CAC status. If the
AP vap is performing CAC, STA vap does not start SCAN.

Change-Id: Ifa3ad0298f1b04f3fffc915f20ff81ec0cc731bf
CRs-Fixed: 2096259
2017-09-02 00:17:42 -07:00
Shashikala Prabhu
8c01b66c0e qcacmn: Fix DFS kernel panic
Due to dfs and 'ic' flag mismatch, ieee80211_find_channel()
was returning channel as NULL.

Change-Id: I2c8a09b5a1018d7daf2a925bcad7063a6b0e2988
CRs-Fixed: 2067959
2017-07-23 13:57:16 -07:00
Abhijit Pradhan
fe7233a795 qcacmn: Fix DFS kernel panic
As part of DFS component destroy, "ic" is accessed to reset
NOL list and PRECAC channel list, but "ic" is already deleted
as part of MLME component destroy. And therefore invalid memory
access happens.

Reset NOL list and PRECAC channel list before "ic" deletion.

Change-Id: I1dbf273f1ea51945493140bfce9bfa116ad0c488
CRs-Fixed: 2071164
2017-07-21 17:07:00 -07:00
Abhijit Pradhan
c5152c7904 qcacmn: DFS code cleanup
* Remove nif and sif keyword.
* Combine nif_dfs_detach and sif_dfs_detach.
* Combine nif_dfs_attach and dfs_attach.

Change-Id: Ibf4638a64fac976846bfcb1eae91f3f3bb3e994e
CRs-Fixed: 2071164
2017-07-21 17:06:59 -07:00
Abhijit Pradhan
7dc39001a5 qcacmn: Avoid using "ic_" prefix in common component code
In DFS component the prefix "ic_ " was being used to represent ieee80211
channel related variables. Now  use prefix "dfs_ch_" instead of "ic_".

Change-Id: I2f739dc22ad89b7e410c06462876a22c2a615883
CRs-Fixed: 2056957
2017-06-10 03:28:24 -07:00
Abhijit Pradhan
b4ebf34ea2 qcacmn: DFS kernel panic fixed
NULL pointer dereference is fixed.

Change-Id: I6c5dce998dd276306a42a14253450965329afd56
CRs-Fixed: 2001106
2017-04-29 00:41:30 -07:00
Arif Hussain
a23b01405b qcacmn: Implement converting freq/chan within dfs
Implement converting freq to chan and chan to freq
within dfs module.

Change-Id: Id9b39dbe90264621b0702a99a8df69fff9af9dd3
CRs-Fixed: 2017481
2017-04-27 18:16:49 -07:00
Arif Hussain
61cbab79c3 qcacmn: Fix frame-larger-than Werror in dfs
Fix Werror=frame-larger-than by reducing size
of DFS_MAX_NOL_CHANNEL from 128 to 80.

Change-Id: I37271a48bf5172c3fb2d568b58e8f7448bf4ed28
CRs-Fixed: 2017481
2017-04-25 01:08:38 -07:00
Arif Hussain
cc21cb2e15 qcacmn: Add acs range support in random channel selection
Add support to conside auto-channel selection range in random channel
selection algorithm.

If acs is enabled, random channel is selected from acs channel range.

Change-Id: I6ccf9ae58aa2d9b63133de3f98030078bf13cf49
CRs-Fixed: 2017481
2017-04-24 17:07:52 -07:00
Arif Hussain
8d88af5f32 qcacmn: Random channel selection public API
Add random channel selection public API.

Change-Id: I5502116fab17716a9d8f2f41ddd67bcbcdd1328c
CRs-Fixed: 2017481
2017-04-20 20:20:48 -07:00
Arif Hussain
c64510ba8b qcacmn: Process DFS events from firmware
Add support to process DFS events from firmware.

Change-Id: I38bea404fdb50d80430c8b14a2a4f6a729d3557e
CRs-Fixed: 2017481
2017-04-20 20:20:46 -07:00
Arif Hussain
a1e18b6b7d qcacmn: Add dfs public structure file
Add dfs public structure file.

Change-Id: Id34164da42d2d7b593fcb86ebd585140cd263f6e
CRs-Fixed: 2017481
2017-04-15 23:02:16 -07:00
Abhijit Pradhan
38ae892add qcacmn: DFS componentization (DFS Dispatcher)
DFS module provides  these public APIs for other modules to call DFS
functions.

Change-Id: I4f703416d7afe97d2304033b1c3b6c31914a83bb
CRs-Fixed: 2001106
2017-03-22 21:19:39 -07:00