qcacmn: Add API to get spectral version
Since struct spectral_samp_msg may be modified, so provide API to get version information, then spectraltool can compatible with different host based on version information. Change-Id: If68dbd0d85b28f46056208d849fe2db4faea493a CRs-Fixed: 2575818
This commit is contained in:
@@ -53,6 +53,12 @@
|
|||||||
#define SPECTRAL_GET_DEBUG_LEVEL (DFS_LAST_IOCTL + 23)
|
#define SPECTRAL_GET_DEBUG_LEVEL (DFS_LAST_IOCTL + 23)
|
||||||
#define SPECTRAL_SET_DMA_DEBUG (DFS_LAST_IOCTL + 24)
|
#define SPECTRAL_SET_DMA_DEBUG (DFS_LAST_IOCTL + 24)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Increase spectral sub version if struct spectral_samp_msg updated.
|
||||||
|
*/
|
||||||
|
#define SPECTRAL_VERSION (3)
|
||||||
|
#define SPECTRAL_SUB_VERSION (1)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ioctl parameter types
|
* ioctl parameter types
|
||||||
*/
|
*/
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
@@ -84,4 +84,18 @@ QDF_STATUS ucfg_spectral_extract_response(struct spectral_cp_request *sscan_req,
|
|||||||
* Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_FAILURE on failure
|
* Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_FAILURE on failure
|
||||||
*/
|
*/
|
||||||
QDF_STATUS ucfg_spectral_register_to_dbr(struct wlan_objmgr_pdev *pdev);
|
QDF_STATUS ucfg_spectral_register_to_dbr(struct wlan_objmgr_pdev *pdev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ucfg_spectral_get_version() - ucfg API to get spectral version
|
||||||
|
* @pdev: Pointer to pdev object
|
||||||
|
* @version: Pointer to return version
|
||||||
|
* @sub_version: Pointer to return sub version
|
||||||
|
*
|
||||||
|
* Since struct spectral_samp_msg may be modified, so provide API to get
|
||||||
|
* version information and make sure spectraltool compatible with host.
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_FAILURE on failure
|
||||||
|
*/
|
||||||
|
QDF_STATUS ucfg_spectral_get_version(struct wlan_objmgr_pdev *pdev,
|
||||||
|
uint32_t *version, uint32_t *sub_version);
|
||||||
#endif /* _WLAN_SPECTRAL_UCFG_API_H_ */
|
#endif /* _WLAN_SPECTRAL_UCFG_API_H_ */
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
@@ -221,3 +221,18 @@ QDF_STATUS ucfg_spectral_register_to_dbr(struct wlan_objmgr_pdev *pdev)
|
|||||||
{
|
{
|
||||||
return spectral_pdev_open(pdev);
|
return spectral_pdev_open(pdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDF_STATUS ucfg_spectral_get_version(struct wlan_objmgr_pdev *pdev,
|
||||||
|
uint32_t *version, uint32_t *sub_version)
|
||||||
|
{
|
||||||
|
if (!pdev || !version || !sub_version) {
|
||||||
|
spectral_err("invalid param");
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
*version = SPECTRAL_VERSION;
|
||||||
|
*sub_version = SPECTRAL_SUB_VERSION;
|
||||||
|
spectral_debug("Spectral get version %d:%d", *version, *sub_version);
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user