提交線圖

458 次程式碼提交

作者 SHA1 備註 日期
D Harilakshmi
4e8a2584da Revert "qcacmn: add recommended err/debug function"
This reverts Change-Id: I6ab2bcd19b96cbbc943a60b2736dd3ab771f0b9c

Change-Id: Iafd0b31be948bb574584dfe1c77bb73125afd0e7
CRs-Fixed: 3470494
2023-04-25 12:08:05 -07:00
Linux Build Service Account
9d884ecece Merge "qcacmn: To acquire DFS_DATA_STRUCT_LOCK during the change of radar event" 2023-04-21 09:15:31 -07:00
Linux Build Service Account
d5900af48a Merge "qcacmn: Pebble bring-up changes in Umac and target_if layer" 2023-04-21 09:15:21 -07:00
Kannan Saravanan
e11f459ade qcacmn: Pebble bring-up changes in Umac and target_if layer
Add device Id and target type checks for qcn6432 target
compilation
Add CFR and spectral support for QCN6432

Change-Id: Ic908fa768aa1be7cfc40be7fcc7f9ca6aa85aaa6
CRs-Fixed: 3351747
2023-04-20 04:59:28 -07:00
KARTHIK KUMAR T
e9d807fa5e qcacmn: add recommended err/debug function
add recommended err/debug function

Change-Id: I6ab2bcd19b96cbbc943a60b2736dd3ab771f0b9c
CRs-Fixed: 3470494
2023-04-19 14:21:40 +05:30
Vijay Krishnan
c75e7910c9 qcacmn: Declare puncturing SM states, APIs
Implement the data structures for DFS puncturing and
un-puncturing state machines. For details of state
machine implementation refer to the change id
I5accbf2866a830447bd776b989c31909060c45ca.

CRs-Fixed: 3462277
Change-Id: I026228fb72302408f2992325099a31a60e986e3c
2023-04-13 16:34:53 -07:00
Divya R
9ff290a8a2 qcacmn: To acquire DFS_DATA_STRUCT_LOCK during the change of radar event
Following sequence of events results in a deadlock.

1.When channel change is in progress on channel 100.
In mlme_ext_vap_start_response_event_handler(),
wlan_vdev_mlme_sm_deliver_evt takes a mlme_vdev_sm_spin_lock
while posting WLAN_VDEV_SM_EV_RESTART_RESP event.

2.This mlme_vdev_sm_spin_lock is released only after
the RESTART RESPONSE action is completed. Restart response action
calls mlme_vdev_start_continue_cb() where
iv_enable_radar_table() is invoked. [[SM SPIN LOCK ACQUIRED]]

3.iv_enable_radar_table() = ol_ath_enable_radar_table.
This invokes ol_ath_init_and_enable_radar_table() where
dfs_get_radars() is invoked. This calls dfs_get_po_radars()
where WLAN_DFS_DATA_STRUCT_LOCK() is tried to be acquired.

4.However, acquisition of WLAN_DFS_DATA_STRUCT_LOCK() fails in (3)
because the lock is held by another thread mentioned in (5).
[[WAITING FOR DFS LOCK AS DFS TASK HAS ALREADY ACQUIRED]]

5.While AP is in START Response action detailed in (2),
there is a radar event received and dfs_task acquires
WLAN_DFS_DATA_STRUCT_LOCK. This lock is held till
VDEV RESTART is posted. [[DFS LOCK ACQUIRED]]
a.	Dfs_task
b.	dfs_process_radarevent
c.	dfs_radar_found_action
d.	dfs_radarfound_action_generic
e.	dfs_process_radar_ind
f.	dfs_process_radar_ind_on_home_chan
g.	mlme_dfs_mark_dfs
h.	ieee80211_mark_dfs
i.	ieee80211_dfs_action
j.	wlan_pdev_mlme_vdev_sm_notify_radar_ind
k.	mlme_vdev_sm_radar_notify
l.	wlan_vdev_mlme_sm_deliver_evt()
[[WAITING FOR SM SPIN LOCK WHICH IS ALREADY ACQUIRED IN (2)]]

