qcacld-3.0: Add ini params for three antenna BTC mode

Add below ini parameters for three antenna BTC mode and send
them to firmware using WMI command WMI_COEX_CONFIG_CMDID.
1. gSetBTCMode
2. gSetAntennaIsolation
3. gSetMaxTxPowerForBTC
4. gSetWlanLowRssiThreshold
5. gSetBtLowRssiThreshold
6. gSetBtInterferenceLowLL
7. gSetBtInterferenceLowUL
8. gSetBtInterferenceMediumLL
9. gSetBtInterferenceMediumUL
10. gSetBtInterferenceHighLL
11. gSetBtInterferenceHighUL

Change-Id: I69030b6e80ee99912e2f3baced883894d18db0b6
CRs-Fixed: 2298652
Este commit está contenido en:
Dundi Raviteja
2018-09-12 13:42:50 +05:30
cometido por nshrivas
padre cfbc6f703c
commit 54a1f4fdf5
Se han modificado 6 ficheros con 343 adiciones y 5 borrados

Ver fichero

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2012 - 2018 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
@@ -33,12 +33,40 @@
#define fwol_info(params...) QDF_TRACE_INFO(QDF_MODULE_ID_FWOL, params)
#define fwol_debug(params...) QDF_TRACE_DEBUG(QDF_MODULE_ID_FWOL, params)
/**
* struct wlan_fwol_three_antenna_btc - Three antenna BTC config items
* @btc_mode: Config BTC mode
* @antenna_isolation: Antenna isolation
* @max_tx_power_for_btc: Max wlan tx power in co-ex scenario
* @wlan_low_rssi_threshold: Wlan low rssi threshold for BTC mode switching
* @bt_low_rssi_threshold: BT low rssi threshold for BTC mode switching
* @bt_interference_low_ll: Lower limit of low level BT interference
* @bt_interference_low_ul: Upper limit of low level BT interference
* @bt_interference_medium_ll: Lower limit of medium level BT interference
* @bt_interference_medium_ul: Upper limit of medium level BT interference
* @bt_interference_high_ll: Lower limit of high level BT interference
* @bt_interference_high_ul: Upper limit of high level BT interference
*/
struct wlan_fwol_coex_config {
uint8_t btc_mode;
uint8_t antenna_isolation;
uint8_t max_tx_power_for_btc;
int16_t wlan_low_rssi_threshold;
int16_t bt_low_rssi_threshold;
int16_t bt_interference_low_ll;
int16_t bt_interference_low_ul;
int16_t bt_interference_medium_ll;
int16_t bt_interference_medium_ul;
int16_t bt_interference_high_ll;
int16_t bt_interference_high_ul;
};
/**
* struct wlan_fwol_cfg - fwol config items
* coex_config: coex config items
*/
struct wlan_fwol_cfg {
/* Add CFG and INI items here */
int test;
struct wlan_fwol_coex_config coex_config;
};
/**

Ver fichero

@@ -28,6 +28,32 @@ struct wlan_fwol_psoc_obj *fwol_get_psoc_obj(struct wlan_objmgr_psoc *psoc)
WLAN_UMAC_COMP_FWOL);
}
static void
fwol_update_coex_config_in_cfg(struct wlan_objmgr_psoc *psoc,
struct wlan_fwol_coex_config *coex_config)
{
coex_config->btc_mode = cfg_get(psoc, CFG_BTC_MODE);
coex_config->antenna_isolation = cfg_get(psoc, CFG_ANTENNA_ISOLATION);
coex_config->max_tx_power_for_btc =
cfg_get(psoc, CFG_MAX_TX_POWER_FOR_BTC);
coex_config->wlan_low_rssi_threshold =
cfg_get(psoc, CFG_WLAN_LOW_RSSI_THRESHOLD);
coex_config->bt_low_rssi_threshold =
cfg_get(psoc, CFG_BT_LOW_RSSI_THRESHOLD);
coex_config->bt_interference_low_ll =
cfg_get(psoc, CFG_BT_INTERFERENCE_LOW_LL);
coex_config->bt_interference_low_ul =
cfg_get(psoc, CFG_BT_INTERFERENCE_LOW_UL);
coex_config->bt_interference_medium_ll =
cfg_get(psoc, CFG_BT_INTERFERENCE_MEDIUM_LL);
coex_config->bt_interference_medium_ul =
cfg_get(psoc, CFG_BT_INTERFERENCE_MEDIUM_UL);
coex_config->bt_interference_high_ll =
cfg_get(psoc, CFG_BT_INTERFERENCE_HIGH_LL);
coex_config->bt_interference_high_ul =
cfg_get(psoc, CFG_BT_INTERFERENCE_HIGH_UL);
}
QDF_STATUS fwol_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
{
QDF_STATUS status = QDF_STATUS_SUCCESS;
@@ -41,7 +67,8 @@ QDF_STATUS fwol_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
}
fwol_cfg = &fwol_obj->cfg;
/* Populate the CFG and INI here using CFG_GET */
fwol_update_coex_config_in_cfg(psoc, &fwol_cfg->coex_config);
return status;
}

Ver fichero

@@ -0,0 +1,251 @@
/*
* Copyright (c) 2012 - 2018 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: This file contains centralized definitions of converged configuration.
*/
#ifndef __CFG_COEX_H
#define __CFG_COEX_H
/*
* <ini>
* gSetBTCMode - Config BTC mode
* @Min: 0
* @Max: 2
* @Default: 0
*
* 0 - TDD
* 1 - FDD
* 2 - Hybrid
*
* Usage: External
*
* </ini>
*/
#define CFG_BTC_MODE CFG_INI_UINT( \
"gSetBTCMode", \
0, \
2, \
0, \
CFG_VALUE_OR_DEFAULT, \
"BTC mode")
/*
* <ini>
* gSetAntennaIsolation - Set Antenna Isolation
* @Min: 0
* @Max: 255
* @Default: 25
*
* Usage: External
*
* </ini>
*/
#define CFG_ANTENNA_ISOLATION CFG_INI_UINT( \
"gSetAntennaIsolation", \
0, \
255, \
25, \
CFG_VALUE_OR_DEFAULT, \
"Antenna Isolation")
/*
* <ini>
* gSetMaxTxPowerForBTC - Set Max WLAN Tx power in COEX scenario
* @Min: 0
* @Max: 100
* @Default: 100
*
* Usage: External
*
* </ini>
*/
#define CFG_MAX_TX_POWER_FOR_BTC CFG_INI_UINT( \
"gSetMaxTxPowerForBTC", \
0, \
100, \
100, \
CFG_VALUE_OR_DEFAULT, \
"Max Tx Power for BTC")
/*
* <ini>
* gSetWlanLowRssiThreshold - Set WLAN low RSSI threshold for BTC mode switching
* @Min: -100
* @Max: 0
* @Default: -80
*
* Usage: External
*
* </ini>
*/
#define CFG_WLAN_LOW_RSSI_THRESHOLD CFG_INI_INT( \
"gSetWlanLowRssiThreshold", \
-100, \
0, \
-80, \
CFG_VALUE_OR_DEFAULT, \
"WLAN Low RSSI Threshold")
/*
* <ini>
* gSetBtLowRssiThreshold - Set BT low RSSI threshold for BTC mode switching
* @Min: -100
* @Max: 0
* @Default: -80
*
* Usage: External
*
* </ini>
*/
#define CFG_BT_LOW_RSSI_THRESHOLD CFG_INI_INT( \
"gSetBtLowRssiThreshold", \
-100, \
0, \
-80, \
CFG_VALUE_OR_DEFAULT, \
"BT Low RSSI Threshold")
/*
* <ini>
* gSetBtInterferenceLowLL - Set lower limit of low level BT interference
* @Min: -100
* @Max: 100
* @Default: -25
*
* Usage: External
*
* </ini>
*/
#define CFG_BT_INTERFERENCE_LOW_LL CFG_INI_INT( \
"gSetBtInterferenceLowLL", \
-100, \
100, \
-25, \
CFG_VALUE_OR_DEFAULT, \
"BT Interference Low LL")
/*
* <ini>
* gSetBtInterferenceLowUL - Set upper limit of low level BT interference
* @Min: -100
* @Max: 100
* @Default: -21
*
* Usage: External
*
* </ini>
*/
#define CFG_BT_INTERFERENCE_LOW_UL CFG_INI_INT( \
"gSetBtInterferenceLowUL", \
-100, \
100, \
-21, \
CFG_VALUE_OR_DEFAULT, \
"BT Interference Low UL")
/*
* <ini>
* gSetBtInterferenceMediumLL - Set lower limit of medium level BT interference
* @Min: -100
* @Max: 100
* @Default: -20
*
* Usage: External
*
* </ini>
*/
#define CFG_BT_INTERFERENCE_MEDIUM_LL CFG_INI_INT( \
"gSetBtInterferenceMediumLL", \
-100, \
100, \
-20, \
CFG_VALUE_OR_DEFAULT, \
"BT Interference Medium LL")
/*
* <ini>
* gSetBtInterferenceMediumUL - Set upper limit of medium level BT interference
* @Min: -100
* @Max: 100
* @Default: -16
*
* Usage: External
*
* </ini>
*/
#define CFG_BT_INTERFERENCE_MEDIUM_UL CFG_INI_INT( \
"gSetBtInterferenceMediumUL", \
-100, \
100, \
-16, \
CFG_VALUE_OR_DEFAULT, \
"BT Interference Medium UL")
/*
* <ini>
* gSetBtInterferenceHighLL - Set lower limit of high level BT interference
* @Min: -100
* @Max: 100
* @Default: -15
*
* Usage: External
*
* </ini>
*/
#define CFG_BT_INTERFERENCE_HIGH_LL CFG_INI_INT( \
"gSetBtInterferenceHighLL", \
-100, \
100, \
-15, \
CFG_VALUE_OR_DEFAULT, \
"BT Interference High LL")
/*
* <ini>
* gSetBtInterferenceHighUL - Set upper limit of high level BT interference
* @Min: -100
* @Max: 100
* @Default: -11
*
* Usage: External
*
* </ini>
*/
#define CFG_BT_INTERFERENCE_HIGH_UL CFG_INI_INT( \
"gSetBtInterferenceHighUL", \
-100, \
100, \
-11, \
CFG_VALUE_OR_DEFAULT, \
"BT Interference High UL")
#define CFG_COEX_ALL \
CFG(CFG_BTC_MODE) \
CFG(CFG_ANTENNA_ISOLATION) \
CFG(CFG_MAX_TX_POWER_FOR_BTC) \
CFG(CFG_WLAN_LOW_RSSI_THRESHOLD) \
CFG(CFG_BT_LOW_RSSI_THRESHOLD) \
CFG(CFG_BT_INTERFERENCE_LOW_LL) \
CFG(CFG_BT_INTERFERENCE_LOW_UL) \
CFG(CFG_BT_INTERFERENCE_MEDIUM_LL) \
CFG(CFG_BT_INTERFERENCE_MEDIUM_UL) \
CFG(CFG_BT_INTERFERENCE_HIGH_LL) \
CFG(CFG_BT_INTERFERENCE_HIGH_UL)
#endif

