Commit Graph

113 Commits

Author SHA1 Message Date
phadiman
b68fa39efd qcacmn: Add DFS Radar Event Notifications
Add event notifications to userspace
    1. Radar Detect
    2. CAC Start
    3. CAC Complete
    4. NOL Start
    5. NOL Complete

CRs-Fixed: 2448199
Change-Id: I5deaa53c922fe4e149e7198b287e31d3876d49d4
2019-05-13 13:11:38 -07:00
Visudha Sathurappan
fbd467f5a6 qcacmn: Fix compilation errors when ATH_SUPPORT_DFS is disabled
Fix compilation errors when disabling ATH_SUPPORT_DFS

Change-Id: I229ae5086070badec899b5b95be3ce389a3247ba
2019-05-08 02:51:43 -07:00
Hariharan Basuthkar
1720fd98a6 qcacmn: After NOL timeout add channels to ETSI PreCAC Required List
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
2019-04-22 18:21:14 -07:00
Naga
9dad9767b1 qcacmn: Cleanup duplicate fields in vdev_mlme
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
2019-04-11 01:14:21 -07:00
Harprit Chhabada
2a1bc9e488 qcacmn: Clean ucfg_mlme components from wlan_hdd_cfg80211_start_bss
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
2019-04-03 20:28:07 -07:00
Priyadarshnee S
8202412c0d qcacmn: Rename "dfs_freq_is_in_nol" to "dfs_is_freq_in_nol"
Rename "dfs_freq_is_in_nol" to "dfs_is_freq_in_nol"

CRs-Fixed: 2417878
Change-Id: Iedd79e9ea51a84d0458e643ddafa2797ed5f337c
2019-03-26 10:30:24 -07:00
Jeff Johnson
cba07b4883 qcacmn: dfs: Replace explicit comparison to NULL
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
2019-03-22 08:47:30 -07:00
Shaakir Mohamed
7a71538673 qcacmn: Add support for Agile DFS feature
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
2019-03-14 14:28:22 -07:00
Madhvapathi Sriram
b73fc282d8 qcacmn: Remove error log for qdf_mem_malloc in umac files
qdf layer already has the error trace

Change-Id: I2ea22fe0e3e59b9d41ac21142615ffb96227abaf
CRs-Fixed: 2376418
2019-03-04 07:30:21 -08:00
Shreedhar Parande
bad46ee2da qcacmn: Enhancement of auto channel switch zerowait PreCAC for 160MHz mode
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
2019-03-01 11:14:42 -08:00
Akshay Kosigi
1726ae21c5 qcacmn: Add API to update cmn vdev mlme structures
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
2019-02-24 20:04:41 -08:00
Vignesh Mohan
53d6d1b215 qcacmn: Send all args with unit test command for bangradar
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
2019-01-30 02:32:14 -08:00
Vignesh Mohan
94e1f2308f qcacmn: Unify radar simulation commands
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
2019-01-24 12:30:31 -08:00
Shashikala Prabhu
7517a8d7b9 qcacmn: Call regdb wrapper functions from other components
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
2019-01-23 15:14:32 -08:00
Hariharan Basuthkar
a12d19d67b qcacmn: Change utils_fill_dfs_chan_info to dfs_fill_chan_info
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
2019-01-22 00:18:41 -08:00
Arif Hussain
273e871dc0 qcacmn: Add Japan W53 channel flag support
Add support to exclude/include Japan W53 channels
in random channel selection.

Change-Id: I359d6bb68e2737b64b77f6f3ad27f83fd33d3da8
CRs-Fixed: 2371013
2019-01-01 17:06:14 -08:00
Visudha Sathurappan
bbd9d427a7 qcacmn: Removed unused DFS function
Remove unused mlme function to get dfs object and replace
it with the dfs equivalent.

Change-Id: I3ffadb77072fa119957469e0bf97fa4a80f99ac9
CRs-Fixed: 2368988
2018-12-24 05:44:53 -08:00
Visudha Sathurappan
3b5c6e9899 qcacmn: Clean up of DFS functions
Replace mlme functions to get dfs objects by dfs functions.

