Commit Graph

360 次程式碼提交

作者 SHA1 備註 提交日期
Amruta Kulkarni
7fe3773331 qcacmn: Remove wlan_reg_set_channel_params
- Remove wlan_reg_set_channel_params and the callers
 associated code.
- Clean up part of CONFIG_CHAN_NUM_API functions.

Change-Id: If9583e674752d6f47de8d7d6bc946909509957b5
CRs-Fixed: 2883773
2021-03-11 19:42:48 +05:30
Ananya Barat
7c33a279fd qcacmn: Do not enable all the dfs error prints by default
A huge number of prints come under dfs_err. Enabling all of these
unnecessarily floods the console and some of these prints show up for
expected behavior such as  the dfs object being null for a 6GHz radio.
Only memory specific prints could be enabled specifically later.

CRs-Fixed: 2887966
Change-Id: I27091924450d1cc3d4e3df38e49f1a537e080bc6
2021-03-07 02:27:41 -08:00
Will Huang
cb60cd6b2b qcacmn: Add back dfs_set_nol() to common code
dfs_set_nol function is also required by MCC DFS function, Change-Id
I6c74dd13a16acb2a67bb3b477b13bc0e4ee165ce move implementation from
common code to WIN, add back it.

Change-Id: I46c16eec82024c3af4b4cee02ff19edb0023d3b6
CRs-Fixed: 2875061
2021-02-28 20:00:49 -08:00
Vijay Krishnan
31dfdf84bf qcacmn: Enable dfs_err logs on default
During wifi load and unload, multiple memory allocations and deallocations
are done in the path of dfs_deinit_precac_list, and at a particular
instance there is a crash seen due to an invalid paging request.

The QDF_TRACE_LEVEL_ERROR logs are not enabled by default. These prints
can be useful in debugging the issue when it occurs the next time.
Hence, the dfs_err prints are enabled by default.

When a crash occurs with the dfs_precac list functionality, debugging the
crash with dumps in T32 is difficult. During wifi unload, the api
wlan_dfs_pdev_obj_destroy_notification is called. On first step, the pdev
component is detached making the pdev component as NULL and after that
dfs component is detached. So when crash happens at this point, pdev
component is already NULL and analysing dumps with T32 is useless at this
stage.

Therefore, modify the order of dfs detach in
wlan_dfs_pdev_obj_destroy_notification. First detach the dfs component and
then detach the pdev component.

CRs-Fixed: 2872097
Change-Id: I157c6e6272bf4dd3676588b7ee6889fdb2efa5dc
2021-02-18 07:47:00 -08:00
Priyadarshnee Srinivasan
9f20356fa4 qcacmn: Unmark 'NOL chan' before channel list update
After NOL expiry of the radar hit channel, the scan channel list
of the FW is updated to include 'NOL expired' channel as well
so that FW can initiate subsequent scan on this channel.
Only those channels which are not marked as NOL in regulatory
are updated in the scan channel list.

However, in the current flow of events, the scan channel list is
first updated via dfs_nol_update() API and then channel is
unmarked as NOL in utils_dfs_reg_update_nol_chan_for_freq() API.
Hence the NOL expired channel is not updated to FW and subsequent
scanning does not happen on this channel.
Ensured that the channel is cleared of NOL flag before updating
the scan channel list.

CRs-Fixed: 2877337
Change-Id: I7331bcc12c1dd6a26407c0753f28481cee1ce628
2021-02-17 02:10:26 -08:00
Priyadarshnee
86e7dac64c qcacmn: Add an API to restart RCAC on NOL expiry
Add function declaration for  dfs_restart_rcac_on_nol_expiry()
API. This API helps to restart RCAC on NOL expired channel
with interCAC and RCAC feature enabled.

CRs-Fixed: 2860727
Change-Id: Ifc06ed938ebc7cc6ccbe68989158939d6f399c46
2021-02-05 09:49:34 -08:00
Priyadarshnee
ae12eefb50 qcacmn: Add an API to process spoof completion
Add function declaration for mlme_proc_spoof_success API and its
corresponding function pointers. This API is used to process spoof
completion status from FW.