Ver fichero

@@ -23,7 +23,10 @@
#include "cfg_converged.h"
#include "qdf_types.h"
#define CFG_FWOL_ALL
#include "cfg_coex.h"
#define CFG_FWOL_ALL \
CFG_COEX_ALL
#endif /* __CFG_FWOL_H */

Ver fichero

@@ -26,6 +26,8 @@
#include <wlan_objmgr_global_obj.h>
#include <wlan_cmn.h>
#include "wlan_fw_offload_main.h"
/**
* ucfg_fwol_psoc_open() - FWOL component Open
* @psoc: pointer to psoc object
@@ -64,4 +66,15 @@ QDF_STATUS ucfg_fwol_init(void);
*/
void ucfg_fwol_deinit(void);
/**
* ucfg_fwol_get_coex_config_params() - Get coex config params
* @psoc: Pointer to psoc object
* @coex_config: Pointer to struct wlan_fwol_coex_config
*
* Return: QDF_STATUS
*/
QDF_STATUS
ucfg_fwol_get_coex_config_params(struct wlan_objmgr_psoc *psoc,
struct wlan_fwol_coex_config *coex_config);
#endif /* _WLAN_FWOL_UCFG_API_H_ */

Ver fichero

@@ -149,3 +149,19 @@ void ucfg_fwol_deinit(void)
fwol_err("unable to unregister psoc create handle");
}
QDF_STATUS
ucfg_fwol_get_coex_config_params(struct wlan_objmgr_psoc *psoc,
struct wlan_fwol_coex_config *coex_config)
{
struct wlan_fwol_psoc_obj *fwol_obj;
fwol_obj = fwol_get_psoc_obj(psoc);
if (!fwol_obj) {
fwol_err("Failed to get fwol obj");
return QDF_STATUS_E_FAILURE;
}
*coex_config = fwol_obj->cfg.coex_config;
return QDF_STATUS_SUCCESS;
}