Fix: To acquire WLAN_DFS_DATA_STRUCT_LOCK lock only around
dfs_process_each_radarevent() where the radar filter tables
/ radar queues/ delay lines are manipulated and release once
dfs_process_each_radarevent() is completed.
dfs_radar_found_action() which changes channel after radar
need not be protected by the DFS_DATA_STRUCT_LOCK.

Change-Id: I308f96d77c4e2e28f2ba1ec55f363202a8c25fe8
CRs-Fixed: 3403824
2023-04-13 20:58:46 +05:30
Jeff Johnson
cf334dc331 qcacmn: Revise dfs_log() for updated kernel-doc script
In Linux kernel 5.5, commit 43756e347f21 ("scripts/kernel-doc: Add
support for named variable macro arguments") improved how named
variable macro arguments are handled, and changed how they are
documented in kerneldoc comments from "@param...", to "@param",
deprecating the old syntax.

In Linux kernel 6.3, commit 3bdd9f075f54 ("scripts: kernel-doc: Remove
workaround for @param... syntax") removed support for the old syntax.

Currently the dfs_log() documentation uses the old syntax, so update
the documentation to use the new syntax.

Change-Id: I1aa44cd36ffacb0b26ee279496fc5a99b8de371d
CRs-Fixed: 3451492
2023-04-06 20:06:15 -07:00
Priyadarshnee Srinivasan
5b3d70f9a2 qcacmn: Address memory leak in dfs_init_chan_state_array
Fix memory leak in dfs_init_chan_state_array() API.

CRs-Fixed: 3442778
Change-Id: If2d7db598077975dc33617f6c30f6f86fb2d1247
2023-03-29 02:59:48 -07:00
Priyadarshnee Srinivasan
70a7674b32 qcacmn: Retrieve DFS channel parameters such as CAC, NOL, state
Add APIs to fetch the DFS channel parameters such as CAC, NOL and the
channel state to the user application.
struct dfs_cacelem is defined to store all the CAC related information
such as cac start time, cac completed time and the cac timeout.
dfs_cacelems is stored for NUM_5GHZ_CHANS in the dfs pdev object.
dfs_handle_cac_events() API is used to handle CAC related events such
as WLAN_EV_CAC_COMPLETED, WLAN_EV_CAC_RESET and radar during CAC.

CRs-Fixed: 3428828
Change-Id: I82f7aafeb20222d9722bed5a1a8c10b5703ac975
2023-03-23 00:14:50 -07:00
Jyoti Kumari
48ed0b7680 qcacmn: Pass vdev_id as an argument in policy_mgr_get_pcl()
Pass vdev_id as an argument in policy_mgr_get_pcl()

Change-Id: I047ec205632798a3e4e0da5ada6677764ae4f203
CRs-Fixed: 3412907
2023-03-22 00:40:43 -07:00
Priyadarshnee Srinivasan
f6e871c2b4 qcacmn: Fix unknown symbol error
dfs_disable_radar_and_flush_pulses() is defined under
HOST_DFS_SPOOF_TEST compiler macro and this macro is disabled for
a few config profiles. Hence when dfs_disable_radar_and_flush_pulses()
is invoked from dfs_process_radar_ind_on_home_chan() API, it causes
unknown symbol error.

Define dfs_disable_radar_and_flush_pulses() API outside
HOST_DFS_SPOOF_TEST macro as it is independent of spoof test feature.

CRs-Fixed: 3411429
Change-Id: I939c0154bc79c63b878c23447fc370a924c52049
2023-03-03 05:27:10 -08:00
Jianmin Zhu
a8fbfe3aae qcacmn: Enable dynamic puncture for DFS radar
1. Enable sub chan DFS type if QCA_DFS_BW_PUNCTURE defined, or all bonded
operation freq will be affected and disabled for nol, puncture can't work,
always need to switch freq.

2. Find nearest puncture pattern for a bitmap.
For example, SAP started with channel width 320 MHz, if only 20 MHz freq
affected by radar, 320 + 20 puncture pattern is invalid, but puncture
pattern 320 + 40 can be used.

3. Fix build issue when QCA_DFS_BW_PUNCTURE defined as following.
error: incompatible pointer types passing 'qdf_freq_t[16]' (aka
'unsigned int[16]') to parameter of type 'uint16_t *' (aka 'unsigned
short *')

Change-Id: I374ed76c6a13ef5fac1a78073f1b8974b0a9bb30
CRs-Fixed: 3386020
2023-02-07 11:32:35 -08:00
Anbarasan Ganesan
a15ee7308e qcacmn: Export symbol when compile time macro is enabled
As function is defined under compile time macro, also
export the symbol under the same macro.

Change-Id: Id2eba221dcb9c6d8cd7503e9d473199a50508309
CRs-Fixed: 3357183
2023-02-06 08:57:09 -08:00
Jeff Johnson
f57c0cf483 qcacmn: Fix umac/dfs documentation
The kernel-doc script identified some documentation errors in the
umac/dfs folder, so fix them.

Change-Id: Ia86989a39fe502480e2d2358a6f23759f78707e0
CRs-Fixed: 3382430
2023-02-05 12:40:54 -08:00
Divya R
8791a90b2d qcacmn: Rename the function names
80+80 MHz support HE capability as well. To make it generic,
change the function name from dfs_is_precac_done_on_ht8080_chan
to dfs_is_precac_done_on_80p80_chan.

The function dfs_is_precac_done_on_ht20_40_80_160_165_chan_for_freq
checks for 320 MHz channel width also. To make it generic, this function
has been renamed as dfs_is_precac_done_on_non_80p80_chan_for_freq.

Change-Id: I942e27b85f4f9e2ccc1786072b044deb0b4a6e45
CRs-Fixed: 3317795
2022-11-10 11:35:32 -08:00
Divya R
2c0d802926 qcacmn: Enable ADFS 320 MHz capability bit
A new capability bit from FW is introduced that provides
ADFS 320 MHz support information. supports_adfs_320 signifies
chainmask capability service bit if FW supports ADFS on 320 MHz
channel width. Add this capability bit(supports_adfs_320) in host.

Change-Id: I09c689658ef495d8a8707425ecc9ba922fce4d41
CRs-Fixed: 3317795
2022-11-09 02:03:06 -08:00
Jianmin Zhu
4be0519c35 qcacmn: Fix build issue
Missing symbol:b'dfs_disable_radar_and_flush_pulses' in wlan.ko.

Change-Id: Iff8464d02dbdb5100db84949b57e9bd2068dd7e9
CRs-Fixed: 3319825
2022-10-24 21:31:05 +08:00
Priyadarshnee Srinivasan
998c233d8f qcacmn: Flush radar pulses after spoof check
Spoof DFS check happens when AP is brought up in a DFS channel in
FCC domain. These spoof pulses are sent by FW in several bursts
via wmi_phyerr_event_id. Once host receives the first set of pulses
and if radar is detected by the host, host sends the radar found params
to FW. However, host does not disable the radar detection. Hence, host
continues to receive the next burst of spoof pulses and detects radar
again. This second set of radar found params when sent to FW is treated
as "real radar" pulses and FW sends a DFS status code of 2. Hence
host does a channel change to a new channel.

Hence the spill-over spoof pulses are treated as "real radar" and causes
frequent channel change on the DUT.

Once the first set of spoof pulses are detected as radar and radar found
params are sent to FW, disable DFS radar detection until the DFS status
check is received from FW. Once FW responds with a DFS status check,
re-enable the radar detection.

Change-Id: I57018776a449203c6467bb384120d4319bc04805
CRs-Fixed: 3305592
2022-10-23 05:15:04 -07:00
Kannan Saravanan
38f0453c6d qcacmn: Initial changes for york bring-up in umac layer
Add device Id and target type checks for qcn9160 target
compilation.

Change-Id: I2a26e1c45c61630594efd86466f19ea04300939f
CRs-Fixed: 3282641
2022-10-18 10:08:27 -07:00
Jeff Johnson
069b0bbcd9 qcacmn: umac: dfs: Fix misspellings
Fix misspellings in umac/dfs/...

Change-Id: Icda5ab395b83ab28fa8455a08514823b971b27a6
CRs-Fixed: 3304697
2022-10-10 23:02:33 -07:00
Jithender Miryala
eea229eb7d qcacmn: Create NOL and CAC HRtimer in softIRQ context by using hrt_mode
The NOL and CAC timeout callback function is divided into two parts:
HardIRQ and workqueue. If NOL/CAC expires, the callback function runs in a
HardIRQ context and the rest of the task runs in a workqueue to avoid
deadlock issues.

Issue: Workqueue tasks run in a low-level context. The task's execution
might have been delayed.

To fix this, run the "NOL" and "CAC" timer in softirq context.
Use QDF_CONTEXT_TASKLET instead of QDF_CONTEXT_HARDWARE as a argument in
qdf_hrtimer_init. If it is a "QDF_CONTEXT_TASKLET," the HR timer
initialises with softIRQ mode(HRTIMER_MODE_SOFT) and runs in softRQ
context when timer expires.

Change-Id: I9e23a9dff1a9c4669bb85342b3ffd91bc46ebe95
CRs-Fixed: 3239417
2022-09-27 08:43:36 -07:00
Priyadarshnee Srinivasan
61d0f0ab4e qcacmn: Fix compilation errors when ZCDFS macro is disabled
Fix compilation errors when ATH_SUPPORT_ZERO_CAC_DFS macro
is disabled.

CRs-Fixed: 3288434
Change-Id: I78d60dcbe88620dbf01a75d95670a2c310e7c773
2022-09-16 13:27:53 -07:00
Vijay Krishnan
516973c973 qcacmn: Fix compilation issue for BW puncture macro
The macro QCA_DFS_BW_PUNCTURE depends on the macro
WLAN_FEATURE_11BE. This creates compilation issue and fix
is introduced in this patch.

CRs-Fixed: 3283332
Change-Id: Ie00f7384142b39c309845408c6268ae6346f4734
2022-09-08 07:47:39 -07:00
Vijay Krishnan
056b6ae310 qcacmn: Fix compilation issue of QCA_DFS_BW_PUNCTURE
The macro QCA_DFS_BW_PUNCTURE depends on the macro
WLAN_FEATURE_11BE. This creates compilation issue and fix
is introduced in this patch.

CRs-Fixed: 3282072
Change-Id: I680670e58bd57d104bc69f2b4e7a56010b7584a5
2022-09-08 07:47:32 -07:00
Vijay Krishnan
ef864278aa qcacmn: Validate the proposed bitmap and enable puncturing
When radar is found in any DFS channel, a radar bitmap is
generated based on the radar infected channels. For example,
if operating channel is 100 HT160 and radar found in 112,
then the generated bitmap is B0000_0010. This proposed bitmap
is compared with the valid puncturing patterns. In this case,
the proposed bitmap is valid puncturing pattern.

In case of a valid puncturing pattern, send the final
bitmap to DFS module and the module updates the DFS channel
puncturing pattern. If an invalid puncturing pattern is
found, return value zero and do not update DFS channel
puncturing pattern.

CRs-Fixed: 3273800
Change-Id: Iee23ac267bfea1b4815a72c2728555f96bed6466
2022-09-08 07:47:25 -07:00
Vijay Krishnan
f9c54b61a3 qcacmn: Generate radar bitmap for the DFS channel
When radar is found on any DFS channel, generate a
bitmap which represents the channels that are
radar infected. For example, if the current channel
is 100 HT160 and radar is found in chan 104, then the
bitmap generated have the value B0000_0010. The bit 1
represents radar infected channels.

The radar bitmap calculation also checks for any existing
punctured patterns. If already punctured patterns are
available then it includes the existing pattern and
also current pattern in the bitmap calculation.

CRs-Fixed: 3273737
Change-Id: Icfc5d4e22980d3d2375152c12d244c7a8f5e318d
2022-09-06 04:23:49 -07:00
Vijay Krishnan
1d368b2881 qcacmn: Add function pointer to enable/disable DFS puncture
Add the global dispatcher function pointers to enable/disable
the DFS puncturing feature.

Add a new dfs member "dfs_use_puncture" to remember if the
feature is enabled or disabled.

CRs-Fixed: 3272765
Change-Id: I1f45a9f44ede7f8606f770365220c5f7508847cf
2022-09-05 08:29:01 -07:00
Jithender Miryala
969c3c5161 qcacmn: Add data and constants for frequency offset sign bit
Issue: The offset parameter in bangradar unit test parameter is only one
byte long. Whereas radar offsets has a range of [-160, 80] MHz if host
supports 320 MHz bandwidth. but with bangradar unit test command only till
-128 MHz is possible

To fix this, Add frequnecy offset sign bit(13th bit) if hosts supports
320 MHz bandwidth. Firmware will identify max range of [-160,80] with
sign bit.

Change-Id: I33ea8e9185f8d25b81cad7a18dcca6d2d6f42669
CRs-Fixed: 3270525
2022-09-04 23:14:08 -07:00
Jithender Miryala
26bf9ca291 qcacmn: set 'dfs' parameter if host and fw supports 320 MHz
Set dfs object parameter if host and fw supports 320 MHz bandwidth.
i.e. dfs->dfs_is_bangradar_320_enabled. Set to true if the host and
firmware support the bandwidth is 320 MHz. If there is no support, set
false.

Change-Id: I210823c448450f89dc65937201b4839168369d18
CRs-Fixed: 3270525
2022-09-04 23:14:01 -07:00
Priyadarshnee Srinivasan
c605b9e080 qcacmn: Send radar found event only for dfs channels
If radar is injected on the non-dfs segment of a DFS channel
(e.g. Operating channel is 36 HT160, center freq is 5250, freq_offset is
 -20, radarfound_freq = center freq + freq = 5230 (IEEE 46) which is a
non-dfs segment) using bangradar command, radar detect event on
non-dfs channel is sent to user space.
To ensure that radar found event is indicated only for DFS channel,
send radarfound event only if the final status of the API
dfs_process_radar_ind_on_home_chan() is a success. If the API returns a
failure (eg: radar on non-dfs segment), do not send radar detect event
to user space.

CRs-Fixed: 3254309
Change-Id: Iefc277348569e1494401f0ec215bb786e4153268
2022-08-09 06:40:34 -07:00
Bing Sun
d0385d035d qcacmn: Fix CFI failure caused by dfs_remove_from_nol
The parameter of callback of kernel struct hrtimer is itself, not
qdf_hrtimer_data_t. CFI failure happens if the function pointers
does not have the same type as the function that's called.
Add a new API __qdf_hrtimer_cb and assign it to hrtimer->function.

Change-Id: I9cf753272dd37635e82defac6cf7258c7a70425d
CRs-Fixed: 3245385
2022-07-27 07:22:54 -07:00
Jithender Miryala
7251cd10dc qcacmn: Fill in the subchannel frequency list even if it is an HT20 mode
Issue: mode was set to HT20 and marksubchannel was enabled. We injected
radar into the HT20 primary channel. The primary channel is not being added
to NOL when marksubchannel is enabled because the current subchannel
frequency list(freq_offset->freq[i]) is not being filled.

To fix this, Even if it is an HT20 mode, fill the subchannel frequency
list(freq_offset->freq[i]) based on offset.

Change-Id: I571ba60c755e7701a21db89f917c953ffa9716a6
CRs-Fixed: 3244971
2022-07-21 05:51:02 -07:00
Vijay Krishnan
3452af5abe qcacmn: Check CAC status on RCAC channel
In case of RCAC, check if CAC is completed only on the RCAC
channel and do not check the CAC info on current operating
channel.

After RCAC complete is sent to FW, the RCAC tree info is
cleared. In case of RCAC, check the CAC done info only
on RCAC channel.

CRs-Fixed: 3231140
Change-Id: I976b2b5e29ebdf2dc4fb2e5df1f2feb700c972af
2022-07-17 05:05:01 -07:00
Vijay Krishnan
d1a9d15084 qcacmn: Clear old preCAC, RCAC channel info
In case of BW Expand is enabled, Check if the user
configured channel is available. If it is available,
STOP the AGILE SM and Restart the AGILE SM. This will
clear any old preCAC/RCAC chan information.

CRs-Fixed: 3231108
Change-Id: I0d45204c8525ad7439a3b11cb4f8f8e7f20105d3
2022-07-17 05:04:55 -07:00
Vijay Krishnan
f4ad06f0cc qcacmn: Add Function declarations for BW Expand
Add function declaration for the following APIs
1) dfs_bwexpand_find_usr_cnf_chan
2) dfs_bwexpand_try_jumping_to_target_subchan
3) dfs_is_rcac_cac_done
4) dfs_get_configured_bwexpand_dfs_chan