Change-Id: Ia25ffd01619a0c9d1e5a1bc4c20623b75ee8d75e
2021-02-01 00:52:06 -08:00
Vijay Krishnan
63f4a150bb qcacmn: Debug prints to check Average params
During DFS_SPOOF_FAILURE Check, the reason for failure is unknown.
So for debugging analysis purposes, add debug prints to print the
average params that are sent to FW.

CRs-Fixed: 2847047
Change-Id: If1e20352f62f4286396a9f93f49c528bbf38f95e
2021-01-28 21:57:15 -08:00
sheenam monga
5743559888 qcacmn: Remove utils_dfs_bw_reduced_channel
Remove utils_dfs_bw_reduced_channel as this
function is not used by MCL or WIN.

Change-Id: I042578fea76cd845b90f240fa3e814e50f2eaf5b
CRs-Fixed: 2859799
2021-01-28 06:19:41 -08:00
Vignesh U
9ad985593b qcacmn: Remove unwanted header files from common DFS
The sm engine header files are required only for ADFS sm handling.
Move the header file to the ADFS sm source file.

Change-Id: Icc77a889d6bf28d8c0b20a12944f9be78d1a8c27
CRs-Fixed: 2853428
2021-01-19 21:16:14 -08:00
Edayilliam Jayadev
1dfb6de288 qcacmn: Return agile precac enable as false when DFS object is null
DFS component's pdev private object allocation is skipped in
few scenarios. In this case return agile precac enable as false.

CRs-Fixed: 2853435
Change-Id: I7725e9bcbd05b2c9f1b1ee217cc8eb8a2df8144a
2021-01-19 06:00:18 -08:00
Pavankumar Nandeshwar
1adba0a413 qcacmn: change qcn9100 to qcn6122 in hif and umac
Change the name of target type qcn9100
to qcn6122 in hif and umac.

Change-Id: Ia473c531a0903fd514dacf645d23bec3886fd719
CRs-Fixed: 2849577
2021-01-18 21:45:34 -08:00
Ananya Barat
6b309b7dbe qcacmn: Enable STA DFS in F/W
If STA DFS is enabled before vdev creation through etc/config/wireless
then VDEV START is sent to F/W as a part of the normal flow to bring
the VAP up. However, if STA DFS is enabled/disabled on the fly for a
running VAP then do a VDEV STOP, followed by a VDEV START of the STA
VAP and set/unset WMI_CHAN_FLAG_STA_DFS flag in VDEV start.

Change-Id: I032ffa53d89eaafcb43c648670af3b3f2134561f
CRs-Fixed: 2843248
2021-01-13 02:34:49 -08:00
Vignesh Mohan
7bf41957c0 qcacmn: Use 160MHz center while calculating subchannels
Use 160MHz center while calculating subchannels.

Change-Id: I2059ebce90624a5bddfc8787380de6c59625d44e
2021-01-07 14:36:04 -08:00
Wu Gao
f9ead26a48 qcacmn: Add dfs macros to avoid compilation issue
There is compilation issue since dfs macros only defined with
WLAN_COMP_CHAN_MODE. So adds related definitions for the case without
WLAN_COMP_CHAN_MODE.

Change-Id: I4b9f16b5000304157067be565864cc79c510770f
CRs-Fixed: 2848979
2021-01-06 17:58:05 -08:00
Surya Prakash Raajen
21e219fe2f qcacmn: Reorder and optimize channel mode macros
Reorder channel mode macros to have macros in logical
order, and to optimize the channel modes to use
bit specific enums instead of single bit to reduce
the usage of number of bits. The changes are specific
to host

Example for Channel mode: IEEE80211_CHAN_HE20
Channel modes represents only the information regarding
to channel such as band, width, passive, DFS, blocked
40MHz_intolerant and so. It doesn't have information
regarding hwmode like 11ac,11ax.

CRs-Fixed: 2846331
Change-Id: I197de032a4d677a27b46028fa090a6eabe0c6086
2021-01-05 02:59:30 -08:00
Vignesh Mohan
d32051f608 qcacmn: Replace radar checks to use regulatory channel list
In DFS, to check if a channel is radar, we use the flags that
are filled from UMAC to check for radar. Since the channel list
in UMAC are dynamically calculated, the dynamic flags will not be
consistent over multiple channel pointers.