Change-Id: Ic8432ce3c210a4c1233fe1c715d00f5abb37ba04
CRs-Fixed: 2363068
2018-12-11 01:43:10 -08:00
Shaakir Mohamed
25737a45e3 qcacmn: Add APIs to enable/disable BW Reduction
Add functions to enable/disable BW-Agile DFS Reduction

Change-Id: I1cc355f06a2027b229ca2001671ddb69c7cff4e6
CRs-Fixed: 2302983
2018-12-06 17:51:18 -08:00
Hariharan Basuthkar
738320eef9 qcacmn: Bring Up STA without dissociation when AP switches to DFS Channel
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
2018-12-05 03:57:51 -08:00
Vignesh Mohan
eba709480e qcacmn: Receive and parse RCSA with subchannel information
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
2018-12-05 00:36:00 -08:00
Vignesh Mohan
07035aaed8 qcacmn: Enable RCSA with subchannel information
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
2018-12-05 00:35:57 -08:00
Jianmin Zhu
5d9c2898db qcacmn: Avoid mem leak when create DFS object
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
2018-11-29 18:12:28 -08:00
Vignesh Mohan
4974032991 qcacmn: Add dfs tgt API to set Sub Channel Marking
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
2018-11-23 10:13:16 -08:00
Vignesh U
c008454014 qcacmn: Add support to enable/disable NOL subchannel marking
Add DFS function to enable or disable NOL subchannel marking.

Change-Id: Ibb6dbdb373af5b328c813c3b80b0f2296f644406
CRs-Fixed: 2334258
2018-11-23 10:13:13 -08:00
Shashikala Prabhu
62ce2260e9 qcacmn: Use regdb component to set/get NOL-History channel list
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
2018-11-05 13:31:52 -08:00
Shashikala Prabhu
80d0451982 qcacmn: Add API to clear CAC started channel
Add API to clear CAC started channel in the DFS component.
Also, when AP detects the RADAR in DFS channel and restarts the AP vap in
NON-DFS channel, call MLME state machine to clear the DFS_WAIT flag and
move the state to RUN. Since MLME state machine is per vap, move the
NON-DFS check in dfs_clear_cac_started_chan() to MLME and call
dfs_mlme_proc_cac() per  vap.

Change-Id: I67033aa6ea819b6ed5d39a3911191d2051f731fc
Acked-by: Shashikala Prabhu <pshashik@codeaurora.org>
CRs-Fixed: 2324561
2018-10-21 23:14:24 -07:00
Priyadarshnee S
d3173ca81c qcacmn: Handle scan failure and vdev start caused by NOL violation
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
2018-10-18 02:17:07 -07:00
Vignesh U
aea8656c81 qcacmn: Update nol properly
When second segment bangradar is issued, the primary channels are
added to NOL. During preCAC, when a bangradar or real radar is injected in
the second segment, no channels are added to NOL.

dfs_seg_id is updated by enhanced bangradar even when the command is not
issued. During preCAC, the second segment frequency stored in current
channel is invalid and it is stored in dfs itself.

Correct the condition for enhanced bangradar command. Update dfs_seg_id and
radar found segment id. Move the portion of code that update radar_found
parameters when enhanced bangradar command is issued. This portion checks
for radar found segment id that would not have been updated yet. Use proper
second segment frequency to add to NOL during preCAC.

Change-Id: I5e1f1004b45bc30b5da7bfa174a5c03bdea4fa71
CRs-Fixed: 2303458
2018-10-10 09:18:09 -07:00
Shashikala Prabhu
c80456220e qcacmn: Move dfs cac start condition checks to dfs component
Move dfs-cac-start-condition checks to dfs component from MLME component.

Change-Id: Iaab45ce8e298a237b110f3046593fc5801e1673e
CRs-Fixed: 2299517
2018-10-08 22:20:18 -07:00
Abhijit Pradhan
9da501e634 qcacmn: Use regdb channels to fill etsi precac required list
Use regdb channels to fill etsi precac required list.

Change-Id: I4b9462c0c69150cf2288e17be0c46029d89e4765
CRs-Fixed: 2318558
2018-10-06 00:01:40 -07:00
bings
eeeeaded77 qcacmn: Use malloc to prevent stack overflow
For large local variable, it is better to use malloc to prevent the stack
overflow.

Change-Id: Ibf5f516132410122b730bfc1407ea14e0f26d630
CRs-Fixed: 2318354
2018-09-21 17:46:08 -07:00
gaurank kathpalia
f6e13db4b6 qcacmn: Add src, and dst id support in DFS
In the scheduler_post_message, src_id is now added to
know the source module of the msg. The present scheduler
doesn't know about the same which is scheduler_post_msg.

Replace the scheduler_post_msg with scheduler_post_message.

Change-Id: I954a56eb960e8caab25f0734da2f8badf77cad3a
CRs-Fixed: 2306020
2018-09-17 02:58:15 -07:00
Shashikala Prabhu
6b4d64dbfa qcacmn: Add APIs to skip DFS CAC
Skip CAC if cac is already started on the same channel or the new channel
is subset of CAC started channel.

Change-Id: I8f6121f1f8d034acf3f0514a60401a3232becaa2
CRs-Fixed: 2309911
2018-09-11 16:42:17 -07:00
Shashikala Prabhu
a5b0851b36 qcacmn: Do not print DFS error message for non 5 GHz pdev
For a 2GHz pdev, dfs object is NULL and hence 'dfs is NULL' print is
always seen in some of the dfs functions when user enables the dfs
error logs.

To fix this, add non 5 GHz pdev check before dfs NULL check.

Change-Id: I4702d8c487d5533a2a99b4560471a38992ea9177
CRs-Fixed: 2296853
2018-09-07 17:22:56 -07:00
Shaakir Mohamed
cbc53dd023 qcacmn: Add support for reduced BW-Agile DFS
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
2018-08-21 01:51:26 -07:00
Abhijit Pradhan
01abdac6a0 qcacmn: Free dfs timers during wifi driver unload
All the dfs timers that are initialized with qdf_timer_init()
must be freed with qdf_timer_free() to avoid the timer leaks.

Change-Id: I5425f0a84d0e252e3a1dc9b835f1b655fe79a691
CRs-Fixed: 2262081
2018-08-08 09:12:03 -07:00
Shashikala Prabhu
ce86ecdfd3 qcacmn: Add a public API to check if channel is in NOL
Add necessary wrapper functions so that other components/umac
can check if a HT20 channel is in NOL.

Change-Id: Ie2cda1fe8f71d829e261ebdcf4563a4c2ff352ae
CRs-Fixed: 2180879
2018-08-02 18:30:08 -07:00
Shreedhar Parande
62f2bb9136 qcacmn: PreCAC auto channel switch support
Changes to switch to the preferred preCAC channel after the
preCAC is done.
User can configure non-DFS channel as an intermediate
channel to reduce AP bringup time, and configure the DFS
channel as usual. PreCAC Logic will use the intermediate
channel as the home channel and will prioritize the DFS channel
to start preCAC first and switch automatically after the preCAC
timeout.
Command to configure intermediate non-DFS channel
iwpriv wifiX interCACChan <non-DFS channel num>
Assumption:
Intermediate channel should be configured before configuring
the DFS channel as operating channel.

Change-Id: I1dc00fa395aec53bfe5a6361095cd7d77ced503c
CRs-Fixed: 2272085
2018-07-12 01:33:19 -07:00
Shashikala Prabhu
e874411d1e qcacmn: Configure Allowed Channels and ACS Allowed Channels
Description:-
'wifitool athX setprimarychans ch1 ch2 ... chn' will restart athX if
current channel is not in primary allowed channel list.
'wifitool athX getprimarychans' to get primary allowed channel list.
The channel selected by ACS, random channel selection will be ignored
if it's not present in primary allowed channel list.
When user sets the channel using iwconfig or doth_chanswitch, if the
channel is not present in the primary allowed channel list then HOST
does not honour the channel change.

Change-Id: If37592d4246334a3c8fb17d44aaead7a6f9e969e
CRs-Fixed: 2264102
2018-06-28 23:38:59 -07:00
Abhijit Pradhan
56fe2450b5 qcacmn: Cleanup DFS function and corresponding function pointer
Remove the function lmac_is_mode_offload and corresponding function pointer
dfs_is_mode_offload since it is not used by the DFS component.