The mentioned APIs are used for BW Expand feature.

CRs-Fixed: 3230855
Change-Id: I17a4549a804a92f2ad3fbc8050a979a44796a152
2022-07-14 18:23:34 -07:00
Vijay Krishnan
bcf7463728 qcacmn: Add Function pointer to Enable/Disable BW_Expand
When BW Expansion feature is enabled using UCI or cfg80211tool
command, the utility function to set/get the BW Expand feature
is introduced inside DFS module.

A new dfs member dfs_use_bw_expand is used to store the status
of BW Expansion feature.

CRs-Fixed: 3229250
Change-Id: If01e080f8e60e883fbeb2d7dfd599b91584bc293
2022-07-12 22:33:36 -07:00
Vijay Krishnan
af4b3be5e3 qcacmn: Declare user configured chan and bandwidth in dfs struct
The BW Expansion feature requires Agile SM to run on User
Configured Channel. The User configured Frequency and Phymode
should be stored in DFS structure.

Introduce the following new DFS structure members:
User configured Frequency - dfs_bw_expand_target_freq
User configured mode    - dfs_bw_expand_des_mode

The API dfs_is_subset_channel_for_freq is changed from static to
non-static. The API dfs_is_subset_channel_for_freq is needed for
finding the channel to run Agile when Bandwidth Expansion feature
is enabled.