Use the radar information in regulatory for individual subchannels
to check for radar in a given channel. Define these new APIs
under a feature specific macro.

Change-Id: I7f86560c3d29d2366c6506ccf63204263cbc0ef1
CRs-Fixed: 2841168
2020-12-28 10:57:47 -08:00
Vijay Krishnan
d56177bd21 qcacmn: Add macro QCA_SUPPORT_DFS_CAC
Conditional compile dfs_cac functionalities to
avoid compilation issues.

Change-Id: Id81b51f071f9abfb666231f2b2005d3c594b7d1a
CRs-Fixed: 2843645
2020-12-24 09:52:34 -08:00
Vijay Krishnan
901ac719a7 qcacmn: Move WIN specific DFS features to WIN code
Move the WIN only DFS features from common code to WIN specific
Component dev. The following features are moved.
1. WIN Hardware mode switch.
2. StaDFS
3. dfs_set_nol
4. nol_history

CRs-Fixed: 2834311
Change-Id: I6c74dd13a16acb2a67bb3b477b13bc0e4ee165ce
2020-12-17 15:41:45 -08:00
Vijay Krishnan
607a31ed7e qcacmn: Move the post NOL feature to win code
The macro QCA_SUPPORT_DFS_CHAN_POSTNOL is specific to WIN code.
Therefore remove the macro QCA_SUPPORT_DFS_CHAN_POSTNOL and
associated code from Common code and add it to component dev.

CRs-Fixed: 2829537
Change-Id: Ib49424c44817d6af5e485c87d6f7b08afee4fa11
2020-12-15 09:50:27 -08:00
Vijay Krishnan
7136aa40cb qcacmn: Move DFS_BANGRADAR from common code to WIN
Remove the following functions from Common dev to component-dev:
1) dfs_bangradar
2) dfs_start_host_based_bangradar
3) dfs_fill_emulate_bang_radar_test
4) dfs_check_bangradar_sanity
5) dfs_start_host_based_bangradar

CRs-Fixed: 2829438
Change-Id: I5d3564bcb89e60629ee7fddc9827e03e9d9da6a2
2020-12-15 09:50:23 -08:00
Vignesh U
336f699034 qcacmn: Store and populate the DFS channel state array
Add an enum to encode various DFS channel states.

The dfs channel states are represented using a per dfs array object rather
than maintaining a channel state field for each channel (since dfs channel
states are not required for 2G and 6G channels).

The size of the array is approximately 30 because
first_dfs_chan = 52
last_dfs_chan = 161(in case of ETSI EN302 502)
channel_spacing = difference between 2 consecutive 5G channels = 4

size_of_the_array = (last_dfs_chan - first_dfs_chan) / channel_spacing
                  = (161 - 52) / 4
                  = 27.25
                  ~= 30;

The dfs channel array is indexed by hashing the frequency. The conversion
(hash function) is as follows:

given_chan_number = (given_chan_frequency - 5000) / 5;
where 5 is: 5Mhz  = minimum IEEE chan bandwidth.

array_index = (given_chan_number - first_dfs_chan) / channel_spacing;

Add the following functionalities:
1) initialize the DFS channel state array.
2) update the channel state array.
3) read the channel state array.
4) convert the channel frequency to channel state array index.
5) convert the dfs channel event to dfs channel state.

Change-Id: I7921571fcc80b43a7ef7caf92c34b016fe396e45
CRs-Fixed: 2823529
2020-12-05 07:27:49 -08:00
Vijay Krishnan
6be2aca5a4 qcacmn: Remove QCA_DFS_RCSA_SUPPORT from cmndev
The macro QCA_DFS_RCSA_SUPPORT is currently residing inside common
code. But this feature is not used by MCL, therefore in order to
reduce code approval process, this macro and associated code is moved
to WIN specific component-dev git repository.

CRs-Fixed: 2822626
Change-Id: I43a9e63ede5958f8641be1be45f7c5cd71820667
2020-12-02 20:49:33 -08:00
bings
7f63da092c qcacmn: Update NOL to platform even there is no nol channel
After clear nol channel, the number of nol channel is 0. We should update
this information to platform.

