qcacld-3.0: Add support to send wfa test config to FW
User sends wfa test configs to host using vendor command QCA_NL80211_VENDOR_SUBCMD_WIFI_TEST_CONFIGURATION. Host parses the vendor command and sends wfa test configs to FW using WMI command i.e. WMI_WFA_CONFIG_CMDID Change-Id: I5aa0bc8b0a0064828b48368e47d53a5ad5e7ff2f CRs-Fixed: 2772013
This commit is contained in:

committad av
snandini

förälder
7497c7ca6d
incheckning
af02d10731
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (c) 2020 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: Declare structs and macros which can be accessed by various
|
||||
* components and modules.
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_WFA_CONFIG_PUBLIC_STRUCT_H_
|
||||
#define _WLAN_WFA_CONFIG_PUBLIC_STRUCT_H_
|
||||
|
||||
#include <wlan_cmn.h>
|
||||
#include <qdf_status.h>
|
||||
#include <qdf_types.h>
|
||||
|
||||
/**
|
||||
* wlan_wfa_cmd_tx_ops - structure of tx function pointers for wfa test cmds
|
||||
* @send_wfa_test_cmd: TX ops function pointer to send WFA test command
|
||||
*/
|
||||
struct wlan_wfa_cmd_tx_ops {
|
||||
QDF_STATUS (*send_wfa_test_cmd)(struct wlan_objmgr_vdev *vdev,
|
||||
struct set_wfatest_params *wfa_test);
|
||||
};
|
||||
|
||||
/**
|
||||
* struct wlan_mlme_wfa_cmd - WFA test command tx ops
|
||||
* @tx_ops: WFA test command Tx ops to send commands to firmware
|
||||
*/
|
||||
struct wlan_mlme_wfa_cmd {
|
||||
struct wlan_wfa_cmd_tx_ops tx_ops;
|
||||
};
|
||||
|
||||
#endif /* _WLAN_WFA_CONFIG_PUBLIC_STRUCT_H_ */
|
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 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: wlan_wfa_tgt_if_tx_api.h
|
||||
*
|
||||
* This file contains connection manager tx ops related functions
|
||||
*/
|
||||
|
||||
#ifndef WFA_TGT_IF_TX_API_H__
|
||||
#define WFA_TGT_IF_TX_API_H__
|
||||
|
||||
#include "wlan_wfa_config_public_struct.h"
|
||||
|
||||
/**
|
||||
* wlan_send_wfatest_cmd() - Send WFA test command to firmware
|
||||
* @vdev: VDEV pointer
|
||||
* @wmi_wfatest: wfa test commad pointer
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
wlan_send_wfatest_cmd(struct wlan_objmgr_vdev *vdev,
|
||||
struct set_wfatest_params *wmi_wfatest);
|
||||
|
||||
#endif /* WFA_TGT_IF_TX_API_H__ */
|
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 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: wlan_wfa_ucfg_api.h
|
||||
*
|
||||
* Implementation for the Common WFA test config interfaces.
|
||||
*/
|
||||
|
||||
#ifndef WLAN_WFA_CONFIG_API_H__
|
||||
#define WLAN_WFA_CONFIG_API_H__
|
||||
|
||||
#include "wlan_mlme_dbg.h"
|
||||
#include "wlan_mlme_api.h"
|
||||
#include "wlan_wfa_tgt_if_tx_api.h"
|
||||
|
||||
/**
|
||||
* ucfg_send_wfatest_cmd() - Send WFA test command to firmware
|
||||
* @vdev: Pointer to vdev
|
||||
* @wmi_wfatest: Pointer to WFA test config params
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
static inline
|
||||
QDF_STATUS ucfg_send_wfatest_cmd(struct wlan_objmgr_vdev *vdev,
|
||||
struct set_wfatest_params *wmi_wfatest)
|
||||
{
|
||||
return wlan_send_wfatest_cmd(vdev, wmi_wfatest);
|
||||
}
|
||||
#endif /* WLAN_WFA_CONFIG_API_H__ */
|
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 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: wlan_wfa_tgt_if_tx_api.c
|
||||
*
|
||||
* Implementation for the Common WFA config interfaces.
|
||||
*/
|
||||
|
||||
#include "wlan_objmgr_psoc_obj.h"
|
||||
#include "wlan_psoc_mlme_api.h"
|
||||
#include "wlan_mlme_ucfg_api.h"
|
||||
#include "wlan_wfa_tgt_if_tx_api.h"
|
||||
#include "wlan_mlme_public_struct.h"
|
||||
#include "wma.h"
|
||||
|
||||
static inline struct wlan_wfa_cmd_tx_ops *
|
||||
wlan_wfatest_get_tx_ops_from_vdev(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
mlme_psoc_ext_t *mlme_priv;
|
||||
struct wlan_wfa_cmd_tx_ops *tx_ops;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
|
||||
psoc = wlan_vdev_get_psoc(vdev);
|
||||
if (!psoc) {
|
||||
mlme_legacy_err("psoc object is NULL");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
mlme_priv = wlan_psoc_mlme_get_ext_hdl(psoc);
|
||||
if (!mlme_priv) {
|
||||
mlme_legacy_err("vdev legacy private object is NULL");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
tx_ops = &mlme_priv->wfa_testcmd.tx_ops;
|
||||
|
||||
return tx_ops;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
wlan_send_wfatest_cmd(struct wlan_objmgr_vdev *vdev,
|
||||
struct set_wfatest_params *wmi_wfatest)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
struct wlan_wfa_cmd_tx_ops *tx_ops;
|
||||
|
||||
if (!vdev || !wmi_wfatest) {
|
||||
mlme_legacy_err("vdev or test params is NULL");
|
||||
return status;
|
||||
}
|
||||
|
||||
tx_ops = wlan_wfatest_get_tx_ops_from_vdev(vdev);
|
||||
if (!tx_ops || !tx_ops->send_wfa_test_cmd) {
|
||||
mlme_legacy_err("Failed to send WFA test cmd");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
return tx_ops->send_wfa_test_cmd(vdev, wmi_wfatest);
|
||||
}
|
Referens i nytt ärende
Block a user