mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
Merge "qcacmn: Enable external processing of radar"
This commit is contained in:
commit
1d96209158
3 changed files with 76 additions and 20 deletions
63
umac/dfs/core/src/dfs_confirm_radar.h
Normal file
63
umac/dfs/core/src/dfs_confirm_radar.h
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* DOC: dfs_confirm_radar.h
|
||||
* This file contains false radar detection specific dfs interfaces.
|
||||
*/
|
||||
|
||||
#ifndef _DFS_CONFIRM_RADAR_H_
|
||||
#define _DFS_CONFIRM_RADAR_H_
|
||||
|
||||
#include "dfs_internal.h"
|
||||
|
||||
#define DFS_INVALID_PRI_LIMIT 100 /* should we use 135? */
|
||||
#define FRAC_PRI_SCORE_ARRAY_SIZE 40
|
||||
|
||||
/**
|
||||
* dfs_is_real_radar() - This function checks for fractional PRI and jitter in
|
||||
* sidx index to determine if the radar is real or not.
|
||||
* @dfs: Pointer to dfs structure.
|
||||
* @rf: Pointer to dfs_filter structure.
|
||||
* @ext_chan_flag: ext chan flags.
|
||||
*
|
||||
* Return : true if real RADAR else false.
|
||||
*/
|
||||
#ifdef CONFIG_EXT_RADAR_PROCESS
|
||||
bool dfs_is_real_radar(struct wlan_dfs *dfs,
|
||||
struct dfs_filter *rf,
|
||||
int ext_chan_flag);
|
||||
#endif /* CONFIG_EXT_RADAR_PROCESS */
|
||||
|
||||
/**
|
||||
* dfs_get_ext_filter() - This function gets the external radar filter table.
|
||||
* @domain: The dfs domain for which the external radar table is needed.
|
||||
* @num_radars: Output agrument. Stores the numbers of filters in the filter.
|
||||
* table.
|
||||
*
|
||||
* Return: Pointer to the radar table.
|
||||
*/
|
||||
#ifdef CONFIG_EXT_RADAR_PROCESS
|
||||
struct dfs_pulse *dfs_get_ext_filter(enum DFS_DOMAIN domain,
|
||||
uint8_t *num_radars);
|
||||
#else
|
||||
static inline struct dfs_pulse *dfs_get_ext_filter(enum DFS_DOMAIN domain,
|
||||
uint8_t *num_radars)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#endif /* CONFIG_EXT_RADAR_PROCESS */
|
||||
#endif
|
||||
|
|
@ -30,6 +30,7 @@
|
|||
#if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
|
||||
#include "../dfs_process_radar_found_ind.h"
|
||||
#endif
|
||||
#include "../dfs_confirm_radar.h"
|
||||
|
||||
/**
|
||||
* struct dfs_pulse dfs_fcc_radars - FCC radar table for Offload chipsets.
|
||||
|
|
@ -96,16 +97,6 @@ static struct dfs_pulse dfs_mkk4_radars[] = {
|
|||
{16, 15, 2000, 5000, 0, 4, 7, 11, 23, 22, 0, 3, 0, 5, 0, 11},
|
||||
};
|
||||
|
||||
/**
|
||||
* struct dfs_pulse dfs_mkkn_radars - MKKN radar table for Offload chipsets.
|
||||
*/
|
||||
static struct dfs_pulse dfs_mkkn_radars[] = {
|
||||
/** Since the table is empty no new radar type shall be detected.
|
||||
* New filters shall be added to this tables after proper testing
|
||||
* and verification.
|
||||
*/
|
||||
};
|
||||
|
||||
/**
|
||||
* struct dfs_bin5pulse dfs_fcc_bin5pulses - FCC BIN5 pulses for Offload
|
||||
* chipsets.
|
||||
|
|
@ -419,8 +410,8 @@ void dfs_get_po_radars(struct wlan_dfs *dfs)
|
|||
case DFS_MKKN_DOMAIN:
|
||||
dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS, "MKKN domain");
|
||||
rinfo.dfsdomain = DFS_MKKN_DOMAIN;
|
||||
rinfo.dfs_radars = dfs_mkkn_radars;
|
||||
rinfo.numradars = QDF_ARRAY_SIZE(dfs_mkkn_radars);
|
||||
rinfo.dfs_radars = dfs_mkk4_radars;
|
||||
rinfo.numradars = QDF_ARRAY_SIZE(dfs_mkk4_radars);
|
||||
rinfo.b5pulses = NULL;
|
||||
rinfo.numb5radars = 0;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include "wlan_dfs_utils_api.h"
|
||||
#include "wlan_dfs_lmac_api.h"
|
||||
#include "../dfs_partial_offload_radar.h"
|
||||
#include "../dfs_confirm_radar.h"
|
||||
|
||||
#ifdef DFS_FCC_TYPE4_DURATION_CHECK
|
||||
#define DFS_WAR_30_MHZ_SEPARATION 30
|
||||
|
|
@ -47,11 +48,8 @@
|
|||
#define DFS_MAX_FREQ_SPREAD (1375 * 1)
|
||||
#define DFS_LARGE_PRI_MULTIPLIER 4
|
||||
#define DFS_W53_DEFAULT_PRI_MULTIPLIER 2
|
||||
#define DFS_INVALID_PRI_LIMIT 100 /* should we use 135? */
|
||||
#define DFS_BIG_SIDX 10000
|
||||
|
||||
#define FRAC_PRI_SCORE_ARRAY_SIZE 40
|
||||
|
||||
static char debug_dup[33];
|
||||
static int debug_dup_cnt;
|
||||
|
||||
|
|
@ -199,16 +197,19 @@ static void dfs_print_radar_events(struct wlan_dfs *dfs)
|
|||
dfs->dfs_phyerr_freq_max = 0;
|
||||
}
|
||||
|
||||
#ifndef CONFIG_EXT_RADAR_PROCESS
|
||||
/**
|
||||
* dfs_confirm_radar() - This function checks for fractional PRI and jitter in
|
||||
* dfs_is_real_radar() - This function checks for fractional PRI and jitter in
|
||||
* sidx index to determine if the radar is real or not.
|
||||
* @dfs: Pointer to dfs structure.
|
||||
* @rf: Pointer to dfs_filter structure.
|
||||
* @ext_chan_flag: ext chan flags.
|
||||
*
|
||||
* Return : true if real RADAR else false.
|
||||
*/
|
||||
static int dfs_confirm_radar(struct wlan_dfs *dfs,
|
||||
struct dfs_filter *rf,
|
||||
int ext_chan_flag)
|
||||
static bool dfs_is_real_radar(struct wlan_dfs *dfs,
|
||||
struct dfs_filter *rf,
|
||||
int ext_chan_flag)
|
||||
{
|
||||
int i = 0;
|
||||
int index;
|
||||
|
|
@ -362,6 +363,7 @@ static int dfs_confirm_radar(struct wlan_dfs *dfs,
|
|||
dl->dl_max_sidx) / 2);
|
||||
return 1;
|
||||
}
|
||||
#endif /* CONFIG_EXT_RADAR_PROCESS */
|
||||
|
||||
/*
|
||||
* dfs_reject_on_pri() - Rejecting on individual filter based on min PRI .
|
||||
|
|
@ -440,7 +442,7 @@ static inline void dfs_confirm_radar_check(
|
|||
int *false_radar_found)
|
||||
{
|
||||
if (rf->rf_patterntype != 1) {
|
||||
*found = dfs_confirm_radar(dfs, rf, ext_chan_event_flag);
|
||||
*found = (int)dfs_is_real_radar(dfs, rf, ext_chan_event_flag);
|
||||
*false_radar_found = (*found == 1) ? 0 : 1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue