From 4613db5edfa45780dadaf266e4f62355719455fb Mon Sep 17 00:00:00 2001 From: Arif Hussain Date: Mon, 10 Sep 2018 18:32:25 -0700 Subject: [PATCH] qcacld-3.0: Refactor CFG_JOIN_FAILURE_TIMEOUT cfg Refactor CFG_JOIN_FAILURE_TIMEOUT cfg item. Change-Id: If1b00e47500a354e80ed7dfbf547a4ac2be73a50 CRs-Fixed: 2313427 --- mlme/core/src/wlan_mlme_main.c | 8 +++ mlme/dispatcher/inc/cfg_mlme.h | 2 + mlme/dispatcher/inc/cfg_mlme_timeout.h | 50 +++++++++++++++++++ mlme/dispatcher/inc/wlan_mlme_public_struct.h | 18 ++++++- 4 files changed, 76 insertions(+), 2 deletions(-) create mode 100644 mlme/dispatcher/inc/cfg_mlme_timeout.h diff --git a/mlme/core/src/wlan_mlme_main.c b/mlme/core/src/wlan_mlme_main.c index 337a7502db..974496440d 100644 --- a/mlme/core/src/wlan_mlme_main.c +++ b/mlme/core/src/wlan_mlme_main.c @@ -318,6 +318,13 @@ static void mlme_init_edca_params(struct wlan_mlme_edca_params *edca_params) mlme_init_edca_etsi_cfg(edca_params); } +static void mlme_init_timeout_cfg(struct wlan_objmgr_psoc *psoc, + struct wlan_mlme_timeout *timeouts) +{ + timeouts->join_failure_timeout = cfg_get(psoc, + CFG_JOIN_FAILURE_TIMEOUT); +} + static void mlme_init_ht_cap_in_cfg(struct wlan_objmgr_psoc *psoc, struct wlan_mlme_ht_caps *ht_caps) { @@ -985,6 +992,7 @@ QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc) mlme_cfg = &mlme_obj->cfg; mlme_init_generic_cfg(psoc, &mlme_cfg->gen); mlme_init_edca_params(&mlme_cfg->edca_params); + mlme_init_timeout_cfg(psoc, &mlme_cfg->timeouts); mlme_init_ht_cap_in_cfg(psoc, &mlme_cfg->ht_caps); mlme_init_mbo_cfg(psoc, &mlme_cfg->mbo_cfg); mlme_init_qos_cfg(psoc, &mlme_cfg->qos_mlme_params); diff --git a/mlme/dispatcher/inc/cfg_mlme.h b/mlme/dispatcher/inc/cfg_mlme.h index 29f7aa591e..176072f4b4 100644 --- a/mlme/dispatcher/inc/cfg_mlme.h +++ b/mlme/dispatcher/inc/cfg_mlme.h @@ -34,6 +34,7 @@ #include "cfg_mlme_mbo.h" #include "cfg_mlme_vht_caps.h" #include "cfg_qos.h" +#include "cfg_mlme_timeout.h" #include "cfg_mlme_rates.h" #include "wlan_mlme_product_details_cfg.h" #include "cfg_mlme_sta.h" @@ -66,6 +67,7 @@ CFG_SCORING_ALL \ CFG_STA_ALL \ CFG_THRESHOLD_ALL \ + CFG_TIMEOUT_ALL \ CFG_VHT_CAPS_ALL \ CFG_VHT_CAPS_ALL \ CFG_WEP_PARAMS_ALL diff --git a/mlme/dispatcher/inc/cfg_mlme_timeout.h b/mlme/dispatcher/inc/cfg_mlme_timeout.h new file mode 100644 index 0000000000..2c2fb1dd27 --- /dev/null +++ b/mlme/dispatcher/inc/cfg_mlme_timeout.h @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2011-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_MLME_TIMEOUT_H +#define __CFG_MLME_TIMEOUT_H + +/* + * + * join_failure_timeout - Join failure timeout value + * @Min: 0 + * @Max: 65535 + * @Default: 3000 + * + * This cfg is used to configure the join failure timeout. + * + * Usage: Internal + * + * + */ +#define CFG_JOIN_FAILURE_TIMEOUT CFG_INI_UINT( \ + "join_failure_timeout", \ + 0, \ + 65535, \ + 3000, \ + CFG_VALUE_OR_DEFAULT, \ + "Join failure timeout") + +#define CFG_TIMEOUT_ALL \ + CFG(CFG_JOIN_FAILURE_TIMEOUT) + +#endif /* __CFG_MLME_TIMEOUT_H */ diff --git a/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/mlme/dispatcher/inc/wlan_mlme_public_struct.h index a21cca095e..21eeee5580 100644 --- a/mlme/dispatcher/inc/wlan_mlme_public_struct.h +++ b/mlme/dispatcher/inc/wlan_mlme_public_struct.h @@ -839,6 +839,14 @@ struct wlan_mlme_threshold { uint32_t frag_threshold; }; +/* + * struct wlan_mlme_timeout - mlme timeout related config items + * @join_failure_timeout: join failure timeout + */ +struct wlan_mlme_timeout { + uint32_t join_failure_timeout; +}; + /** * struct wlan_mlme_oce - OCE related config items * @enable_bcast_probe_rsp: enable broadcast probe response @@ -899,20 +907,25 @@ struct wlan_mlme_wep_cfg { /** * struct wlan_mlme_cfg - MLME config items * @chainmask_cfg: VHT chainmask related cfg items - * @ht_cfg: HT related CFG Items + * @edca_params: edca related CFG items + * @gen: Generic CFG items + * @ht_caps: HT related CFG Items * @he_caps: HE related cfg items * @lfr: LFR related CFG Items * @obss_ht40:obss ht40 CFG Items * @mbo_cfg: Multiband Operation related CFG items * @vht_caps: VHT related CFG Items + * @qos_mlme_params: QOS CFG Items * @rates: Rates related cfg items * @product_details: product details related CFG Items * @sap_protection_cfg: SAP erp protection related CFG items - * @acs: ACS related CFG items * @sap_cfg: sap CFG items * @sta: sta CFG Items * @scoring: BSS Scoring related CFG Items + * @oce: OCE related CFG items * @threshold: threshold related cfg items + * @timeouts: mlme timeout related CFG items + * @acs: ACS related CFG items * @feature_flags: Feature flag config items * @wep_params: WEP related config items */ @@ -935,6 +948,7 @@ struct wlan_mlme_cfg { struct wlan_mlme_scoring_cfg scoring; struct wlan_mlme_oce oce; struct wlan_mlme_threshold threshold; + struct wlan_mlme_timeout timeouts; struct wlan_mlme_acs acs; struct wlan_mlme_feature_flag feature_flags; struct wlan_mlme_wep_cfg wep_params;