qcacld-3.0: Add support for concurrent STA using ini param

Enable support for concurrent STA interface to be open during startup
using the ini param gEnableConcurrentSTA

Change-Id: Iede1f8673fb682753e31ed8f376453692938e4ba
This commit is contained in:
Sourav Mohapatra 2017-11-19 16:15:55 +05:30 • committed by snandini
commit 57006c767a
3 changed files with 49 additions and 0 deletions

View file

@ -69,6 +69,8 @@ struct hdd_context;
#define MAX_PRB_REQ_VENDOR_OUI_INI_LEN 160
#define VENDOR_SPECIFIC_IE_BITMAP 0x20000000
#define CFG_CONCURRENT_IFACE_MAX_LEN 16
/* Defines for all of the things we read from the configuration (registry). */
/*
* <ini>
@ -5570,6 +5572,24 @@ enum hdd_link_speed_rpt_type {
#define CFG_ENABLE_FW_MODULE_LOG_LEVEL "gFwDebugModuleLoglevel"
#define CFG_ENABLE_FW_MODULE_LOG_DEFAULT "2,1,3,1,5,1,9,1,13,1,14,1,18,1,19,1,26,1,28,1,29,1,31,1,36,1,38,1,46,1,47,1,50,1,52,1,53,1,56,1,60,1,61,1,4,1"
/*
* <ini>
* gEnableConcurrentSTA - This will control the creation of concurrent STA
* interface
* @Default: NULL
*
* This ini is used for providing control to create a concurrent STA session
* along with the creation of wlan0 and p2p0. The name of the interface is
* specified as the parameter
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_ENABLE_CONCURRENT_STA "gEnableConcurrentSTA"
#define CFG_ENABLE_CONCURRENT_STA_DEFAULT ""
/*
* <ini>
* gEnableRTSProfiles - It will use configuring different RTS profiles
@ -13710,6 +13730,8 @@ struct hdd_config {
uint32_t DelayedTriggerFrmInt;
char enableConcurrentSTA[CFG_CONCURRENT_IFACE_MAX_LEN];
/* Wowl pattern */
char wowlPattern[1024];

View file

@ -3272,6 +3272,11 @@ struct reg_table_entry g_registry_table[] = {
VAR_FLAGS_OPTIONAL,
(void *)CFG_ENABLE_FW_MODULE_LOG_DEFAULT),
REG_VARIABLE_STRING(CFG_ENABLE_CONCURRENT_STA, WLAN_PARAM_String,
struct hdd_config, enableConcurrentSTA,
VAR_FLAGS_NONE,
(void *)CFG_ENABLE_CONCURRENT_STA_DEFAULT),
#ifdef WLAN_FEATURE_11W
REG_VARIABLE(CFG_PMF_SA_QUERY_MAX_RETRIES_NAME, WLAN_PARAM_Integer,
struct hdd_config, pmfSaQueryMaxRetries,

View file

@ -8103,6 +8103,22 @@ int hdd_start_ftm_adapter(struct hdd_adapter *adapter)
EXIT();
}
static int hdd_open_concurrent_interface(struct hdd_context *hdd_ctx,
bool rtnl_held)
{
struct hdd_adapter *adapter;
adapter = hdd_open_adapter(hdd_ctx, QDF_STA_MODE,
hdd_ctx->config->enableConcurrentSTA,
wlan_hdd_get_intf_addr(hdd_ctx),
NET_NAME_UNKNOWN, rtnl_held);
if (!adapter)
return -ENOSPC;
return 0;
}
/**
* hdd_open_interfaces - Open all required interfaces
* hdd_ctx: HDD context
@ -8143,6 +8159,12 @@ static int hdd_open_interfaces(struct hdd_context *hdd_ctx, bool rtnl_held)
/* fast roaming is allowed only on first STA, i.e. wlan adapter */
adapter->fast_roaming_allowed = true;
if (strlen(hdd_ctx->config->enableConcurrentSTA) != 0) {
ret = hdd_open_concurrent_interface(hdd_ctx, rtnl_held);
if (ret)
hdd_err("Cannot create concurrent STA interface");
}
ret = hdd_open_p2p_interface(hdd_ctx, rtnl_held);
if (ret)
goto err_close_adapters;