qcacld-3.0: Add INI parameter to enable/disable MPTA helper
Due to PTA master limitation, zigbee joining network success rate is low while wlan is working. Wlan host driver need to configure some parameters including Zigbee state and specific WLAN period to enhance PTA master. This mechanism is called MPTA helper. The INI parameter gMPTAHelperEnable is used to enable/disable this feature. Change-Id: I070c06a00ec2c405540cc40251f5cb7fec211cbd CRs-Fixed: 2407801
This commit is contained in:
@@ -48,6 +48,7 @@
|
|||||||
* @bt_interference_medium_ul: Upper 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_ll: Lower limit of high level BT interference
|
||||||
* @bt_interference_high_ul: Upper limit of high level BT interference
|
* @bt_interference_high_ul: Upper limit of high level BT interference
|
||||||
|
* @btc_mpta_helper_enable: Enable/Disable tri-radio MPTA helper
|
||||||
*/
|
*/
|
||||||
struct wlan_fwol_coex_config {
|
struct wlan_fwol_coex_config {
|
||||||
uint8_t btc_mode;
|
uint8_t btc_mode;
|
||||||
@@ -61,6 +62,9 @@ struct wlan_fwol_coex_config {
|
|||||||
int16_t bt_interference_medium_ul;
|
int16_t bt_interference_medium_ul;
|
||||||
int16_t bt_interference_high_ll;
|
int16_t bt_interference_high_ll;
|
||||||
int16_t bt_interference_high_ul;
|
int16_t bt_interference_high_ul;
|
||||||
|
#ifdef FEATURE_MPTA_HELPER
|
||||||
|
bool btc_mpta_helper_enable;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#define FWOL_THERMAL_LEVEL_MAX 4
|
#define FWOL_THERMAL_LEVEL_MAX 4
|
||||||
|
@@ -29,6 +29,29 @@ struct wlan_fwol_psoc_obj *fwol_get_psoc_obj(struct wlan_objmgr_psoc *psoc)
|
|||||||
WLAN_UMAC_COMP_FWOL);
|
WLAN_UMAC_COMP_FWOL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* fwol_mpta_helper_config_get: Populate btc_mpta_helper_enable from cfg
|
||||||
|
* @psoc: The global psoc handler
|
||||||
|
* @coex_config: The cfg structure
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
#ifdef FEATURE_MPTA_HELPER
|
||||||
|
static void
|
||||||
|
fwol_mpta_helper_config_get(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct wlan_fwol_coex_config *coex_config)
|
||||||
|
{
|
||||||
|
coex_config->btc_mpta_helper_enable =
|
||||||
|
cfg_get(psoc, CFG_COEX_MPTA_HELPER);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static void
|
||||||
|
fwol_mpta_helper_config_get(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct wlan_fwol_coex_config *coex_config)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fwol_init_coex_config_in_cfg(struct wlan_objmgr_psoc *psoc,
|
fwol_init_coex_config_in_cfg(struct wlan_objmgr_psoc *psoc,
|
||||||
struct wlan_fwol_coex_config *coex_config)
|
struct wlan_fwol_coex_config *coex_config)
|
||||||
@@ -53,6 +76,7 @@ fwol_init_coex_config_in_cfg(struct wlan_objmgr_psoc *psoc,
|
|||||||
cfg_get(psoc, CFG_BT_INTERFERENCE_HIGH_LL);
|
cfg_get(psoc, CFG_BT_INTERFERENCE_HIGH_LL);
|
||||||
coex_config->bt_interference_high_ul =
|
coex_config->bt_interference_high_ul =
|
||||||
cfg_get(psoc, CFG_BT_INTERFERENCE_HIGH_UL);
|
cfg_get(psoc, CFG_BT_INTERFERENCE_HIGH_UL);
|
||||||
|
fwol_mpta_helper_config_get(psoc, coex_config);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@@ -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
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -236,6 +236,30 @@
|
|||||||
CFG_VALUE_OR_DEFAULT, \
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
"BT Interference High UL")
|
"BT Interference High UL")
|
||||||
|
|
||||||
|
#ifdef FEATURE_MPTA_HELPER
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gMPTAHelperEnable - Enable MPTA Helper
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 1
|
||||||
|
* @Default: 0
|
||||||
|
*
|
||||||
|
* This ini is used to enable or disable coex MPTA Helper.
|
||||||
|
*
|
||||||
|
* Usage: External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_COEX_MPTA_HELPER CFG_INI_BOOL( \
|
||||||
|
"gMPTAHelperEnable", \
|
||||||
|
0, \
|
||||||
|
"Enable/Disable MPTA Helper")
|
||||||
|
|
||||||
|
#define COEX_MPTA_HELPER_CFG CFG(CFG_COEX_MPTA_HELPER)
|
||||||
|
#else
|
||||||
|
#define COEX_MPTA_HELPER_CFG
|
||||||
|
#endif
|
||||||
|
|
||||||
#define CFG_COEX_ALL \
|
#define CFG_COEX_ALL \
|
||||||
CFG(CFG_BTC_MODE) \
|
CFG(CFG_BTC_MODE) \
|
||||||
CFG(CFG_ANTENNA_ISOLATION) \
|
CFG(CFG_ANTENNA_ISOLATION) \
|
||||||
@@ -247,5 +271,6 @@
|
|||||||
CFG(CFG_BT_INTERFERENCE_MEDIUM_LL) \
|
CFG(CFG_BT_INTERFERENCE_MEDIUM_LL) \
|
||||||
CFG(CFG_BT_INTERFERENCE_MEDIUM_UL) \
|
CFG(CFG_BT_INTERFERENCE_MEDIUM_UL) \
|
||||||
CFG(CFG_BT_INTERFERENCE_HIGH_LL) \
|
CFG(CFG_BT_INTERFERENCE_HIGH_LL) \
|
||||||
CFG(CFG_BT_INTERFERENCE_HIGH_UL)
|
CFG(CFG_BT_INTERFERENCE_HIGH_UL) \
|
||||||
|
COEX_MPTA_HELPER_CFG
|
||||||
#endif
|
#endif
|
||||||
|
@@ -98,6 +98,7 @@
|
|||||||
#include "wlan_hdd_driver_ops.h"
|
#include "wlan_hdd_driver_ops.h"
|
||||||
#include "epping_main.h"
|
#include "epping_main.h"
|
||||||
#include "wlan_hdd_data_stall_detection.h"
|
#include "wlan_hdd_data_stall_detection.h"
|
||||||
|
#include "wlan_hdd_mpta_helper.h"
|
||||||
|
|
||||||
#include <wlan_hdd_ipa.h>
|
#include <wlan_hdd_ipa.h>
|
||||||
#include "hif.h"
|
#include "hif.h"
|
||||||
@@ -4715,6 +4716,10 @@ static int hdd_send_coex_config_params(struct hdd_context *hdd_ctx,
|
|||||||
hdd_err("Failed to send coex BT interference level");
|
hdd_err("Failed to send coex BT interference level");
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (wlan_hdd_mpta_helper_enable(&coex_cfg_params, &config))
|
||||||
|
goto err;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
err:
|
err:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
Reference in New Issue
Block a user