qcacmn: Disable 11be functionality when not supported by fw

Disable 11be functionality when not supported by fw

Change-Id: Ifb90893e15c9bc74aac3aab75220a0d5c866dd59
CRs-Fixed: 3291962
Цей коміт міститься в:
Aditya Kodukula
2022-09-14 00:46:27 -07:00
зафіксовано Madan Koyyalamudi
джерело bf2b82dec7
коміт 7e71dbe627
8 змінених файлів з 217 додано та 20 видалено

Переглянути файл

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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
@@ -88,4 +89,23 @@ QDF_STATUS mlme_psoc_open(struct wlan_objmgr_psoc *psoc);
*/
QDF_STATUS mlme_psoc_close(struct wlan_objmgr_psoc *psoc);
/**
* wlan_psoc_mlme_get_11be_capab() - Get the 11be capability for target
* @psoc: psoc handle
* @val: pointer to the output variable
*
* return: QDF_STATUS
*/
QDF_STATUS
wlan_psoc_mlme_get_11be_capab(struct wlan_objmgr_psoc *psoc, bool *val);
/**
* wlan_psoc_mlme_set_11be_capab() - Set the 11be capability for target
* @psoc: psoc handle
* @val: pointer to the output variable
*
* return: QDF_STATUS
*/
QDF_STATUS
wlan_psoc_mlme_set_11be_capab(struct wlan_objmgr_psoc *psoc, bool val);
#endif

Переглянути файл

@@ -0,0 +1,49 @@
/*
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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: wlan_psoc_mlme_ucfg_api.h
* This file provides PSOC mlme ucfg apis.
*/
#ifndef _WLAN_PSOC_MLME_UCFG_API_H_
#define _WLAN_PSOC_MLME_UCFG_API_H_
#include <wlan_objmgr_psoc_obj.h>
/**
* ucfg_psoc_mlme_get_11be_capab() - Get the 11be capability for target
* @psoc: psoc handle
* @val: pointer to the output variable
*
* return: QDF_STATUS
*/
QDF_STATUS
ucfg_psoc_mlme_get_11be_capab(struct wlan_objmgr_psoc *psoc, bool *val);
/**
* ucfg_psoc_mlme_set_11be_capab() - Set the 11be capability for target
* @psoc: psoc handle
* @val: pointer to the output variable
*
* return: QDF_STATUS
*/
QDF_STATUS
ucfg_psoc_mlme_set_11be_capab(struct wlan_objmgr_psoc *psoc, bool val);
#endif /* _WLAN_PSOC_MLME_UCFG_API_H_ */

Переглянути файл

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. 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
@@ -28,6 +28,36 @@
#include "wlan_vdev_mgr_tgt_if_rx_api.h"
#include <qdf_platform.h>
QDF_STATUS
wlan_psoc_mlme_get_11be_capab(struct wlan_objmgr_psoc *psoc, bool *val)
{
struct psoc_mlme_obj *psoc_mlme;
psoc_mlme = wlan_psoc_mlme_get_cmpt_obj(psoc);
if (!psoc_mlme) {
mlme_err("psoc_mlme is NULL");
return QDF_STATUS_E_FAILURE;
}
*val = psoc_mlme->psoc_cfg.phy_config.eht_cap;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
wlan_psoc_mlme_set_11be_capab(struct wlan_objmgr_psoc *psoc, bool val)
{
struct psoc_mlme_obj *psoc_mlme;
psoc_mlme = wlan_psoc_mlme_get_cmpt_obj(psoc);
if (!psoc_mlme) {
mlme_err("psoc_mlme is NULL");
return QDF_STATUS_E_FAILURE;
}
psoc_mlme->psoc_cfg.phy_config.eht_cap &= val;
return QDF_STATUS_SUCCESS;
}
struct psoc_mlme_obj *wlan_psoc_mlme_get_cmpt_obj(struct wlan_objmgr_psoc *psoc)
{
struct psoc_mlme_obj *psoc_mlme;
@@ -94,6 +124,8 @@ static void mlme_init_cfg(struct wlan_objmgr_psoc *psoc)
wlan_cm_init_score_config(psoc, &mlme_psoc_obj->psoc_cfg.score_config);
mlme_psoc_obj->psoc_cfg.phy_config.max_chan_switch_ie =
cfg_get(psoc, CFG_MLME_MAX_CHAN_SWITCH_IE_ENABLE);
mlme_psoc_obj->psoc_cfg.phy_config.eht_cap =
cfg_default(CFG_MLME_11BE_TARGET_CAPAB);
}
QDF_STATUS mlme_psoc_open(struct wlan_objmgr_psoc *psoc)

Переглянути файл

@@ -0,0 +1,34 @@
/*
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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: wlan_psoc_mlme_ucfg_api.c
* This file contains psoc mlme ucfg APIs
*/
#include <wlan_psoc_mlme_ucfg_api.h>
#include <wlan_psoc_mlme_api.h>
QDF_STATUS
ucfg_psoc_mlme_get_11be_capab(struct wlan_objmgr_psoc *psoc, bool *val)
{
return wlan_psoc_mlme_get_11be_capab(psoc, val);
}
QDF_STATUS
ucfg_psoc_mlme_set_11be_capab(struct wlan_objmgr_psoc *psoc, bool val)
{
return wlan_psoc_mlme_set_11be_capab(psoc, val);
}