CRs-Fixed: 3221545
Change-Id: If98ab9b3cc2c50fa5acc8e29bd5374830d1adf52
2022-06-29 13:03:13 -07:00
Jithender Miryala
059313a9cb qcacmn: Create a workqueue to process the NOL timeout
The HR timer runs in hardIRQ context and tries to acquire a bh_spinlock
held by a SoftIRQ context, which leads to deadlock.

To fix this, create a workque and let the workque execute the timer
callback function.

CRs-Fixed: 3200600
Change-Id: I6e702acade6d4e1d75470339ead0e591e7b8e4d8
2022-06-06 01:59:28 -07:00
Vignesh U
6179a3a558 qcacmn: Calculate frequency offsets instead of hardcoding
The radar found frequency offsets to find various 20MHz sub-channel
frequencies is hardcoded for different channel widths. These frequency
offsets can be calculated reducing repeatitive code.

Calculate frequency offsets from channel widths and center frequencies
to determine the radar found frequencies.

Change-Id: I146fa6dd06473ff90cad4bb5dd8ba4ce13ab7c7c
CRs-Fixed: 3182067
2022-05-27 01:20:43 -07:00
Priyadarshnee Srinivasan
a485ae2901 qcacmn: Set the num of subchans for 240MHZ as 12
In 5 GHz band, a 320 MHz band channel cannot be formed without
puncturing. Hence the contiguous available BW is 240MHZ which has
twelve 20MHZ channels from 5500 - 5720. Send CAC start/CAC
complete/radar detect information only for the channels which are
not punctured.

