qcacmn: Spectral control path changes
Add a new request structure for Specteral control path. This structure packages all the commands and their required inputs. Response to the commands are filled in this structure by the command handlers in lower layers. CRs-Fixed: 2446466 Change-Id: I3113e8721382d284b4e03e0f8fdab1e68d5cfaa1
这个提交包含在:
@@ -187,6 +187,20 @@ enum spectral_capability_type {
|
||||
SPECTRAL_CAP_ADVNCD_SPECTRAL_SCAN,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum spectral_cp_error_code - Spectral control path response code
|
||||
* @SPECTRAL_SCAN_RESP_ERR_PARAM_UNSUPPORTED: parameter unsupported
|
||||
* @SPECTRAL_SCAN_RESP_ERR_MODE_UNSUPPORTED: mode unsupported
|
||||
* @SPECTRAL_SCAN_RESP_ERR_PARAM_INVALID_VALUE: invalid parameter value
|
||||
* @SPECTRAL_SCAN_RESP_ERR_PARAM_NOT_INITIALIZED: parameter uninitialized
|
||||
*/
|
||||
enum spectral_cp_error_code {
|
||||
SPECTRAL_SCAN_ERR_PARAM_UNSUPPORTED,
|
||||
SPECTRAL_SCAN_ERR_MODE_UNSUPPORTED,
|
||||
SPECTRAL_SCAN_ERR_PARAM_INVALID_VALUE,
|
||||
SPECTRAL_SCAN_ERR_PARAM_NOT_INITIALIZED,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct spectral_chan_stats - channel status info
|
||||
* @cycle_count: Cycle count
|
||||
@@ -257,6 +271,97 @@ struct spectral_nl_cb {
|
||||
void (*free_nbuff)(struct wlan_objmgr_pdev *pdev);
|
||||
};
|
||||
|
||||
/**
|
||||
* struct spectral_scan_config_request - Config request
|
||||
* @sscan_config: Spectral parameters
|
||||
* @sscan_err_code: Spectral scan error code
|
||||
*/
|
||||
struct spectral_scan_config_request {
|
||||
struct spectral_config sscan_config;
|
||||
enum spectral_cp_error_code sscan_err_code;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct spectral_scan_action_request - Action request
|
||||
* @sscan_err_code: Spectral scan error code
|
||||
*/
|
||||
struct spectral_scan_action_request {
|
||||
enum spectral_cp_error_code sscan_err_code;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct spectral_scan_get_caps_request - Get caps request
|
||||
* @sscan_caps: Spectral capabilities
|
||||
* @sscan_err_code: Spectral scan error code
|
||||
*/
|
||||
struct spectral_scan_get_caps_request {
|
||||
struct spectral_caps sscan_caps;
|
||||
enum spectral_cp_error_code sscan_err_code;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct spectral_scan_get_diag_request - Get diag request
|
||||
* @sscan_diag: Spectral diag stats
|
||||
* @sscan_err_code: Spectral scan error code
|
||||
*/
|
||||
struct spectral_scan_get_diag_request {
|
||||
struct spectral_diag_stats sscan_diag;
|
||||
enum spectral_cp_error_code sscan_err_code;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct spectral_scan_get_chan_width_request - Get channel width request
|
||||
* @chan_width: Channel width
|
||||
* @sscan_err_code: Spectral scan error code
|
||||
*/
|
||||
struct spectral_scan_get_chan_width_request {
|
||||
uint32_t chan_width;
|
||||
enum spectral_cp_error_code sscan_err_code;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct spectral_scan_get_status_request - Get status request
|
||||
* @is_active: is Spectral scan active
|
||||
* @is_enabled: is Spectral scan enabled
|
||||
* @sscan_err_code: Spectral scan error code
|
||||
*/
|
||||
struct spectral_scan_get_status_request {
|
||||
bool is_active;
|
||||
bool is_enabled;
|
||||
enum spectral_cp_error_code sscan_err_code;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct spectral_scan_debug_request - Get/set debug level request
|
||||
* @spectral_dbg_level: Spectral debug level
|
||||
* @sscan_err_code: Spectral scan error code
|
||||
*/
|
||||
struct spectral_scan_debug_request {
|
||||
uint32_t spectral_dbg_level;
|
||||
enum spectral_cp_error_code sscan_err_code;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct spectral_cp_request - Spectral control path request
|
||||
* Creating request and extracting response has to
|
||||
* be atomic.
|
||||
* @ss_mode: Spectral scan mode
|
||||
* @req_id: Request identifier
|
||||
*/
|
||||
struct spectral_cp_request {
|
||||
enum spectral_scan_mode ss_mode;
|
||||
uint8_t req_id;
|
||||
union {
|
||||
struct spectral_scan_config_request config_req;
|
||||
struct spectral_scan_action_request action_req;
|
||||
struct spectral_scan_get_caps_request caps_req;
|
||||
struct spectral_scan_get_diag_request diag_req;
|
||||
struct spectral_scan_get_chan_width_request chan_width_req;
|
||||
struct spectral_scan_get_status_request status_req;
|
||||
struct spectral_scan_debug_request debug_req;
|
||||
};
|
||||
};
|
||||
|
||||
#ifndef __KERNEL__
|
||||
|
||||
static inline int16_t
|
||||
|
@@ -37,12 +37,8 @@ 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
|
||||
* @pdev: reference to global pdev object
|
||||
* @sscan_req: pointer to Spectral scan request
|
||||
*
|
||||
* This function processes the spectral config command
|
||||
* and appropriate handlers are invoked.
|
||||
@@ -50,8 +46,7 @@ void *tgt_get_target_handle(struct wlan_objmgr_pdev *pdev);
|
||||
* 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);
|
||||
struct spectral_cp_request *sscan_req);
|
||||
|
||||
/**
|
||||
* tgt_pdev_spectral_init() - implementation for spectral init
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
@@ -28,20 +28,14 @@
|
||||
/**
|
||||
* ucfg_spectral_control() - Carry out Spectral control operations
|
||||
* @pdev: Pointer to pdev
|
||||
* @id: Spectral operation ID
|
||||
* @indata: Pointer to input data
|
||||
* @insize: Size of indata buffer
|
||||
* @outdata: Pointer to buffer where the output should be stored
|
||||
* @outsize: Size of outdata buffer
|
||||
* @sscan_req: spectral related control request
|
||||
*
|
||||
* Carry out Spectral specific UCFG control get/set operations
|
||||
*
|
||||
* Return: 0 on success, negative value on failure
|
||||
*/
|
||||
int ucfg_spectral_control(struct wlan_objmgr_pdev *pdev,
|
||||
u_int id,
|
||||
void *indata,
|
||||
uint32_t insize, void *outdata, uint32_t *outsize);
|
||||
QDF_STATUS ucfg_spectral_control(struct wlan_objmgr_pdev *pdev,
|
||||
struct spectral_cp_request *sscan_req);
|
||||
|
||||
/**
|
||||
* ucfg_spectral_scan_set_ppid() - configure pid of spectral tool
|
||||
@@ -55,4 +49,29 @@ int ucfg_spectral_control(struct wlan_objmgr_pdev *pdev,
|
||||
void ucfg_spectral_scan_set_ppid(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t ppid);
|
||||
|
||||
/**
|
||||
* ucfg_spectral_create_cp_req() - Create Spectral control path request
|
||||
* @sscan_req: Pointer to Spectral scan request
|
||||
* @indata: pointer input data
|
||||
* @insize: Size of input data
|
||||
*
|
||||
* Create Spectral control path request structure
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_FAILURE on failure
|
||||
*/
|
||||
QDF_STATUS ucfg_spectral_create_cp_req(struct spectral_cp_request *sscan_req,
|
||||
void *indata, u_int32_t insize);
|
||||
|
||||
/**
|
||||
* ucfg_spectral_create_cp_req() - Extract response from Spectral CP request
|
||||
* @sscan_req: Pointer to Spectral scan request
|
||||
* @outdata: pointer output data
|
||||
* @outsize: Size of output data
|
||||
*
|
||||
* Extract response from Spectral control path request
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_FAILURE on failure
|
||||
*/
|
||||
QDF_STATUS ucfg_spectral_extract_response(struct spectral_cp_request *sscan_req,
|
||||
void *outdata, u_int32_t *outsize);
|
||||
#endif /* _WLAN_SPECTRAL_UCFG_API_H_ */
|
||||
|
在新工单中引用
屏蔽一个用户