diff --git a/mlme/core/src/wlan_mlme_main.c b/mlme/core/src/wlan_mlme_main.c index 2c3247f459..bbd31ba0b3 100644 --- a/mlme/core/src/wlan_mlme_main.c +++ b/mlme/core/src/wlan_mlme_main.c @@ -164,6 +164,19 @@ static void mlme_init_qos_cfg(struct wlan_objmgr_psoc *psoc, cfg_get(psoc, CFG_SAP_MAX_INACTIVITY_OVERRIDE); } +static void mlme_init_mbo_cfg(struct wlan_objmgr_psoc *psoc, + struct wlan_mlme_mbo *mbo_params) +{ + mbo_params->mbo_candidate_rssi_thres = + cfg_get(psoc, CFG_MBO_CANDIDATE_RSSI_THRESHOLD); + mbo_params->mbo_current_rssi_thres = + cfg_get(psoc, CFG_MBO_CURRENT_RSSI_THRESHOLD); + mbo_params->mbo_current_rssi_mcc_thres = + cfg_get(psoc, CFG_MBO_CUR_RSSI_MCC_THRESHOLD); + mbo_params->mbo_candidate_rssi_btc_thres = + cfg_get(psoc, CFG_MBO_CAND_RSSI_BTC_THRESHOLD); +} + static void mlme_update_rates_in_cfg(struct wlan_objmgr_psoc *psoc, struct wlan_mlme_rates *rates) { @@ -293,6 +306,7 @@ QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc) mlme_cfg = &mlme_obj->cfg; mlme_update_ht_cap_in_cfg(psoc, &mlme_cfg->ht_caps.ht_cap_info); + mlme_init_mbo_cfg(psoc, &mlme_cfg->mbo_cfg); mlme_init_qos_cfg(psoc, &mlme_cfg->qos_mlme_params); mlme_update_rates_in_cfg(psoc, &mlme_cfg->rates); mlme_update_sap_protection_cfg(psoc, &mlme_cfg->sap_protection_cfg); diff --git a/mlme/dispatcher/inc/cfg_mlme.h b/mlme/dispatcher/inc/cfg_mlme.h index 954824c6ff..0ebd1c97b5 100644 --- a/mlme/dispatcher/inc/cfg_mlme.h +++ b/mlme/dispatcher/inc/cfg_mlme.h @@ -26,6 +26,7 @@ #include "cfg_mlme_chainmask.h" #include "cfg_mlme_ht_caps.h" #include "cfg_mlme_obss_ht40.h" +#include "cfg_mlme_mbo.h" #include "cfg_mlme_vht_caps.h" #include "cfg_qos.h" #include "cfg_mlme_rates.h" @@ -37,6 +38,7 @@ CFG_CHAINMASK_ALL \ CFG_HT_CAPS_ALL \ CFG_OBSS_HT40_ALL \ + CFG_MBO_ALL \ CFG_VHT_CAPS_ALL \ CFG_QOS_ALL \ CFG_RATES_ALL \ diff --git a/mlme/dispatcher/inc/cfg_mlme_mbo.h b/mlme/dispatcher/inc/cfg_mlme_mbo.h new file mode 100644 index 0000000000..02dce2278e --- /dev/null +++ b/mlme/dispatcher/inc/cfg_mlme_mbo.h @@ -0,0 +1,139 @@ +/* + * 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 QOS related + * converged configurations. + */ + +#ifndef __CFG_MLME_MBO_H +#define __CFG_MLME_MBO_H + +/* + * + * g_mbo_candidate_rssi_thres - Candidate AP's minimum RSSI to accept + * @Min: -120 + * @Max: 0 + * @Default: -72 + * + * This ini specifies the minimum RSSI value a candidate should have to accept + * it as a target for transition. + * + * Related: N/A + * + * Supported Feature: MBO + * + * Usage: Internal + * + * + */ +#define CFG_MBO_CANDIDATE_RSSI_THRESHOLD CFG_INI_INT( \ + "g_mbo_candidate_rssi_thres", \ + -120, \ + 0, \ + -72, \ + CFG_VALUE_OR_DEFAULT, \ + "candidate AP rssi threshold") +/* + * + * g_mbo_current_rssi_thres - Connected AP's RSSI threshold to consider a + * transition + * @Min: -120 + * @Max: 0 + * @Default: -65 + * + * This ini is used to configure connected AP's RSSI threshold value to consider + * a transition. + * + * Related: N/A + * + * Supported Feature: MBO + * + * Usage: Internal + * + * + */ +#define CFG_MBO_CURRENT_RSSI_THRESHOLD CFG_INI_INT( \ + "g_mbo_current_rssi_thres", \ + -120, \ + 0, \ + -65, \ + CFG_VALUE_OR_DEFAULT, \ + "current AP rssi threshold") + +/* + * + * g_mbo_current_rssi_mcc_thres - connected AP's RSSI threshold value to prefer + * against a MCC + * @Min: -120 + * @Max: 0 + * @Default: -75 + * + * This ini is used to configure connected AP's minimum RSSI threshold that is + * preferred against a MCC case, if the candidate can cause MCC. + * + * Related: N/A + * + * Supported Feature: MBO + * + * Usage: Internal + * + * + */ +#define CFG_MBO_CUR_RSSI_MCC_THRESHOLD CFG_INI_INT( \ + "g_mbo_current_rssi_mcc_thres", \ + -120, \ + 0, \ + -75, \ + CFG_VALUE_OR_DEFAULT, \ + "current AP mcc rssi threshold") + +/* + * + * g_mbo_candidate_rssi_btc_thres - Candidate AP's minimum RSSI threshold to + * prefer it even in case of BT coex + * @Min: -120 + * @Max: 0 + * @Default: -70 + * + * This ini is used to configure candidate AP's minimum RSSI threshold to prefer + * it for transition even in case of BT coex. + * + * Related: N/A + * + * Supported Feature: MBO + * + * Usage: Internal + * + * + */ +#define CFG_MBO_CAND_RSSI_BTC_THRESHOLD CFG_INI_INT( \ + "g_mbo_candidate_rssi_btc_thres", \ + -120, \ + 0, \ + -70, \ + CFG_VALUE_OR_DEFAULT, \ + "candidate AP rssi threshold") + +#define CFG_MBO_ALL \ + CFG(CFG_MBO_CANDIDATE_RSSI_THRESHOLD) \ + CFG(CFG_MBO_CURRENT_RSSI_THRESHOLD) \ + CFG(CFG_MBO_CUR_RSSI_MCC_THRESHOLD) \ + CFG(CFG_MBO_CAND_RSSI_BTC_THRESHOLD) + +#endif /* __CFG_MLME_MBO_H */ diff --git a/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/mlme/dispatcher/inc/wlan_mlme_public_struct.h index 7c393e760a..0274046b89 100644 --- a/mlme/dispatcher/inc/wlan_mlme_public_struct.h +++ b/mlme/dispatcher/inc/wlan_mlme_public_struct.h @@ -119,6 +119,20 @@ struct wlan_mlme_cfg_sap { uint8_t reduced_beacon_interval; }; +/** + * struct wlan_mlme_mbo - Multiband Operation related ini configs + * @mbo_candidate_rssi_thres: + * @mbo_current_rssi_thres: + * @mbo_current_rssi_mcc_thres: + * @mbo_candidate_rssi_btc_thres: + */ +struct wlan_mlme_mbo { + int8_t mbo_candidate_rssi_thres; + int8_t mbo_current_rssi_thres; + int8_t mbo_current_rssi_mcc_thres; + int8_t mbo_candidate_rssi_btc_thres; +}; + struct wlan_mlme_vht_caps { /* VHT related configs */ }; @@ -291,6 +305,7 @@ struct wlan_mlme_sta_cfg { struct wlan_mlme_cfg { struct wlan_mlme_ht_caps ht_caps; struct wlan_mlme_obss_ht40 obss_ht40; + struct wlan_mlme_mbo mbo_cfg; struct wlan_mlme_vht_caps vht_caps; struct wlan_mlme_qos qos_mlme_params; struct wlan_mlme_rates rates;