CRs-Fixed: 3200931
Change-Id: I5c2bc3314df6d1d61500e7fb24eef4a096ba4bb5
2022-05-26 03:53:12 -07:00
Vignesh Mohan
64db33c775 qcacmn: Add macros to fetch the phymode from channel
Add channel macros to query if an input channel is 11ac/11ax/11be.

CRs-Fixed: 3202132
Change-Id: Id3a80172d3cae7c39d9338a38448b1e37c522778
2022-05-25 01:44:55 -07:00
Jithender Miryala
dccc154314 qcacmn: Replace qdf timers with HR timer for preCAC timeout
Replace qdf timers with HR timer for pre CAC timeout and process
the preCAC completion work in workqueuecontext.

Since preCAC expiry is processed in H/W interrupt context
(while using HR timers), no other timer cancellation is allowed
('qdf_hrtimer_cancel' function will wait for the handler finish)

But if we  process the preCAC timer completion work in H/W context,
other timer cancellation will take time. To fix this, process the
preCAC completion work in workqueue context to allow other timer
cancellation.

CRs-Fixed: 3185213
Change-Id: Iaa24055e0d485f613e16d6110d22002fecf10821
2022-05-12 06:52:57 -07:00
Aravind Kishore Sukla
6932ea7f8a qcacmn: Replace kmsg logs to debug logs
Change kernel log level to debug level

