qcacmn: Avoid functions with a very long list of arguments
To avoid passing multiple parameters to MLME functions from DFS component, use a common structure between these components and pass the structure instead of long list of parameters. Define the common structure in cmn_services directory to access it in both the components. Change-Id: I02dde0780eebbce0886685d1f72a62c84e5b4eeb CRs-Fixed: 2146000
Šī revīzija ir iekļauta:

revīziju iesūtīja
snandini

vecāks
2907bc546c
revīzija
f9df7db9b5
@@ -31,34 +31,10 @@
|
||||
/**
|
||||
* lmac_get_caps() - Get DFS capabilities.
|
||||
* @pdev: Pointer to PDEV structure.
|
||||
* @ext_chan: Can radar be detected on the extension chan?
|
||||
* @combined_rssi: Can use combined radar RSSI?
|
||||
* @use_enhancement: This flag is used to indicate if radar
|
||||
* detection scheme should use enhanced chirping
|
||||
* detection algorithm. This flag also determines
|
||||
* if certain radar data should be discarded to
|
||||
* minimize false detection of radar.
|
||||
* @strong_signal_diversiry: Strong Signal fast diversity count.
|
||||
* @chip_is_bb_tlv: Chip is BB TLV?
|
||||
* @chip_is_over_sampled: Is Over sampled.
|
||||
* @chip_is_ht160: IS VHT160?
|
||||
* @chip_is_false_detect: Is False detected?
|
||||
* @fastdiv_val: Goes with wlan_strong_signal_diversiry: If we
|
||||
* have fast diversity capability, read off
|
||||
* Strong Signal fast diversity count set in the
|
||||
* ini file, and store so we can restore the
|
||||
* value when radar is disabled.
|
||||
* @dfs_caps: Pointer to dfs_caps structure
|
||||
*/
|
||||
void lmac_get_caps(struct wlan_objmgr_pdev *pdev,
|
||||
bool *ext_chan,
|
||||
bool *combined_rssi,
|
||||
bool *use_enhancement,
|
||||
bool *strong_signal_diversiry,
|
||||
bool *chip_is_bb_tlv,
|
||||
bool *chip_is_over_sampled,
|
||||
bool *chip_is_ht160,
|
||||
bool *chip_is_false_detect,
|
||||
uint32_t *fastdiv_val);
|
||||
struct wlan_dfs_caps *dfs_caps);
|
||||
|
||||
/**
|
||||
* lmac_get_tsf64() - Get tsf64 value.
|
||||
@@ -79,49 +55,21 @@ void lmac_dfs_disable(struct wlan_objmgr_pdev *pdev, int no_cac);
|
||||
* lmac_dfs_enable() - Enable DFS.
|
||||
* @pdev: Pointer to PDEV structure.
|
||||
* @is_fastclk: fastclk value.
|
||||
* @pe_firpwr: FIR pwr out threshold.
|
||||
* @pe_rrssi: Radar rssi thresh.
|
||||
* @pe_height: Pulse height thresh.
|
||||
* @pe_prssi: Pulse rssi thresh.
|
||||
* @pe_inband: Inband thresh.
|
||||
* @pe_relpwr: Relative power threshold in 0.5dB steps.
|
||||
* @pe_relstep: Pulse Relative step threshold in 0.5dB steps.
|
||||
* @pe_maxlen: Max length of radar sign in 0.8us units.
|
||||
* @param: Pointer to wlan_dfs_phyerr_param structure.
|
||||
* @dfsdomain: DFS domain.
|
||||
*/
|
||||
void lmac_dfs_enable(struct wlan_objmgr_pdev *pdev,
|
||||
int *is_fastclk,
|
||||
int32_t pe_firpwr,
|
||||
int32_t pe_rrssi,
|
||||
int32_t pe_height,
|
||||
int32_t pe_prssi,
|
||||
int32_t pe_inband,
|
||||
uint32_t pe_relpwr,
|
||||
uint32_t pe_relstep,
|
||||
uint32_t pe_maxlen,
|
||||
struct wlan_dfs_phyerr_param *param,
|
||||
int dfsdomain);
|
||||
|
||||
/**
|
||||
* lmac_dfs_get_thresholds() - Get thresholds.
|
||||
* @pdev: Pointer to PDEV structure.
|
||||
* @pe_firpwr: FIR pwr out threshold.
|
||||
* @pe_rrssi: Radar rssi thresh.
|
||||
* @pe_height: Pulse height thresh.
|
||||
* @pe_prssi: Pulse rssi thresh.
|
||||
* @pe_inband: Inband thresh.
|
||||
* @pe_relpwr: Relative power threshold in 0.5dB steps.
|
||||
* @pe_relstep: Pulse Relative step threshold in 0.5dB steps.
|
||||
* @pe_maxlen: Max length of radar sign in 0.8us units.
|
||||
* @param: Pointer to wlan_dfs_phyerr_param structure.
|
||||
*/
|
||||
void lmac_dfs_get_thresholds(struct wlan_objmgr_pdev *pdev,
|
||||
int32_t *pe_firpwr,
|
||||
int32_t *pe_rrssi,
|
||||
int32_t *pe_height,
|
||||
int32_t *pe_prssi,
|
||||
int32_t *pe_inband,
|
||||
uint32_t *pe_relpwr,
|
||||
uint32_t *pe_relstep,
|
||||
uint32_t *pe_maxlen);
|
||||
struct wlan_dfs_phyerr_param *param);
|
||||
|
||||
/**
|
||||
* lmac_is_mode_offload() - Check the radio for offload.
|
||||
|
@@ -26,15 +26,7 @@
|
||||
#include <wlan_reg_services_api.h>
|
||||
|
||||
void lmac_get_caps(struct wlan_objmgr_pdev *pdev,
|
||||
bool *ext_chan,
|
||||
bool *combined_rssi,
|
||||
bool *use_enhancement,
|
||||
bool *strong_signal_diversiry,
|
||||
bool *chip_is_bb_tlv,
|
||||
bool *chip_is_over_sampled,
|
||||
bool *chip_is_ht160,
|
||||
bool *chip_is_false_detect,
|
||||
uint32_t *fastdiv_val)
|
||||
struct wlan_dfs_caps *dfs_caps)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
struct wlan_lmac_if_dfs_tx_ops *dfs_tx_ops;
|
||||
@@ -44,16 +36,7 @@ void lmac_get_caps(struct wlan_objmgr_pdev *pdev,
|
||||
dfs_tx_ops = &psoc->soc_cb.tx_ops.dfs_tx_ops;
|
||||
|
||||
if (dfs_tx_ops->dfs_get_caps)
|
||||
dfs_tx_ops->dfs_get_caps(pdev,
|
||||
ext_chan,
|
||||
combined_rssi,
|
||||
use_enhancement,
|
||||
strong_signal_diversiry,
|
||||
chip_is_bb_tlv,
|
||||
chip_is_over_sampled,
|
||||
chip_is_ht160,
|
||||
chip_is_false_detect,
|
||||
fastdiv_val);
|
||||
dfs_tx_ops->dfs_get_caps(pdev, dfs_caps);
|
||||
}
|
||||
|
||||
uint64_t lmac_get_tsf64(struct wlan_objmgr_pdev *pdev)
|
||||
@@ -87,14 +70,7 @@ void lmac_dfs_disable(struct wlan_objmgr_pdev *pdev, int no_cac)
|
||||
|
||||
void lmac_dfs_enable(struct wlan_objmgr_pdev *pdev,
|
||||
int *is_fastclk,
|
||||
int32_t pe_firpwr,
|
||||
int32_t pe_rrssi,
|
||||
int32_t pe_height,
|
||||
int32_t pe_prssi,
|
||||
int32_t pe_inband,
|
||||
uint32_t pe_relpwr,
|
||||
uint32_t pe_relstep,
|
||||
uint32_t pe_maxlen,
|
||||
struct wlan_dfs_phyerr_param *param,
|
||||
int dfsdomain)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
@@ -107,26 +83,12 @@ void lmac_dfs_enable(struct wlan_objmgr_pdev *pdev,
|
||||
if (dfs_tx_ops->dfs_enable)
|
||||
dfs_tx_ops->dfs_enable(pdev,
|
||||
is_fastclk,
|
||||
pe_firpwr,
|
||||
pe_rrssi,
|
||||
pe_height,
|
||||
pe_prssi,
|
||||
pe_inband,
|
||||
pe_relpwr,
|
||||
pe_relstep,
|
||||
pe_maxlen,
|
||||
param,
|
||||
dfsdomain);
|
||||
}
|
||||
|
||||
void lmac_dfs_get_thresholds(struct wlan_objmgr_pdev *pdev,
|
||||
int32_t *pe_firpwr,
|
||||
int32_t *pe_rrssi,
|
||||
int32_t *pe_height,
|
||||
int32_t *pe_prssi,
|
||||
int32_t *pe_inband,
|
||||
uint32_t *pe_relpwr,
|
||||
uint32_t *pe_relstep,
|
||||
uint32_t *pe_maxlen)
|
||||
struct wlan_dfs_phyerr_param *param)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
struct wlan_lmac_if_dfs_tx_ops *dfs_tx_ops;
|
||||
@@ -136,15 +98,7 @@ void lmac_dfs_get_thresholds(struct wlan_objmgr_pdev *pdev,
|
||||
dfs_tx_ops = &psoc->soc_cb.tx_ops.dfs_tx_ops;
|
||||
|
||||
if (dfs_tx_ops->dfs_get_thresholds)
|
||||
dfs_tx_ops->dfs_get_thresholds(pdev,
|
||||
pe_firpwr,
|
||||
pe_rrssi,
|
||||
pe_height,
|
||||
pe_prssi,
|
||||
pe_inband,
|
||||
pe_relpwr,
|
||||
pe_relstep,
|
||||
pe_maxlen);
|
||||
dfs_tx_ops->dfs_get_thresholds(pdev, param);
|
||||
}
|
||||
|
||||
bool lmac_is_mode_offload(struct wlan_objmgr_pdev *pdev)
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user