Change-Id: Ie55f5c8dc89466fa992451373819d148680318f1
CRs-Fixed: 2252565
2018-06-27 05:33:01 -07:00
Abhijit Pradhan
e556063bc7 qcacmn: Rename a DFS CAC function and corresponding function pointer
Rename the function dfs_mlme_deliver_event_up_afrer_cac() to
dfs_mlme_deliver_event_up_after_cac and rename the function pointer
mlme_deliver_event_up_afrer_ca to mlme_deliver_event_up_after_cac

Change-Id: I29c2094a0b45c9583b897e088ce9938c759e26ba
CRs-Fixed: 2251792
2018-06-25 17:37:30 -07:00
Arif Hussain
ecef5a4024 qcacmn: Add api to get dfs offload service bit in target_if
Add api to get dfs offload service bit in target_if.

Change-Id: I771ae8a2194250769d6e6d609b0a1863012110ea
CRs-Fixed: 2264477
2018-06-25 10:02:30 -07:00
Shaakir Mohamed
a0895b9989 qcacmn: Add support for ETSI pre-CAC cleared list
In ETSI domain, after CAC, channel is added to ETSI CAC cleared list,
so that next time it can skip CAC if channel is already present in this
list. If radar found, remove channel(s) from this list indicating that
when channel(s) is/are selected in future, the CAC needs to be re-done.

Change-Id: If6b31ecda2ab159188e7724bce7d1c2d8375fa3c
CRs-Fixed: 2143266
2018-06-20 21:23:28 -07:00
Naveen Rawat
8d36892372 qcacmn: Fix OOB access in utils_dfs_get_chan_list
Fix out of bound access for array "weight_list" with size 55 bytes
and declared on stack of function utils_dfs_get_chan_list. Same memory
is accessed in function policy_mgr_update_with_safe_channel_list with
index 127, leading to OOB access.

Change-Id: Ib7ba74e0096e90fd197bc563d2e82e497cf83759
CRs-Fixed: 2232833
2018-06-20 14:01:17 -07:00
Shashikala Prabhu
ab1d4c30ca qcacmn: Cleanup dfs unused function
Cleanup dfs_mlme_channel_mark_radar unused function.

Change-Id: I16aeacbca8f44de4dcab5667b6065fbb9b5c39d7
CRs-Fixed: 2245665
2018-06-15 20:10:50 -07:00
Kiran Venkatappa
68cd728ed8 qcacmn: Fix compiler failure with HOST_DFS_SPOOF_TEST not defined
Callbacks are defined for both cases, so remove compiler
flag around callback declaration and assign callback for both
HOST_DFS_SPOOF_TEST enabled and disabled cases.

Change-Id: I5e3cedaaa5be550243ac090da3ab6499c5e83904
CRs-Fixed: 2249806
2018-06-15 12:39:36 -07:00
Shashikala Prabhu
26d9f36f90 qcacmn: Do not print DFS error message for non 5 GHz pdev
In Repeater AP scenario, when STA vap starts scan, it calls the
registered DFS callback function to get the AP CAC status. For a
2 GHz pdev, dfs object is NULL and hence 'dfs is NULL' print is
always seen when user enables the dfs error logs.

Add non 5 GHz pdev check in dfs callback function before dfs NULL check.

Change-Id: Id087d0b126996406f2b6e1b5b34b90a12a18a890
CRs-Fixed: 2245034
2018-06-08 10:12:04 -07:00
Wen Gong
67d105d445 qcacmn: Add DFS master feature flag
Add config flag to enable / disable DFS master feature

Change-Id: Iddd82dd5f117a4d75fda161f5a531aa7eab25016
CRs-Fixed: 2222557
2018-05-24 00:49:52 -07:00
bings
3a7cf9b158 qcacmn: Refine chirp check for ETSI type 4 radar
Currently if the delta peak of the ETSI type 4 radar pulse is 0, it will
be considered as radar false dection, which affects normal dfs ETSI type
4 certification test.

More checks are added when delta peak of the ETSI type 4 radar pulse is 0.
If psidx_diff, the difference in the FFT peak index between the short FFT
and the first long FFT, is greater than 4 and less than 16, it is still
considered as valid ETSI type 4 radar pulse.

Change-Id: Iee9c22e0c208023bb9f0f70121f8269169b63d18
CRs-Fixed: 2173576
2018-05-23 20:45:39 -07:00