Change-Id: Ib2736aff0f653d046d502d460f204bba2247246f
CRs-Fixed: 3182588
2022-05-10 09:11:47 -07:00
Vijay Krishnan
4bc26c9b2d qcacmn: Reset dfs chan state in CAC stop
When AP moves from DFS to NON-DFS channel, dfs chan state is
not updated and have state DFS_CAC_STARTED. Similarly, if the VAP
operating in a DFS channel goes down, the dfs chan state needs
to change to DFS_CAC_REQUIRED but the dfs chan state remains in
DFS_CAC_STARTED.

During CAC STOP, send the DFS event CAC RESET to change the dfs
chan state.

Change-Id: I21831e2c79da67375f8e340964f899ebd169fd85
CRs-Fixed: 3160346
2022-05-09 07:10:27 -07:00
chunquan
c505123a57 qcacmn: Replace slave for target
Replace slave for target, and replace
master for initiator which pair of slave.

Change-Id: I51ee0ce1ce0d0dc30281388a270bda1edfac2903
CRs-Fixed: 3169180
2022-04-14 02:34:47 -07:00
Amith Ajith
8635ab3be9 qcacmn: Fix high CAC timeouts
High CAC timeout is seen for weather and non-weather DFS channels.
This is due to the delay in 5.4 Kernel timers. There is 1 second delay
observed for every 60 seconds.

