qcacld-3.0: Skeleton for DISA component
Create a skeleton for the DISA component. This is a CLD component. Add files for disa core, dispatcher and target_if. Define DISA related public structures and objmgr objects. Add API's as stubs. Change-Id: I63b32a0e7da0283d091815aaccea6b8703f5184c CRs-Fixed: 2159579
This commit is contained in:

committed by
snandini

parent
7e2c874db0
commit
ba2253d2af
85
disa/dispatcher/inc/wlan_disa_obj_mgmt_api.h
Normal file
85
disa/dispatcher/inc/wlan_disa_obj_mgmt_api.h
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* Copyright (c) 2018 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 utility API related to the disa component
|
||||
* called by other components
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_DISA_OBJ_MGMT_API_H_
|
||||
#define _WLAN_DISA_OBJ_MGMT_API_H_
|
||||
|
||||
#include "wlan_disa_obj_mgmt_public_struct.h"
|
||||
|
||||
/**
|
||||
* disa_init() - register disa notification handlers.
|
||||
*
|
||||
* This function registers disa related notification handlers.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS - in case of success else return error
|
||||
*/
|
||||
QDF_STATUS disa_init(void);
|
||||
|
||||
/**
|
||||
* disa_deinit() - unregister disa notification handlers.
|
||||
*
|
||||
* This function unregisters disa related notification handlers.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS - in case of success else return error
|
||||
*/
|
||||
QDF_STATUS disa_deinit(void);
|
||||
|
||||
/**
|
||||
* disa_psoc_object_created_notification(): disa psoc create handler
|
||||
* @psoc: psoc which is going to created by objmgr
|
||||
* @arg: argument for psoc create handler
|
||||
*
|
||||
* Attach psoc private object, register rx/tx ops and event handlers
|
||||
*
|
||||
* Return QDF_STATUS status in case of success else return error
|
||||
*/
|
||||
QDF_STATUS disa_psoc_object_created_notification(
|
||||
struct wlan_objmgr_psoc *psoc, void *arg);
|
||||
|
||||
/**
|
||||
* disa_psoc_object_destroyed_notification(): disa psoc destroy handler
|
||||
* @psoc: objmgr object corresponding to psoc which is going to be destroyed
|
||||
* @arg: argument for psoc destroy handler
|
||||
*
|
||||
* Detach and free psoc private object, unregister event handlers
|
||||
*
|
||||
* Return QDF_STATUS status in case of success else return error
|
||||
*/
|
||||
QDF_STATUS disa_psoc_object_destroyed_notification(
|
||||
struct wlan_objmgr_psoc *psoc, void *arg);
|
||||
|
||||
/**
|
||||
* disa_psoc_enable() - Trigger psoc enable for DISA
|
||||
* @psoc: objmgr psoc object
|
||||
*
|
||||
* Return: QDF status success or failure
|
||||
*/
|
||||
QDF_STATUS disa_psoc_enable(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* disa_psoc_disable() - Trigger psoc disable for DISA
|
||||
* @psoc: objmgr psoc object
|
||||
*
|
||||
* Return: QDF status success or failure
|
||||
*/
|
||||
QDF_STATUS disa_psoc_disable(struct wlan_objmgr_psoc *psoc);
|
||||
#endif /* end of _WLAN_DISA_OBJ_MGMT_API_H_ */
|
56
disa/dispatcher/inc/wlan_disa_obj_mgmt_public_struct.h
Normal file
56
disa/dispatcher/inc/wlan_disa_obj_mgmt_public_struct.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Copyright (c) 2018 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 various struct, macros which are used for object mgmt in disa.
|
||||
*
|
||||
* Note: This file shall not contain public API's prototype/declarations.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_DISA_OBJ_MGMT_PUBLIC_STRUCT_H_
|
||||
#define _WLAN_DISA_OBJ_MGMT_PUBLIC_STRUCT_H_
|
||||
|
||||
#include "wlan_disa_public_struct.h"
|
||||
#include "wlan_objmgr_cmn.h"
|
||||
#include "wlan_objmgr_psoc_obj.h"
|
||||
|
||||
/**
|
||||
* struct wlan_disa_tx_ops - structure of tx operation function
|
||||
* pointers for disa component
|
||||
* @disa_encrypt_decrypt_req: send encrypt/decrypt request
|
||||
* @disa_register_ev_handlers: register disa event handlers
|
||||
* @disa_unregister_ev_handlers: unregister disa event handlers
|
||||
*/
|
||||
struct wlan_disa_tx_ops {
|
||||
QDF_STATUS (*disa_encrypt_decrypt_req)(struct wlan_objmgr_psoc *psoc,
|
||||
struct disa_encrypt_decrypt_req_params *req);
|
||||
QDF_STATUS (*disa_register_ev_handlers)(struct wlan_objmgr_psoc *psoc);
|
||||
QDF_STATUS (*disa_unregister_ev_handlers)
|
||||
(struct wlan_objmgr_psoc *psoc);
|
||||
};
|
||||
|
||||
/**
|
||||
* struct wlan_disa_rx_ops - structure of rx operation function
|
||||
* pointers for disa component
|
||||
* @encrypt_decrypt_msg_resp: send response of encrypt/decrypt request
|
||||
*/
|
||||
struct wlan_disa_rx_ops {
|
||||
QDF_STATUS (*encrypt_decrypt_msg_resp)(struct wlan_objmgr_psoc *psoc,
|
||||
struct disa_encrypt_decrypt_resp_params *resp);
|
||||
};
|
||||
#endif /* end of _WLAN_DISA_OBJ_MGMT_PUBLIC_STRUCT_H_ */
|
86
disa/dispatcher/inc/wlan_disa_public_struct.h
Normal file
86
disa/dispatcher/inc/wlan_disa_public_struct.h
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* Copyright (c) 2018 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 various struct, macros which shall be used in the DISA
|
||||
* component.
|
||||
*
|
||||
* Note: This file shall not contain public API's prototype/declarations.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_DISA_PUBLIC_STRUCT_H_
|
||||
#define _WLAN_DISA_PUBLIC_STRUCT_H_
|
||||
|
||||
#include <wlan_cmn.h>
|
||||
#include <qdf_status.h>
|
||||
|
||||
#define MAC_MAX_KEY_LENGTH 32
|
||||
#define MAC_PN_LENGTH 8
|
||||
#define MAX_MAC_HEADER_LEN 32
|
||||
#define MIN_MAC_HEADER_LEN 24
|
||||
|
||||
/**
|
||||
* struct disa_encrypt_decrypt_req_params - disa encrypt request
|
||||
* @vdev_id: virtual device id
|
||||
* @key_flag: This indicates firmware to encrypt/decrypt payload
|
||||
* see ENCRYPT_DECRYPT_FLAG
|
||||
* @key_idx: Index used in storing key
|
||||
* @key_cipher: cipher used for encryption/decryption
|
||||
* Eg: see WMI_CIPHER_AES_CCM for CCMP
|
||||
* @key_len: length of key data
|
||||
* @key_txmic_len: length of Tx MIC
|
||||
* @key_rxmic_len: length of Rx MIC
|
||||
* @key_data: Key
|
||||
* @pn: packet number
|
||||
* @mac_header: MAC header
|
||||
* @data_len: length of data
|
||||
* @data: pointer to payload
|
||||
*/
|
||||
struct disa_encrypt_decrypt_req_params {
|
||||
uint32_t vdev_id;
|
||||
uint8_t key_flag;
|
||||
uint32_t key_idx;
|
||||
uint32_t key_cipher;
|
||||
uint32_t key_len;
|
||||
uint32_t key_txmic_len;
|
||||
uint32_t key_rxmic_len;
|
||||
uint8_t key_data[MAC_MAX_KEY_LENGTH];
|
||||
uint8_t pn[MAC_PN_LENGTH];
|
||||
uint8_t mac_header[MAX_MAC_HEADER_LEN];
|
||||
uint32_t data_len;
|
||||
uint8_t *data;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct disa_encrypt_decrypt_resp_params - disa encrypt response
|
||||
* @vdev_id: vdev id
|
||||
* @status: status
|
||||
* @data_length: data length
|
||||
* @data: data pointer
|
||||
*/
|
||||
struct disa_encrypt_decrypt_resp_params {
|
||||
uint32_t vdev_id;
|
||||
int32_t status;
|
||||
uint32_t data_len;
|
||||
uint8_t *data;
|
||||
};
|
||||
|
||||
typedef void (*encrypt_decrypt_resp_callback)(void *cookie,
|
||||
struct disa_encrypt_decrypt_resp_params *resp) ;
|
||||
#endif /* end of _WLAN_DISA_PUBLIC_STRUCT_H_ */
|
||||
|
68
disa/dispatcher/inc/wlan_disa_tgt_api.h
Normal file
68
disa/dispatcher/inc/wlan_disa_tgt_api.h
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright (c) 2018 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 public API for disa to interact with target/WMI
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_DISA_TGT_API_H_
|
||||
#define _WLAN_DISA_TGT_API_H_
|
||||
|
||||
#include "wlan_disa_obj_mgmt_public_struct.h"
|
||||
#include "wlan_disa_public_struct.h"
|
||||
|
||||
#define GET_DISA_TX_OPS_FROM_VDEV(vedv) \
|
||||
(disa_psoc_get_priv(psoc)->disa_tx_ops)
|
||||
|
||||
/**
|
||||
* tgt_disa_encrypt_decrypt_req() - send encrypt/decrypt request to target if
|
||||
* @psoc: objmgr psoc object
|
||||
* @req: encrypt/decrypt parameters
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS tgt_disa_encrypt_decrypt_req(struct wlan_objmgr_psoc *psoc,
|
||||
struct disa_encrypt_decrypt_req_params *req);
|
||||
|
||||
/**
|
||||
* tgt_disa_encrypt_decrypt_resp() - receive encrypt/decrypt response
|
||||
* from target if
|
||||
* @psoc: objmgr psoc object
|
||||
* @resp: encrypt/decrypt response containing results
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS tgt_disa_encrypt_decrypt_resp(struct wlan_objmgr_psoc *psoc,
|
||||
struct disa_encrypt_decrypt_resp_params *resp);
|
||||
|
||||
/**
|
||||
* tgt_disa_register_ev_handlers() - API to register disa event handlers
|
||||
* @psoc: objmgr psoc object
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS in case of success else return error
|
||||
*/
|
||||
QDF_STATUS tgt_disa_register_ev_handlers(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* tgt_disa_unregister_ev_handlers() - API to unregister disa event handlers
|
||||
* @psoc: objmgr psoc object
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS in case of success else return error
|
||||
*/
|
||||
QDF_STATUS tgt_disa_unregister_ev_handlers(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
#endif /* end of _WLAN_DISA_TGT_API_H_ */
|
44
disa/dispatcher/inc/wlan_disa_ucfg_api.h
Normal file
44
disa/dispatcher/inc/wlan_disa_ucfg_api.h
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright (c) 2018 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 public API related to the disa called by north bound HDD/OSIF
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_DISA_UCFG_API_H_
|
||||
#define _WLAN_DISA_UCFG_API_H_
|
||||
|
||||
#include "wlan_disa_public_struct.h"
|
||||
#include "wlan_disa_obj_mgmt_api.h"
|
||||
|
||||
/**
|
||||
* ucfg_disa_encrypt_decrypt_req() - Send encrypt/decrypt request to the DISA
|
||||
* core
|
||||
* @psoc: objmgr psoc object
|
||||
* @req: DISA encrypt/decrypt request parameters
|
||||
* @cb: Response callback for the encrypt/decrypt request
|
||||
* @cookie: Cookie to pass to the response callback
|
||||
*
|
||||
* Return: QDF status success or failure
|
||||
*/
|
||||
QDF_STATUS ucfg_disa_encrypt_decrypt_req(struct wlan_objmgr_psoc *psoc,
|
||||
struct disa_encrypt_decrypt_req_params *req,
|
||||
encrypt_decrypt_resp_callback cb,
|
||||
void *cookie);
|
||||
|
||||
|
||||
#endif /* end of _WLAN_DISA_UCFG_API_H_ */
|
Reference in New Issue
Block a user