qcacmn: Move the spectral tgt layer functionality to tgt file

If the definition of an API in umac layer is same for
both OL and DA chipsets, it is better to have a single
implementation of that API for maintainance pursposes.
tgt file is the placeholder for such APIs.

CRs-Fixed: 2151543
Change-Id: I3ae969452b10f6d81e46351a74ed9d4c3f5ea96c
This commit is contained in:
Shiva Krishna Pittala
2017-12-28 17:17:11 +05:30
committed by snandini
parent 71155a3e48
commit 82032dd2a4
4 changed files with 366 additions and 611 deletions

View File

@@ -22,6 +22,7 @@
#include <wlan_objmgr_cmn.h>
#include <qdf_types.h>
#include "../../core/spectral_cmn_api_i.h"
/**
* tgt_send_phydata() - Send Spectral PHY data
@@ -47,4 +48,179 @@ int tgt_send_phydata(struct wlan_objmgr_pdev *pdev,
*/
void *tgt_get_target_handle(struct wlan_objmgr_pdev *pdev);
/**
* tgt_spectral_control()- handler for demultiplexing requests from higher layer
* @pdev: reference to global pdev object
* @id: spectral config command id
* @indata: reference to input data
* @insize: input data size
* @outdata: reference to output data
* @outsize: output data size
*
* This function processes the spectral config command
* and appropriate handlers are invoked.
*
* Return: 0 success else failure
*/
int
tgt_spectral_control(
struct wlan_objmgr_pdev *pdev,
u_int id,
void *indata,
u_int32_t insize, void *outdata, u_int32_t *outsize);
/**
* tgt_pdev_spectral_init() - implementation for spectral init
* @pdev: Pointer to pdev
*
* Return: On success, pointer to Spectral target_if internal private data, on
* failure, NULL
*/
void *
tgt_pdev_spectral_init(struct wlan_objmgr_pdev *pdev);
/**
* tgt_pdev_spectral_deinit() - implementation for spectral de-init
* @pdev: Pointer to pdev
*
* Return: None
*/
void
tgt_pdev_spectral_deinit(struct wlan_objmgr_pdev *pdev);
/**
* tgt_set_spectral_config() - Set spectral config
* @pdev: Pointer to pdev object
* @threshtype: spectral parameter type
* @value: value to be configured for the given spectral parameter
*
* Implementation for setting spectral config
*
* Return: 0 on success else failure
*/
int
tgt_set_spectral_config(
struct wlan_objmgr_pdev *pdev,
const u_int32_t threshtype, const u_int32_t value);
/**
* tgt_get_spectral_config() - Get spectral configuration
* @pdev: Pointer to pdev object
* @param: Pointer to spectral_config structure in which the configuration
* should be returned
*
* Implementation for getting the current spectral configuration
*
* Return: None
*/
void
tgt_get_spectral_config(
struct wlan_objmgr_pdev *pdev,
struct spectral_config *sptrl_config);
/**
* tgt_start_spectral_scan() - Start spectral scan
* @pdev: Pointer to pdev object
*
* Implementation for starting spectral scan
*
* Return: 0 in case of success, -1 on failure
*/
int
tgt_start_spectral_scan(struct wlan_objmgr_pdev *pdev);
/**
* tgt_stop_spectral_scan() - Stop spectral scan
* @pdev: Pointer to pdev object
*
* Implementation for stop spectral scan
*
* Return: None
*/
void
tgt_stop_spectral_scan(struct wlan_objmgr_pdev *pdev);
/**
* tgt_is_spectral_active() - Get whether Spectral is active
* @pdev: Pointer to pdev object
*
* Implementation to get whether Spectral is active
*
* Return: True if Spectral is active, false if Spectral is not active
*/
bool
tgt_is_spectral_active(struct wlan_objmgr_pdev *pdev);
/**
* tgt_is_spectral_enabled() - Get whether Spectral is active
* @pdev: Pointer to pdev object
*
* Implementation to get whether Spectral is active
*
* Return: True if Spectral is active, false if Spectral is not active
*/
bool
tgt_is_spectral_enabled(struct wlan_objmgr_pdev *pdev);
/**
* tgt_set_debug_level() - Set debug level for Spectral
* @pdev: Pointer to pdev object
* @debug_level: Debug level
*
* Implementation to set the debug level for Spectral
*
* Return: 0 in case of success
*/
int
tgt_set_debug_level(struct wlan_objmgr_pdev *pdev, u_int32_t debug_level);
/**
* tgt_get_debug_level() - Get debug level for Spectral
* @pdev: Pointer to pdev object
*
* Implementation to get the debug level for Spectral
*
* Return: Current debug level
*/
u_int32_t
tgt_get_debug_level(struct wlan_objmgr_pdev *pdev);
/**
* tgt_get_spectral_capinfo() - Get Spectral capability information
* @pdev: Pointer to pdev object
* @outdata: Buffer into which data should be copied
*
* Implementation to get the spectral capability information
*
* Return: void
*/
void
tgt_get_spectral_capinfo(struct wlan_objmgr_pdev *pdev, void *outdata);
/**
* tgt_get_spectral_diagstats() - Get Spectral diagnostic statistics
* @pdev: Pointer to pdev object
* @outdata: Buffer into which data should be copied
*
* Implementation to get the spectral diagnostic statistics
*
* Return: void
*/
void
tgt_get_spectral_diagstats(struct wlan_objmgr_pdev *pdev, void *outdata);
/**
* tgt_register_wmi_spectral_cmd_ops() - Register wmi_spectral_cmd_ops
* @cmd_ops: Pointer to the structure having wmi_spectral_cmd function pointers
* @pdev: Pointer to pdev object
*
* Implementation to register wmi_spectral_cmd_ops in spectral
* internal data structure
*
* Return: void
*/
void
tgt_register_wmi_spectral_cmd_ops(
struct wlan_objmgr_pdev *pdev,
struct wmi_spectral_cmd_ops *cmd_ops);
#endif /* _WLAN_SPECTRAL_TGT_API_H_ */