To fix this issue, replace qdf timers with HR timer for CAC timeout.
On CAC expiry, when VDEV UP is sent to FW, serialization timer is
cancelled. Since CAC expiry is processed in H/W interrupt context
(while using HR timers), no other timer cancellation is allowed.
Hence, process the CAC timer completion in work queue context to allow
other timer cancellations by the CAC thread.

Change-Id: I92c4662decbba27261448327abb16708d941d778
CRs-Fixed: 3142394
2022-03-31 05:46:49 -07:00
Jianmin Zhu
e0ace228c5 qcacmn: Revert "Fix issue that DFS NOL can't be cleared"
Replaced with "qcacmn: Do not access reg private if destroyed".

Change-Id: I636bcae59166ccd4719056c777682435a0a057bf
CRs-Fixed: 3158675
2022-03-25 19:12:34 -07:00
Jianmin Zhu
d94f0fb619 qcacmn: Fix issue that DFS NOL can't be cleared
When SAP off and psoc idle shutdown happens before NOL timeout,
DFS pdev obj is destroyed, NOL timer is cleared, NOL channel
is failed to clear for regulatory pdev obj is freed already.

To fix it, let NOL timer and NOL be cleared in dispatcher_pdev_close,
before pdev destroy and regulatory pdev obj destroyed.

Change-Id: I5818f8a0284a6c45e8a435ac59269df73507deeb
CRs-Fixed: 3151099
2022-03-21 22:01:25 -07:00
Jianmin Zhu
f683d0b718 qcacmn: Fix build error
Error: new_start_ch may be used uninitialized

Change-Id: I124d9c305e4f885a1e3d5c77ddd1dab57070b1de
CRs-Fixed: 3152361
2022-03-17 00:25:04 -07:00