The kernel-doc script identified some documentation errors in the
umac/dfs folder, so fix them.
Change-Id: Ia86989a39fe502480e2d2358a6f23759f78707e0
CRs-Fixed: 3382430
Spur or leakage transmissions is observed in Spruce HW in
frequencies from 5260MHz to 5320MHz when one of the following
conditions is true,
i) The AP is transmitting in 52/56/60/64 in 80MHz mode and then the AP
moves to the adjacent channel 36/44/48 in 80MHz mode and starts
transmitting.
ii) The AP is transmitting in 36/44/48/52/56/60/64 in 160MHz mode and then
the AP moves to the adjacent channel 36/44/48 in 80MHz mode and starts
transmitting.
In order to prevent random channel selection to cause spur restrict the
above given channel movements for Spruce target alone.
Change-Id: I27b558ec5544076430f66c84b056ab65f9e43c8c
CRs-Fixed: 2975473
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
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
Both (ETSI) PreCAC and RCAC are going to use use the same state
machine. The state machine drives the Agile engine and not very specific
to RCAC or PreCAC, therefore let the state machine be called agile state
machine and change the names of all the associated variables accordingly.
In this preparatory change, modify names of all APIs, states and events
to make them common to Agile RCAC and Agile PreCAC
Change-Id: I67858839589145bf4377a7eafec7c21ca4823141
CRs-Fixed: 2711104
Trigger Rolling CAC SM events from
- NOL expiry (EV_RCAC_START) to trigger RCAC START with a
new channel if possible and not already running.
- Agile radar (EV_ADFS_RADAR_FOUND) to restart RCAC with a
new random channel.
- vdev restart (EV_RCAC_STOP) to stop the running RCAC when
the primary channel changes. Start will be based on the
availability of the new channel.
In case of the rolling CAC feature, a channel is programmed to
the agile detector on which CAC is running continuously.
Introduce an API that finds an RCAC completed channel and return
the channel params which will be used for the next channel
change.
Also add a boolean argument in dfs_set_current_channel api to
indicate if the dfs current channel is updated in the API
"dfs_set_current_channel".
CRs-Fixed: 2674621
Change-Id: Ica54a57f131cd54e47138f1cbeef2dd0023390ed
'jiffies' does not include the device sleep time.
Use qdf_get_monotonic_boottime to monitor lapse of time for nol.
Change-Id: I6e00e003b8ee3d456ac4ec62b23fdaa02d577672
CRs-Fixed: 2652692
As part of the Rolling CAC State Machine, introduce three state
enums (INIT, RUNNING and COMPLETE) and the corresponding state
events.
Introduce generic APIs such as dfs_rcac_sm_create,
dfs_rcac_sm_destroy and dfs_rcac_sm_deliver_evt for rolling
CAC State machine operations.
CRs-Fixed: 2659666
Change-Id: I528db71aa7d21dced7e47ff4f9cccfbfe94c8c21
Instead of channel number, use channel frequency for restricted 80+80MHz
boundary check.
Change-Id: I2fa65c3b1d102acd6b64b4c6e1583d2bc29484d1
CRs-Fixed: 2645155
Provide support for bangradar with detector ID as one of the parameters.
Add the parameter as part of the packed arguments to be sent to FW.
Also add APIs for basic sanity check of bangradar params and packing
bangradar params inside an 32 bit unsigned integer.
CRs-Fixed: 2646549
Change-Id: Ie781bc9421b7ac0d407eb01814c9242c7f988884
Supported dynamic HW mode switches:
DBS (full band 5G and 2G) <-> DBS_SBS (low band 5G, high band 5G and 2G)
Description of the changes:
1. NOL conversion:
a. Introduce a temporary NOL list copy structure in DFS psoc obj.
b. When mode switch is triggered:
i. Stop the NOL timers and clear the data, to avoid processing NOL
expiry during mode switch.
ii. Allocate the psoc NOL copy for the target num_radios.
iii. Store the NOL data of each radio to the target pdev ID
(pdev ID after mode switch) in the psoc NOL copy,
using a unified mux/demux API.
c. After mode switch is completed:
i. Resume NOL by re-initializing the list from the temporary psoc
copy.
ii. Free the psoc copy after mode switch is complete.
iii. Note: changes are made to support pause and resume of NOL,
increasing NOL timeout by a few milliseconds.
2. PreCAC list conversion:
a. When mode switch is triggered:
i. Stop the existing preCAC timer and send ADFS abort command to FW.
b. When mode switch is completed:
i. Unify/separate the preCAC list if the target mode is DBS/DBS_SBS
respectively, using a single API.
ii. Start ADFS again.
3. Radar detection lock:
a. While detecting radar, acquire a lock to avoid handling user triggered
mode_switch during this process. Release the lock once radar
processing is completed and CSA start is triggered.
4. Radar detection/CAC completion defer during mode switch:
a. While detecting radar or CAC completion, check if mode switch is
in progress. If yes, defer the processing and wait for mode switch to
complete before handling the events.
b. Note: Precedence is Radar over CAC, i.e., if CAC processing is waiting
and radar is received, CAC completion is no longer handled.
CRs-Fixed: 2580403
Change-Id: I506f3b569bad2e351c6f336e50f203cf5fa8b223
Pine supports restricted 80+80 MHz only on cfreq=5690 and cfreq=5775. If AP
detects RADAR in this channel, it chooses new 80+80 MHz random channel
which is not supported by Pine because, notion of 80+80 is not present in
current channel in regulatory component. Hence, as a temporary fix we
change the invalid 80+80 MHz channel to 160 MHz or lower.
Change-Id: I749607236a1dd7b9c7aa93ff889b65adcbb4191c
CRs-Fixed: 2570057
Enable configurable dfs_pri_multiplier. The ETSI typ2 type3 radar
detection ratio is lower than expected(>80%) while channel loading is
high(>30%). The host improvement for this are:
1. Add configurable dfs_pri_multiplier, controlled by
DFS_PRI_MULTIPLIER. Default value 2, min 1, max 10.
2. Lower adrastea ETSI type 2/3/4 radar filter rssi_threshold,
controlled by DFS_OVERRIDE_RF_THRESHOLD, dfs log shows that
QCS405 target report RSSI range [18, 45] while radar power
is 3 dbm. By using default rssi_threshold 24 will reject
many radar pulses, which leads to low detection ratio.
3. Calculate deltapri for each searchpri based on dfs_pri_multiplier
in dfs_count_the_other_delay_elements(), check deltapri
between [1, dfs_pri_multiplier] * refpri and searchpri, if
the primargin is desired, mark it as matched pulse.
4. Pick lowpri as refpri for the radar filter with
rf_ignore_pri_window equals to 0 while DFS_PRI_MULTIPLIER is
enabled. Observed original findref logic has some problems
which selects refpri is bigger than lowpri, which leads to
the lowpri pulses pri_match are set to 0, and in this case,
radar was not detected. Example for the issue, assume
rf->rf_pulseid 34 (ETSI type 2) has 7 pulses with pri:
1489, 2978, 2978, 2978, 1489, 2978, 1489 us in this case,
highscore is 4 (2978), scoreindex is 5, refpri is 2978, which
leads to: index 0, 4, 6 pulses with pri_match 0 in
dfs_count_the_other_delay_elements(). The fix is to select
lowpri as refpri(1489 in this case).
Change-Id: I1f3ca3298c9ab1f1e2651ad6b4a0a4810f83f8a1
CRs-Fixed: 2531811
Replace all three radar simulation commands with a single variant which
will perform required functionality based on its number of arguments.
Existing variants of radar simulation commands:
1). Bangradar:
Description: Adds all subchannels of segment ID "0" in the
current channel to NOL.
Syntax: radartool -i wifi0 bangradar.
2). Second Segment Bangradar:
Description: Adds all subchannels of segment ID "1" of the
current channel to NOL.
Syntax: radartool -i wifi0 secondSegmentBangradar.
3). Enhanced Bangradar:
Description: Adds the radar infected subchannels computed based
on segment ID (X), chirp information (Y) and
frequency offset (Z) to NOL.
Syntax: radartool -i wifi0 bangradarenh X Y Z.
where,
X - Segment ID.
Y - Is chirp/non chirp.
Z - Frequency offset.
New radar simulation command:
Bangradar:
Types of usage:
1). No arguments:
Description: Adds all subchannels in the current channel to NOL.
Syntax: radartool -i wifi0 bangradar.
2). 1 Argument:
Description: Adds all subchannels of segment ID "X" of the
current channel to NOL.
Syntax: radartool -i wifi0 bangradar X
3). 3 Arguments:
Description: Adds the radar infected subchannels computed based
on segment ID (X), chirp information (Y) and
frequency offset (Z) to NOL.
Syntax: radartool -i wifi0 bangradar X Y Z
where,
X - Segment ID.
Y - Is chirp/non chirp.
Z - Frequency offset.
All other combinations of arguments will result in error (insufficient
arguments).
Change-Id: I10c86d78bf46c075e65f93ad0f0143f328f5c7be
CRs-Fixed: 2373228
This commit includes the following changes:
Send usenol pdev param to FW.
Set and get dfs_disable_radar_marking flag.
Handle scan failure due to NOL violation.
Change-Id: I814f6381145f98eccf465af730734238c60d8896
CRs-Fixed: 2328894
When the beaconing channel is not affected by radar,
reduce bandwidth of the AP while retaining the beaconing (control) channel.
Since all subchannels were in ISM there is no need to perform CAC.
Random channel selection is run if primary beaconing channel is affected
by radar, wherein CAC will be run for new primary and secondary.
Change-Id: I3c141a02449361e2290086f4c15f7b3eb08c6115
CRs-Fixed: 2284350
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