Change-Id: Ia39be9a2c53067629460ead6000c2661ead07f63
CRs-Fixed: 2818936
2020-11-19 22:46:18 -08:00
gaurank kathpalia
fe1cbc425d qcacmn: Filter out the 6ghz chan freq from valid freq list
Currently the driver does not have a support to
filter out the 6ghz frequencies from the valid freq
list, and hence there is a high chance of selecting
the 6ghz freq as an operating freq for SAP, which
the legacy clients won't be able to scan.

Fix is to add a support for filtering out the 6ghz
frequencies from the valid freq list.

Change-Id: I8e3552a254e2b79cc1fc09da3e1e06ac378cbb07
CRs-Fixed: 2801414
2020-11-10 04:57:42 -08:00
Vignesh Mohan
bc861d1193 qcacmn: Add zeroCAC(legacy) check before assigning cfreq2
While getting the bonded channels during radar, if preCAC timer
is running, we use the zeroCAC frequency as the secondary frequency.

Consider a device with agile DFS enabled and the home channel as
160MHz/80P80MHz. If radar is injected on the secondary segment of
the home channel, since agile preCAC is running, the zeroCAC frequency
is considered as the secondary center. This results in wrong
channels being added to NOL/failure (depending on the zeroCAC channels).

Use the zeroCAC frequency as secondary segment center during radar,
only if legacy preCAC is enabled.

Change-Id: I9a99b1c9968e622ffe55c662fd21586cfc587281
2020-11-10 00:58:20 -08:00
Vignesh Mohan
dc6fecf304 qcacmn: Do not use preCAC timer check for Rolling CAC
While checking for the radar source, the status of preCAC timer
is used to check if rolling CAC is active or not.

However, rolling CAC uses a different timer which results in
radar during rolling CAC to be treated as radar in home channel.
Check for preCAC timer only if agile preCAC is enabled.

CRs-Fixed: 2811313
Change-Id: I1f41e4fb83213abb8fd93531174063fad339f3b7
2020-11-09 22:57:47 -08:00
Vignesh Mohan
46be7cdcbd qcacmn: Use 80MHz as next BW after radar during 80p80MHz
With bandwidth reduction enabled, when radar is detected during
80p80MHz operation, if the primary segment is unaffected, the
next expected BW for the device is 80MHz. However, the API
reg_set_channel_params has the following bw precedence list:
80P80 -> 160 -> 80 -> 40 -> 20 MHz.

This is valid in normal channel change cases but when used for
the bandwidth reduction feature, 80P80MHz should be considered
same as 160MHz and the next bandwidth (to be checked) should be
80MHz.

Update the channel width in the channel params to 80MHz if
the current channel is 80P80MHz and call the regulatory API
to check channel availability with the updated params.

CRs-Fixed: 2805939
Change-Id: I4337a3a797d1c4b0ef19e47d0933d4dd292733b5
2020-11-02 01:47:11 -08:00
Vignesh U
b32ef7cdb0 qcacmn: Add ADFS compile-time macros
For a 16-MB profile, while insmoding "umac.ko" unknown symbol error for
function "dfs_translate_radar_params_for_agile_chan" is seen.

The actual definition of function
"dfs_translate_radar_params_for_agile_chan" is present in the
dfs_zero_cac.c which is not compiled for a 16-MB profile. Therefore,
the unknown symbol error is seen.

Add ADFS compile-time macros
QCA_SUPPORT_AGILE_DFS and QCA_SUPPORT_ADFS_RCAC to the declaration of the
ADFS specific function dfs_translate_radar_params_for_agile_chan().
As the macros are not present in 16-MB profile, the function becomes an
empty function in the zero_cac.h and definition of
dfs_translate_radar_params_for_agile_chan() is present (though empty)
in the umac.ko.

Change-Id: I2e28090ef99a76dad9f814f739c207f5bf0f2320
CRs-Fixed: 2802734
2020-10-25 03:36:20 -07:00
Vignesh U
1204abf461 qcacmn: Fix get bonding channels for a 80P80 chan
In the current code the function that gets the bonded sub-channels
dfs_get_bonding_channels_for_freq() does not take into consideration of the
80P80MHz channel. Rather, it takes into account the restricted 80p80MHz
channel and adds all the sub-channels of the restricted 80p80MHz into the
list.

