Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f788cba5 authored by Paul Zhang's avatar Paul Zhang
Browse files

qcacld-3.0: Add ini wlm_latency_reset_on_disconnect

Currently, the WLM mode could be recovered after disconnection
or interface down/up about random MAC feature. Since some OEMs
have different mechanisms to config WLM mode on their framework
implementation and don't expect recovering the WLM mode.
So add logic to set default WLM mode when disconnection happens.
And add ini wlm_latency_reset_on_disconnect to differentiate
the implementation in driver. By default
wlm_latency_reset_on_disconnect is false.

Change-Id: Idcb3baf6ab8f0533eb01c28ff1c12513f9995946
CRs-Fixed: 3006875
parent 9e6a043d
Loading
Loading
Loading
Loading
+21 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2018-2021 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
@@ -549,6 +549,26 @@ void
mlme_set_operations_bitmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
			   enum roam_control_requestor reqs, bool clear);

/**
 * mlme_get_cfg_wlm_level() - Get the WLM level value
 * @psoc: pointer to psoc object
 * @level: level that needs to be filled.
 *
 * Return: QDF Status
 */
QDF_STATUS mlme_get_cfg_wlm_level(struct wlan_objmgr_psoc *psoc,
				  uint8_t *level);

/**
 * mlme_get_cfg_wlm_reset() - Get the WLM reset flag
 * @psoc: pointer to psoc object
 * @reset: reset that needs to be filled.
 *
 * Return: QDF Status
 */
QDF_STATUS mlme_get_cfg_wlm_reset(struct wlan_objmgr_psoc *psoc,
				  bool *reset);

#define MLME_IS_ROAM_STATE_RSO_STARTED(psoc, vdev_id) \
	(mlme_get_roam_state(psoc, vdev_id) == ROAM_RSO_STARTED)

+30 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2018-2021 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
@@ -2237,6 +2237,7 @@ static void mlme_init_fe_wlm_in_cfg(struct wlan_objmgr_psoc *psoc,
				    struct wlan_mlme_fe_wlm *wlm_config)
{
	wlm_config->latency_enable = cfg_get(psoc, CFG_LATENCY_ENABLE);
	wlm_config->latency_reset = cfg_get(psoc, CFG_LATENCY_RESET);
	wlm_config->latency_level = cfg_get(psoc, CFG_LATENCY_LEVEL);
	wlm_config->latency_flags[0] = cfg_get(psoc, CFG_LATENCY_FLAGS_NORMAL);
	wlm_config->latency_flags[1] = cfg_get(psoc, CFG_LATENCY_FLAGS_MOD);
@@ -2956,6 +2957,34 @@ mlme_set_operations_bitmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
	wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_OBJMGR_ID);
}

QDF_STATUS mlme_get_cfg_wlm_level(struct wlan_objmgr_psoc *psoc,
				  uint8_t *level)
{
	struct wlan_mlme_psoc_ext_obj *mlme_obj;

	mlme_obj = mlme_get_psoc_ext_obj(psoc);
	if (!mlme_obj)
		return QDF_STATUS_E_FAILURE;

	*level = mlme_obj->cfg.wlm_config.latency_level;

	return QDF_STATUS_SUCCESS;
}

QDF_STATUS mlme_get_cfg_wlm_reset(struct wlan_objmgr_psoc *psoc,
				  bool *reset)
{
	struct wlan_mlme_psoc_ext_obj *mlme_obj;

	mlme_obj = mlme_get_psoc_ext_obj(psoc);
	if (!mlme_obj)
		return QDF_STATUS_E_FAILURE;

	*reset = mlme_obj->cfg.wlm_config.latency_reset;

	return QDF_STATUS_SUCCESS;
}

enum roam_offload_state
mlme_get_roam_state(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)
{
+20 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2021 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
@@ -29,7 +29,7 @@
 *
 * @min: 0
 * @max: 1
 * @default: 0
 * @default: 1
 *
 * 0 - disable
 * 1 - enable
@@ -40,6 +40,23 @@
					1, \
					"WLM latency Enable")

/*
 * <ini>
 * wlm_latency_reset_on_disconnect - WLM latency level reset on disconnect
 *
 * @min: 0
 * @max: 1
 * @default: 0
 *
 * 0 - disable
 * 1 - enable
 *
 * </ini>
 */
#define CFG_LATENCY_RESET CFG_INI_BOOL("wlm_latency_reset_on_disconnect", \
				       0, \
				       "WLM latency reset on disconnect")

/*
 * <ini>
 * wlm_latency_level - WLM latency level
@@ -237,6 +254,7 @@

#define CFG_FE_WLM_ALL \
	CFG(CFG_LATENCY_ENABLE) \
	CFG(CFG_LATENCY_RESET) \
	CFG(CFG_LATENCY_LEVEL) \
	CFG(CFG_LATENCY_FLAGS_NORMAL) \
	CFG(CFG_LATENCY_FLAGS_MOD) \
+2 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2018-2021 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
@@ -2186,6 +2186,7 @@ struct wlan_mlme_btm {
 */
struct wlan_mlme_fe_wlm {
	bool latency_enable;
	bool latency_reset;
	uint8_t latency_level;
	uint32_t latency_flags[MLME_NUM_WLM_LATENCY_LEVEL];
};
+29 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2018-2021 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
@@ -3221,6 +3221,34 @@ ucfg_mlme_get_wmm_mode(struct wlan_objmgr_psoc *psoc, uint8_t *value)
	return wlan_mlme_get_wmm_mode(psoc, value);
}

/**
 * ucfg_mlme_cfg_get_wlm_level() - Get the WLM level value
 * @psoc: pointer to psoc object
 * @level: level that needs to be filled.
 *
 * Return: QDF Status
 */
static inline
QDF_STATUS ucfg_mlme_cfg_get_wlm_level(struct wlan_objmgr_psoc *psoc,
				       uint8_t *level)
{
	return mlme_get_cfg_wlm_level(psoc, level);
}

/**
 * ucfg_mlme_cfg_get_wlm_reset() - Get the WLM reset flag
 * @psoc: pointer to psoc object
 * @reset: reset that needs to be filled.
 *
 * Return: QDF Status
 */
static inline
QDF_STATUS ucfg_mlme_cfg_get_wlm_reset(struct wlan_objmgr_psoc *psoc,
				       bool *reset)
{
	return mlme_get_cfg_wlm_reset(psoc, reset);
}

#ifdef WLAN_FEATURE_11AX
/**
 * ucfg_mlme_update_tgt_he_cap() - Update tgt he cap in mlme component
Loading