qcacld-3.0: Enable configurable dfs_pri_multiplier

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: 2522506
这个提交包含在:
Hangtian Zhu
2019-09-24 12:18:20 +08:00
提交者 nshrivas
父节点 6e84bde0ad
当前提交 9a28ed0437
修改 11 个文件,包含 148 行新增1 行删除

查看文件

@@ -940,6 +940,8 @@ static void mlme_init_dfs_cfg(struct wlan_objmgr_psoc *psoc,
cfg_get(psoc, CFG_DISABLE_DFS_JAPAN_W53);
dfs_cfg->sap_tx_leakage_threshold =
cfg_get(psoc, CFG_SAP_TX_LEAKAGE_THRESHOLD);
dfs_cfg->dfs_pri_multiplier =
cfg_get(psoc, CFG_DFS_RADAR_PRI_MULTIPLIER);
}
static void mlme_init_feature_flag_in_cfg(

查看文件

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2019 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
@@ -47,6 +47,31 @@
CFG_VALUE_OR_DEFAULT, \
"sap tx leakage threshold")
/*
* <ini>
* gDFSradarMappingPriMultiplier - dfs pri multiplier
* @Min: 1
* @Max: 10
* @Default: 2
*
* customer can set this value from 1 to 10 which means
* host could handle missing pulses while there is high
* channel loading, for example: 30% ETSI and 50% Japan W53
*
* Related: none
*
* Usage: External
*
* </ini>
*/
#define CFG_DFS_RADAR_PRI_MULTIPLIER CFG_INI_UINT( \
"gDFSradarMappingPriMultiplier", \
1, \
10, \
2, \
CFG_VALUE_OR_DEFAULT, \
"dfs pri multiplier")
/*
* <ini>
* gDfsBeaconTxEnhanced - beacon tx enhanced
@@ -203,6 +228,7 @@
CFG(CFG_DISABLE_DFS_CH_SWITCH) \
CFG(CFG_DFS_BEACON_TX_ENHANCED) \
CFG(CFG_SAP_TX_LEAKAGE_THRESHOLD) \
CFG(CFG_DFS_RADAR_PRI_MULTIPLIER) \
CFG(CFG_ENABLE_NON_DFS_CHAN_ON_RADAR) \
CFG(CFG_ENABLE_DFS_MASTER_CAPABILITY) \
CFG(CFG_DISABLE_DFS_JAPAN_W53) \

查看文件

@@ -702,6 +702,7 @@ struct wlan_mlme_cfg_sap {
* @dfs_prefer_non_dfs: perefer non dfs channel after radar
* @dfs_disable_japan_w53: Disable W53 channels
* @sap_tx_leakage_threshold: sap tx leakage threshold
* @dfs_pri_multiplier: dfs_pri_multiplier for handle missing pulses
*/
struct wlan_mlme_dfs_cfg {
bool dfs_master_capable;
@@ -712,6 +713,7 @@ struct wlan_mlme_dfs_cfg {
bool dfs_prefer_non_dfs;
bool dfs_disable_japan_w53;
uint32_t sap_tx_leakage_threshold;
uint32_t dfs_pri_multiplier;
};
/**

查看文件

@@ -751,6 +751,28 @@ QDF_STATUS
ucfg_mlme_set_sap_tx_leakage_threshold(struct wlan_objmgr_psoc *psoc,
uint32_t sap_tx_leakage_threshold);
/*
* ucfg_mlme_get_dfs_pri_multiplier() - Get dfs pri multiplier
* @psoc: pointer to psoc object
* @dfs_pri_multiplier: Pointer to the value which will be filled
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_get_dfs_pri_multiplier(struct wlan_objmgr_psoc *psoc,
uint32_t *dfs_pri_multiplier);
/*
* ucfg_mlme_set_dfs_pri_multiplier() - Set dfs pri multiplier
* @psoc: pointer to psoc object
* @dfs_pri_multiplier: Value that needs to be set.
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_set_dfs_pri_multiplier(struct wlan_objmgr_psoc *psoc,
uint32_t dfs_pri_multiplier);
/*
* ucfg_mlme_get_dfs_filter_offload() - Get the dfs filter offload
* @psoc: pointer to psoc object

查看文件

@@ -325,6 +325,41 @@ ucfg_mlme_set_sap_tx_leakage_threshold(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
ucfg_mlme_get_dfs_pri_multiplier(struct wlan_objmgr_psoc *psoc,
uint32_t *dfs_pri_multiplier)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
*dfs_pri_multiplier =
cfg_default(CFG_DFS_RADAR_PRI_MULTIPLIER);
return QDF_STATUS_E_INVAL;
}
*dfs_pri_multiplier =
mlme_obj->cfg.dfs_cfg.dfs_pri_multiplier;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
ucfg_mlme_set_dfs_pri_multiplier(struct wlan_objmgr_psoc *psoc,
uint32_t dfs_pri_multiplier)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj)
return QDF_STATUS_E_INVAL;
mlme_obj->cfg.dfs_cfg.dfs_pri_multiplier =
dfs_pri_multiplier;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
ucfg_mlme_get_dfs_filter_offload(struct wlan_objmgr_psoc *psoc,
bool *dfs_filter_offload)