This is not desired because, when the current channel is 80p80MHz,
get bonded channels should also take the segment id into consideration and
should list only the sub-channels of the 80MHz indicated by the segment id.

Modify get bonding channel function, to list the sub-channels of a
80p80MHz channel in such a way that it lists only the sub-channels of
either primary segment or secondary based on the segment id.

Change-Id: Ia6bf001c976603345c15facfa9b23853b7cc185b
CRs-Fixed: 2795460
2020-10-17 03:46:44 -07:00
Vignesh U
f8a1105640 qcacmn: Modify sanity checks for various radar sources
In the current code, dfs_radarevent_basic_sanity() function is used to
check A) if the current channel is a non-dfs channel B) if it is a non-dfs
channel, a few queues and variables related to dfs filtering are reset.

dfs_radarevent_basic_sanity() is called from two different places namely:
i)dfs_process_radar_ind()
ii)dfs_process_radarevent()

While is okay to perform (B) for (ii) there is no need to do the same for
(i), as (i) is for full-offload chips only and there is no filtering done
in the HOST and thus resetting variable related to dfs filtering is
meaningless.

Instead of calling, dfs_radarevent_basic_sanity() from both (i) and (ii)
define two new functions:
C)dfs_radar_pulse_event_basic_sanity (Call from dfs_process_radarevent)
D)dfs_radar_found_event_basic_sanity (Call from dfs_process_radar_ind)

While both (C) and (D) check if the current channel is a non-DFS channel,
only (C) resets the variables related to filtering.

CRs-Fixed: 2764060
Change-Id: I8466687e889e5f2b9a57c89ef775f14f13dd8066
2020-10-16 06:55:36 -07:00
Vignesh U
640dc685cf qcacmn: Expand the scope of the check "radar on Agile detector"
The "radar on Agile detector" currently checks only if the detector
id in the radar found parameter is the same as the Agile detector id.

Increase the scope of the "radar on Agile detector" check by also
checking if the Agile PreCAC was enabled or if RCAC was enabled and
if PreCAC timer was running.

CRs-Fixed: 2770006
Change-Id: I064560f738bdcbbf4bcb45b37bae71a0829e4146
2020-10-09 06:47:25 -07:00
Vignesh Mohan
42c230b190 qcacmn: Add 80p80 check for postNOL channel switch
Add a missing chwidth check for 80p80 during channel switch
after NOL.

Change-Id: I08cb0ec8f0da9777577eef8ba7d58f535b105291
2020-10-08 12:24:06 -07:00
Vignesh U
cbc3df38c7 qcacmn: Introduce radar param translation for 160/165MHz Agile channel
For the Pine true 160MHz, the Host radar action receives radar parameters
based on the 160MHz synthesizer. Host internally converts these parameters
into 80MHz synthesizer parameters. This conversion API
dfs_translate_radar_params(), does not take care of Agile channel and is
based on the current channel.

Introduce a radar parameter translation API for radar detection on
160/165MHz Agile channel.

Change-Id: I97043da5837545da072d5da3139bc2cc9888aebc
CRs-Fixed: 2784493
2020-10-08 10:19:26 -07:00
Vignesh U
0650930e07 qcacmn: Radar found agile center frequency for 160/80P80 MHz
When a radar is detected by the Agile detector, the radar found center
frequency is same as the frequency configured to the Agile detector.

This is true for operation in 20/40/80MHz. When operating in 160MHz mode,
the Agile center frquency is the center frequency of the 160MHz channel
and when operating in restricted 80P80MHz channel the Agile detector is
configured with 5690MHz as center frequency 1 and 5775MHz as center
frequency 2. In these cases the radar found frequency should be based on
the segment id on which the radar is detected.

Modify the radar found found agile center frequency based on the
segment id.

While modifying the center frequency in the function to get the
bonding channels, it is to be noted that the API
dfs_get_bonding_channels_for_freq() is based on HK Agile DFS model.
That is, when the current channel is 80P80/160MHz mode, the agile
channel is 80MHz only. Whereas, for Pine, when the current channel
is 80P80MHz, the agile channel is 160MHz mode and when the current
channel is 160MHz, the agile channel might be 80P80MHz/165MHz channel or
160MHz channel.

Accommodate Pine ADFS considerations in
dfs_get_bonding_channels_for_freq().

Change-Id: I31710a73a79a52f29aa4229bc55e08b81311b8d6
CRs-Fixed: 2670679
2020-10-07 09:26:44 -07:00
Vignesh Mohan
4ec0baa83f qcacmn: Initialize postNOL width to invalid
Initialize postNOL width to CHWIDTH_INVALID instead of 0 which
is mapped to CHWIDTH_20MHZ to avoid channel changes to HT20 mode
after NOL.

Change-Id: I684f38ddb0dc76cccfede74bd6424162407b378f
2020-10-05 09:29:38 -07:00
suresh
d7655884fd qcacmn: Remove DA-Specific flags in DFS source code
DA_SUPPORT macro specific code changes are removed
in DFS source code. Also, remove DA_SUPPORT macro
reference in file wlan_global_lmac_if.c

Remove the compile time flag WLAN_DFS_DIRECT_ATTACH
and related souce code.

Other DA-specific code changes are also removed.

Change-Id: Id9fdf547efd0b0332173ac1349811171e4e6acec
2020-10-02 03:38:08 -07:00
sheenam monga
ba9e7a24f6 qcacmn: Avoid excessive logging
Issue: log level for some frequent prints is set to info
those logs would be present in dmesg as well as driver logs
and System performance may get affected due to excessive
logging.

Fix: Avoid redundant logs which may affect system
performance and change default log level to debug.

Change-Id: I053e95806884eab26c37340823b818c9e3c81036
CRs-Fixed: 2771412
2020-09-24 13:19:54 -07:00
Vijay Krishnan
30d4093334 qcacmn: Remove dfs_mlme_mark_dfs_for_freq function
The function dfs_mlme_mark_dfs_for_freq was introduced as a counterpart of
dfs_mlme_mark_dfs but both implement same functionality. In order to remove
redundancy, remove dfs_mlme_mark_dfs_for_freq. Replace the references to
dfs_mlme_mark_dfs_for_freq with dfs_mlme_mark_dfs.

CRs-Fixed: 2738831
Change-Id: I567861e4491802d73549670dfd30113b1a773d07
2020-09-18 07:30:08 -07:00
Srinivas Girigowda
99cdc9aeff qcacmn: umac: Remove redundant __func__ from the logs
The logging macros implicitly takes care of embedding function name
in the log, hence there is no need to include __func__ again.
Getting rid of redundant __func__ reduces driver memory footprint.

Change-Id: Ife4d1dbb9bfafa4381f1017e331ddef247c649c2
CRs-Fixed: 2774457
2020-09-15 02:45:50 -07:00
Hariharan Basuthkar
b820d97f13 qcacmn: Check if inter-band switch is allowed in random channel selection
During DFS random channel selection, in the function
utils_dfs_get_channel_list, check if inter-band channel switch is
allowed before adding the inter-band channels in the channel list,
from which a random channel is selected as the target channel.

Change-Id: I3f6c88788819039c4b562b462a922edf1baafe12
CRs-Fixed: 2771640
2020-09-09 09:58:36 -07:00
Hariharan Basuthkar
9fed3d69fb qcacmn: Do not create a DFS object for a 6G only radio
Do not create a DFS object for a radio if the channel frequency range
advertised by the target is a 6G only range.

Change-Id: Ib672902ec3945d00b53ab6d4460584ca889ae387
CRs-Fixed: 2755652
2020-09-08 00:47:36 -07:00
Pavankumar Nandeshwar
42c974a68d qcacmn: Target_if changes for QCN9100 bringup
Initial changes for bring up of QCN9100 in
target_if layer

Change-Id: I216cb52001b6e0c87a1c4b45990aad0ea83b4933
2020-09-01 01:49:54 -07:00
Vignesh Mohan
cb9f7ad948 qcacmn: Add APIs to find preCAC status of the given channel
Introduce DFS utils APIs to find preCAC status of the given
channel.

Change-Id: If47411af82b43b9dcff04ba2f84cdb10ec9ca1f1
2020-08-18 11:01:02 -07:00
Vijay Krishnan
8461a8d5cd qcacmn: Do not skip CAC if Spoof test is not complete
In Dependent Repeater, if the Repeater STA is connected to a Root-AP
in a DFS channel, then the Repeater AP which is configured in ETSI
domain comes up in the DFS channel doing CAC.

