Add device Id and target type checks for qcn6432 target
compilation
Add CFR and spectral support for QCN6432
Change-Id: Ic908fa768aa1be7cfc40be7fcc7f9ca6aa85aaa6
CRs-Fixed: 3351747
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
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
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
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
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
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
As function is defined under compile time macro, also
export the symbol under the same macro.
Change-Id: Id2eba221dcb9c6d8cd7503e9d473199a50508309
CRs-Fixed: 3357183
The kernel-doc script identified some documentation errors in the
umac/dfs folder, so fix them.
Change-Id: Ia86989a39fe502480e2d2358a6f23759f78707e0
CRs-Fixed: 3382430
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Replace slave for target, and replace
master for initiator which pair of slave.
Change-Id: I51ee0ce1ce0d0dc30281388a270bda1edfac2903
CRs-Fixed: 3169180
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
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