Currently the driver checks whether the DFS channel is
in the range of acs channel list given, i.e the start
and end channel, which is not always correct as the channel
range does not imply that all channels in that range are present.
Fix is to explicitly check for the number of channels, and
compare each channel in the acs channel list with the DFS
channel.
Change-Id: Ib17c5e549a2c62652a6333d5d13ca8ff5a7b1674
CRs-Fixed: 2466228
rp_check_delta_peak and rp_sidx_spread fields of struct dfs_pulse
were missing for dfs_china_radars. Fill them with zeros and ignore
the value for China Radar Table alone.
In future, after thorough experimentation the missing fields will
be filled.
Change-Id: I7dfc3756c48269666fee3c474c9ee9a64745d0c0
CRs-Fixed: 2433582
During radar table attach, the function to check if EN302_502
pattern is applicable requires actual center frequency of
the current operating channel as one of the inputs.
The caller of this function uses ieee80211 channel as the
argument in the function call.
Call function with actual center frequency instead of
ieee80211 channel.
Change-Id: I9e562863d73c53e4da046eede3e20d8ad9c8f98c
CRs-Fixed: 2454018
When RCSA is enabled, if Repeater AP detects radar, the
subchannels affected by radar are sent in addtoNOL IE to the
rootAP as a bitmap. Reinitialise this bitmap for every RCSA to
avoid misinterpretation in rootAP.
Change-Id: Ie6cee841f6f05cfdfc5060afd55b83a34730f31f
CRs-Fixed: 2450786
After NOL timeout, if ETSI PreCAC is supported, add the HT20 Channel
to ETSI PreCAC Required List. Also, move NOL detach after ETSI PreCAC
detach to avoid channels being added to ETSI PreCAC Required List when
NOL expiry happens after ETSI PreCAC detach.
Change-Id: I9cdb359eb6905f4f4cfb9d1c784865af0bf39119
CRs-Fixed: 2403489
Add change to cleanup duplicate fields of
of vdev_mlme, which are also in mlme_channel_param
and their dependencies while updating
vdev_start_param. Cleanup unused mlme_cfg_ids.
Change-Id: Ie32971283a337f04692c0c0bc7f41fff75c090c3
CRs-Fixed: 2407953
Change I498ac1f8cd1d6423032d7b3b8c233656c5f0bf22 ("qcacmn: Have separate
macros for DA/PO/FO to reduce the code size") introduced featurization of
the DFS logic. Two functions, target_if_dfs_reg_offload_events() and
dfs_fill_emulate_bang_radar_test(), were not correctly featurized,
resulting in compilation failures when WLAN_DFS_FULL_OFFLOAD is not
enabled. To prevent these failures properly featurize the functions.
CRs-Fixed: 2366596
Change-Id: I4bcecf95d92cb3ebe2ff893c17755385dda11429
Get the tx_leakage_threshold value directly in
tgt_dfs_set_tx_leakage_threshold from
ucfg_mlme_get_sap_tx_leakage_threshold instead
of passing from wlan_hdd_cfg80211_start_bss.
Change-Id: If8f5b85c03c01b984b7c05d72d40baca0e19c3cc
CRs-Fixed: 2418358
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within umac dfs replace any such comparisons with
logical operations performed on the pointer itself.
Change-Id: Ib67c0ebda22f93a353f8f3f1be1e1ab10b15db4a
CRs-Fixed: 2420151
Agile Dynamic Frequency Selection refers to the mechanism in which DFS
scanning takes place on a separate dedicated synthesizer
(agile DFS sythesizer), while the access point receives data on a
separate channel. Once DFS scanning completes in the aDFS
synthesizer, AP can switch its primary channel to this preCAC done
channel, without Channel Availability Check of 60 seconds.
Hawkeye has native support for A-DFS unlike Cascade, which uses a
dedicated radar detector for background scanning. Each Iron radio has
two synthesizers, one of which can perform A-DFS.
Host driver configures an A-DFS channel along with maintaining
pre-CAC Done list of channels. PreCAC list caching of channels
is currently limited to ETSI domain.
Once off channel CAC completes in the agile channel, HOST receives O-CAC
complete indication. O-CAC status included as a part of event params
has information if the preCAC is successful or not. HOST also receives
indication through radar indication event handler, upon RADAR detect.
The detection is read as agile channel RADAR using the detector id value.
For SBS mode, there can be 2 pdev's which can comprise of DFS channels.
Although the preCAC list is separate for each pdev, preCAC timer is
limited to a single pdev.
The following commands are to set/get preCAC enable. Prerequisite to
enable preCAC includes regdomain to be in ETSI along with agile capability
enabled in the target.
iwpriv wifiX get_preCACEn
iwpriv wifiX preCACEn 0/1
Change-Id: Id9f022f885ccd9200167cdbc779a811d622d09da
CRs-Fixed: 2385536
When wlan target asserts, driver will trigger shutdown and reinit to
do recovery. In shutdown, when pdev is freed and dfs_detach is called,
dfs->dfs_nol should be freed. If at the same time dfs_remove_from_nol
is triggered in another CPU, a race condition may happen as follows:
NOL is moved from dfs->dfs_nol to dfs->dfs_nol_free_list in function
dfs_remove_from_nol, then dfs_detach sets dfs->dfs_pdev_obj to NULL
without freeing the corresponding NOL timer. QDF_ASSERT happens at this
time if the function dfs_remove_from_nol continues to execute.
To be specific: The timer expiry function dfs_remove_from_nol calls
several umac functions e.g. dfs_mlme_nol_timeout_notification which
needs dfs->dfs_pdev_obj as an argument. However, the dfs->dfs_pdev_obj
is set to NULL by wlan_dfs_pdev_obj_destroy_notification function. Even
though before dfs->dfs_pdev_obj is set to NULL, the
wlan_dfs_pdev_obj_destroy_notification waits for the workqueue
qdf_flush_work(&dfs->dfs_nol_elem_free_work) which in turn waits for the
timer epiry function, scheduling of the workqueue seems to have happened
after qdf_flush_work(&dfs->dfs_nol_elem_free_work) in this case. If
qdf_flush_work happens before the workqueue is scheduled then
qdf_flush_work does not wait for the workqueue and therefore we do not
wait for the timer expiry function before setting dfs->dfs_pdev_obj to
NULL.
To fix the race condition, trigger dfs->dfs_nol_elem_free_work
immediately after dfs_nol_delete.
Change-Id: I9fc07231b07139ebe794fc7cc94d2a8ab307c69f
CRs-Fixed: 2400959
If user configures DFS channel in 160MHz mode,
1. change mode to 80MHz and do PreCAC on primary and
secondary channels of 160MHz.
2. Use intermediate channel to operate.
3. Once PreCAC done on the both primary and secondary channels and is clear
then change mode back to 160MHz.
4. Change the channel from intermediate to configured DFS channel.
Use Broadcast and Unicast OMN frame to notify mode change.
Change-Id: I1f2db0f38b42fce2f407988041edfea9c49c58e1
CRs-fixed: 2395431
When sub-channel marking is enabled, radarfound freq is computed as
freq_center + freq_offset. Freq offset is obtained from
dfs->dfs_freq_offset variable which gets populated only for PO
(Partial Offload) chips and does not get populated for full offload chips.
Instead radar_found->freq_offset is used which gets populated with radar
freq_offset on all chips.
Change-Id: I138b1160a8b9d67801bd0852266c2e7139265c02
CRs-Fixed: 2383294
Add API to update cmn vdev mlme structures,
with the addition of new members to the new mlme
vdev structure,new api's are required to update
those members which will be subsequently used the
new mlme target if layer to send commands to the firmware
Change-Id: I9618613c0ad00f78003cd32951b30b631934ba71
os_timer_t is a legacy wrapper around the kernel's timer_list type, and
is incorrectly used directly with qdf_timer APIs. Remove os_timer_t,
replacing instances with qdf_timer_t instead.
Change-Id: I410b7fafad18be01141008b6220fbe34ab07601e
CRs-Fixed: 2388575
The unit test command being sent to FW for bangradar did not have
enough arguments to perform subchannel marking as expected.
Pack in the existing uint32_t argument the following information
1). Segment ID (2 bits)
2). Chirp Information (1 bit)
3). Frequency Offset (8 bits [can be signed]).
that is being sent in the unit test command structure.
Change-Id: I7cc567f7bdc9367ee0f51080d0c54c55aa3e4a6b
CRs-Fixed: 2342535
During subchannel marking, the list of radar affected subchannels contained
subchannels which were not part of the current channel's subchannels.
Remove entries which are not part of the current channel's subchannels,
from the list of radar affected subchannels.
Change-Id: I60eacba8ee45976142f51a8f76d695d8652ad2ab
CRs-fixed: 2383369
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
Do not call regdb core functions from other components directly.
Instead, call regdb dispatcher functions.
Also, wlan_objmgr_vdev_obj.h file is removed from reg_services.h file in
Ie43acc03a5c35200f3e43bc978b792d5047eeb77 and reg_services.h is removed
from wlan_reg_services_api.h in I891b14fac7a4eddf2697d2ecdc0ac4a82046f532.
Therefore to fix "'struct wlan_channel' declared inside parameter list"
error in wlan_dfs_utils_api.h file, I have included wlan_objmgr_vdev_obj.h
file before wlan_dfs_utils_api.h in scan, dfs and wmi component.
Change-Id: Id8816f5137c3b1f9200c59fc3f9041980631f22f
CRs-Fixed: 2349173
Change the name of utils_fill_dfs_chan_info to dfs_fill_chan_info since it
is not used by any components other than DFS.
Change-Id: I91e8d2326a830303fbad4564aa13655e50caa4c4
CRs-Fixed: 2375672
For subchannel marking, an offset of 20 MHz was added to the
second segment center frequency value of VHT160 mode operation
to get the actual second segment center frequency.
This was not done for HE160 mode operation, which led to wrong
subchannels being added to NOL.
Add 20 MHz frequency offset to the center frequency for HE160 opmode.
Change-Id: I7c076be220c70c18b60ed68c1ce99068924d41bf
CRs-Fixed: 2378075
Adds support to use bangradarenh command to inject radar on the
secondary segment, if AP is operating in HT80+80 or HT160 mode.
Change-Id: I78ab3d3fcb3ecf5fee274911bf6dc48f74c53818
CRs-Fixed: 2359763
During Zerowait DFS, when radar is hit, the NOL IE element that
is being sent to its uplink is prepared after the precac timer
is turned off, which returns wrong center frequency
information for secondary segment.
This center frequency is used to built the list of subchannels to
be sent to root, which in turn are all 0s.
Reorder the function calls to prepare the IE before the
precac timer is turned off when radar is found so that the
list of subchannels are built properly.
Change-Id: I74e800cbbeb3730c862a72ddbe8f78219592e343
CRs-Fixed: 2373036
Remove unused mlme function to get dfs object and replace
it with the dfs equivalent.
Change-Id: I3ffadb77072fa119957469e0bf97fa4a80f99ac9
CRs-Fixed: 2368988
Fix Enhanced Bangradar to add only the subchannels into NOL
based on its parameters during call, and not the entire set
of current subchannels.
Current implementation of enhanced bangradar sets bangradar entry,
in DFS, to 1. Since bangradar does not use subchannel marking,
enhanced bangradar did not work either.
Introduce a new boolean entry in DFS structure that does not follow
bangradar and does subchannel marking.
Change-Id: Idf44b80a6cae3f1c8a3c7b430a233e3fd29ba0c5
CRs-Fixed: 2368100
The radar affected subchannels list that is sent along with RCSA
was not built properly due to unreliable (contained 0s) subchannels
list provided by subchannel marking function.
The implementation used a single iterated loop to traverse through the
subchannel array elements, not counting 0s as possible inputs.
Search through each element of the list to find if the subchannel
is present and break if successful.
Change-Id: I5cd5ce7b6a334247c7d8733ee8433f957480c1dd
CRs-Fixed: 2364640
The cfg tool command to enable/disable subchannel
marking called a WMI to be sent to FW without checking
if dfs is offloaded to FW.
This added fail prints in log for partial offload and direct
attach even if subchannel marking was set.
Fix the cfg command to send a WMI to FW only if dfs is offloaded.
Change-Id: Ifae574ed6aeb49c4058d89374fdcc81b8d43a5bc
CRs-Fixed: 2334258
AP is configured to operate in Channel 100(HT80), and Zero Wait DFS
is enabled. Once PreCAC is complete on DFS Channels,inject radar in
Channel 100 and AP moves to another DFS channel 116 and beacons
immediately but station associated to AP still does a scan again.
When the station receives the Channel Switch Announcement from AP, it
dissociates from the AP and scans again.
Maximum Switch time Information Element can be used by the Station to
to know if the AP has done PreCAC on target channel. Maximum Switch Time
IE is part of AP's beacon and is the sum of CAC timeout on the target
channel and 1 beacon interval.
If PreCAC is done on target channel, the CAC timeout is zero and Maximum
Switch time IE is equal to 1 beacon interval. This element is sent to
Station along with Channel Switch Announcement. The Station receives the
maximum channel switch time element. If the value of maximum channel switch
time element is less then or equal to beacon interval, the station
associates with the AP seamlessly without dissociation. If the value of
the Maximum Channel Switch Time IE is greater than 1 beacon interval, then,
the Station has to dissociate from the AP since, ZeroCAC has not been done
by the AP.
Change-Id: I0301a68c1731cc268b9a6900258261034476446b
CRs-Fixed: 2330817
Update NOL list based on the external radar information sent
from the action frame and store in DFS structure.
Add an utility - dispatcher function that can be called by UMAC
with NOL IE information.
In the DFS structure,
1). If subchannel marking is disabled, add all the current
channel's subchannels to NOL, do not update the NOL IE
structures inside dfs, and send a flag saying not to
propagate the NOL IE to uplink.
This is because, in case of cascading repeaters, one
of the repeaters (RE1) in the cascading system might have
subchannel marking disabled. In that case, sending the
same NOL IE to uplink results in RE1 and its BSS to disconnect.
2). If subchannel marking is enabled, add those subhannels to NOL,
and update flags saying NOL and RCSA IE should be sent.
Change-Id: I3f3e14a59503cd1a15573c988a984a20117aa814
CRs-Fixed: 2328377
Calculate the bitmap of subchannels that are affected by
radar and store in dfs structure along with flags
Algorithm:
1). Given the radar affected subchannels list, create a
NOL bitmap, where
1 - Radar hit on Subchannel.
0 - Subchannel not affected.
2). Along with the NOL bitmap, send the Minimum Bandwidth
for each subchannel and the Channel list's starting
channel's centre frequency.
Example:
Mode : 100HT80, if radar affected subchannels are 100, 104
and 108.
NOL bandwidth: 20.
NOL start frequency: 5500.
NOL Bitmap: 11100000.
3). During precac (precac timer running), if radar hits
at secondary segment, the umac code that sends rcsa
is still called, but add a new flag to not send rcsa, and
in rootAP, channel change is not triggered, only NOL
is updated.
Add APIs that can be called from mlme to fetch the NOL and IE
flags information from DFS structure during RCSA framing.
If subchannel marking is disabled, the new NOL bitmap has no meaning
and is hence, not sent.
CRs-Fixed: 2328377
Change-Id: I3114ff5ca2704c316c9dc83220740fac9a6a00a1
When x_psoc_create_handle return failed, need free all resources
before return, x_psoc_destroy_handler has no chance to be called
any more.
Change-Id: I4b9999dbc2597c4ea860f08a6f3334f7f5728146
CRs-Fixed: 2353795
Introduce dfs_tgt API to send the WMI command to enable/disable
"Subchannel Marking" in Firmware (only in Full Offload)
Change-Id: If739409521c8704b612e52dfc8ed6b86ffe32bca
CRs-Fixed: 2334258
Changes configured to operate in Channel 100(HT80), if bin5 chirp
radar is injected at center frequency at 5530 MHz, instead of adding
channel 108(HT20), it adds channel 116(HT20) of adjacent 80 MHz band
to NOL list.
We have the following variable assignments in function
dfs_pulses_within_window:
dfs->dfs_min_sidx = pl->pl_elems[*index].p_sidx
dfs->dfs_max_sidx = pl->pl_elems[*index].p_sidx
Since the variable pl->pl_elems[*index].p_sidx is of signed type
and variables dfs->dfs_min_sidx/dfs->dfs_max_sidx are of unsigned type,
if the value of the variable pl->pl_elems[*index].p_sidx is negative,
the values of the variables dfs->dfs_min_sidx/dfs->dfs_max_sidx become
very large unsigned value.
When sidx is converted to frequency offset, the frequency offset
also becomes very large and it is greater than 40Mhz(half of HT80).
In this case, 50MHz is added to center frequency 5530 MHz, which
becomes 5580MHz(channel 116(HT20)). This results in the channel
116(HT20) of adjacent 80 MHz band to be added to NOL list.
Change the type of the variables dfs->dfs_min_sidx/dfs->dfs_max_sidx
from unsigned to signed so that assignments do not alter the actual
value of the frequency offset.
Change-Id: I13995888b618d9dd8a91447d5dffe27aa2e27a27
CRs-Fixed: 2342743
In case of STADFS feature, when STA vap detects the RADAR, it marks the
channel as RADAR and adds the RADAR found channel to both NOL and
NOL-HISTORY list.
After nol expiry, STA vap does the CAC before connecting to the RootAP if
the RootAP channel is present in the STA NOL-HISTORY.
Set nol_history_flag in regulatory component current channel list when STA
vap detects the RADAR.
Change-Id: I8d01f5830e6b4dd634b71c551ac347bc7d3d5c4c
CRs-Fixed: 2337921
Consider an AP up in channel 100 in VHT80 mode. On injecting radar
in channel 104, the current implementation displays "Radar found on channel
100", which is the primary beaconning channel. The requirement is to
display radar found information on the exact subchannel of the VHT channel
where radar was detected (which is channel 104 in this example).
Hence, using the radar found frequency offset to display the exact freq
offset from the centre frequency where radar was detected. This display
is only valid for real HW pulses injection. For bangradar, the frequency
offset is not available and therefore exact subchannel cannot be
calculated.
CRs-Fixed: 2321778
Change-Id: I49cdcd4f13dc1fbf12bc4a33048c13bc8ea3973f
Currently radar event log is cleared only during dfs_detach which happens
during wifi unload. On issuing "wifi or wifi down" command, the logs are
not cleared. During Spoof Radar Detection, the log counter values are
spuriuos due to accumulation of phyerror events. This accumulation of
events is either due to false radar detection or logs of the previous wifi
cycle. Hence resetting the dfs radar log counters in the below cases:
1) During vap delete
2) During CC/ Regdomain change.
3) After false radar detect.
CRs-Fixed: 2244562
Change-Id: I74745f61c634bab7f9c1a78ef8dea8da2ab1a997