In FCC domain, whenever Spoof radar pulse comes, we check if the Spoof
check is done and skip the CAC accordingly. In case of other domains,
Spoof events are not present. Therefore, Spoof test can be always
considered complete for non-FCC domains. Also the test can always be
considered complete if the target/FW does not support spoof test.

CRs-Fixed: 2756845
Change-Id: Icac4dee5f3f69a2578a0a34d7aea9456aab63ece
2020-08-17 15:12:22 -07:00
Ananya Barat
f878c39090 qcacmn: Make init of dfs->dfs_soc_obj independent of the macros
With the current implementation dfs->dfs_soc_object was initialized in
function dfs_agile_soc_obj_init under the macro QCA_SUPPORT_AGILE_DFS
and ATH_SUPPORT_ZERO_CAC_DFS both of which are disabled for the low
memory profiles. Hence the dfs->dfs_soc_obj was not initialized for these
profiles, this led to a crash when the following access was made in
dfs_is_true_160mhz_supported and dfs_is_restricted_80p80mhz_supported.

psoc = dfs->dfs_soc_obj->psoc
Fix this by unconditionally initializing the dfs->dfs_soc_obj in
wlan_dfs_pdev_obj_create_notification.

Change-Id: I3438464e8efedaf2d62a68bbcf1bda5ee0579deb
2020-08-15 11:12:30 -07:00
Hariharan Basuthkar
e808bb0cce qcacmn: Add 6G support for DFS Random channel selection
Add 6G support for DFS Random channel selection to move to a 6G target
channel in the event of a radar on a radio that supports both 5G and
6G channels.

Change-Id: I1ad65b36feba65b6bbc3affc243aae1beb12960c
CRs-Fixed: 2727958
2020-08-14 10:23:04 -07:00
Vignesh U
a693c6aa64 qcacmn: Expand DFS Radar found on curchan sanity check
Move the dfs current channel NULL check inside the routine that does the
sanity check(dfs_radarevent_basic_sanity()).

Since we have two completely different functions to handle radar from:
1) Home channel
2) Agile Channel
we do not need agile detector check in "radar from home channel" function.

Change-Id: Ie91f1d24c948e9d136f49d9ce8bc4cff29327862
CRs-Fixed: 2737944
2020-08-10 03:57:48 -07:00
Vignesh U
1869e7343c qcacmn: Remove agile part from current channel radar processing
The process radar found indication was generic radar action function that
caters to both radar on agile channel and current operating channel.
Since this API dfs_process_radar_ind() has been split into, one for
the radar on agile channel dfs_process_radar_ind_on_agile_chan() and
the other one dfs_process_radar_ind_on_cur_chan() for radar on current
channel, and the agile spefic functionalities have been defined in
dfs_process_radar_ind_on_agile_chan(), dfs_process_radar_ind_on_cur_chan()
need not have any agile specific part.

Remove the agile specific part in dfs_process_radar_ind_on_cur_chan().

Also changed the following: dfs_is_precac_timer_running function returns
true for both agilePrecac and legacy preCAC. Therefore replace
"dfs_is_precac_timer_running" by "dfs_is_legacy_precac_enabled" while
checking for the radarsource.

Change-Id: Id6921d0919a7a630d201ef7c1037510285b12d73
CRs-Fixed: 2737327
2020-08-10 03:57:45 -07:00
Vignesh U
ccd366019b qcacmn: Split DFS radar action
The process radar indication is huge making it difficult to read and debug.
It can be modularized into 3 high level functionalities based on whether
HW mode switch action is in progress or not, whether the radar found
detector id or segment id is the same as agile detector or segment and if
none of these conditions satisfy then the radar might be on the current
operating channel.

Classify DFS radar action based on HW mode switch status,
detector id and preCAC status into 3 sub-functions.
i)  dfs_radar_action_when_hw_mode_switch_in_progress()
ii) dfs_process_radar_ind_on_agile_chan()
iii) dfs_process_radar_ind_on_cur_chan()

Change-Id: I7d862eb08d6373fabaedda4b77deb966466f6b1a
CRs-Fixed: 2737273
2020-08-10 01:58:15 -07:00