1*5113495bSYour Name /* 2*5113495bSYour Name * Copyright (c) 2018 The Linux Foundation. All rights reserved. 3*5113495bSYour Name * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. 4*5113495bSYour Name * 5*5113495bSYour Name * Permission to use, copy, modify, and/or distribute this software for 6*5113495bSYour Name * any purpose with or without fee is hereby granted, provided that the 7*5113495bSYour Name * above copyright notice and this permission notice appear in all 8*5113495bSYour Name * copies. 9*5113495bSYour Name * 10*5113495bSYour Name * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11*5113495bSYour Name * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12*5113495bSYour Name * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13*5113495bSYour Name * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14*5113495bSYour Name * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15*5113495bSYour Name * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16*5113495bSYour Name * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17*5113495bSYour Name * PERFORMANCE OF THIS SOFTWARE. 18*5113495bSYour Name */ 19*5113495bSYour Name /** 20*5113495bSYour Name * DOC: Declare various struct, macros which shall be used in the DISA 21*5113495bSYour Name * component. 22*5113495bSYour Name * 23*5113495bSYour Name * Note: This file shall not contain public API's prototype/declarations. 24*5113495bSYour Name * 25*5113495bSYour Name */ 26*5113495bSYour Name 27*5113495bSYour Name #ifndef _WLAN_DISA_PUBLIC_STRUCT_H_ 28*5113495bSYour Name #define _WLAN_DISA_PUBLIC_STRUCT_H_ 29*5113495bSYour Name 30*5113495bSYour Name #include <qdf_types.h> 31*5113495bSYour Name 32*5113495bSYour Name #define MAC_MAX_KEY_LENGTH 32 33*5113495bSYour Name #define MAC_PN_LENGTH 8 34*5113495bSYour Name #define MAX_MAC_HEADER_LEN 32 35*5113495bSYour Name #define MIN_MAC_HEADER_LEN 24 36*5113495bSYour Name 37*5113495bSYour Name /** 38*5113495bSYour Name * struct disa_encrypt_decrypt_req_params - disa encrypt request 39*5113495bSYour Name * @vdev_id: virtual device id 40*5113495bSYour Name * @key_flag: This indicates firmware to encrypt/decrypt payload 41*5113495bSYour Name * see ENCRYPT_DECRYPT_FLAG 42*5113495bSYour Name * @key_idx: Index used in storing key 43*5113495bSYour Name * @key_cipher: cipher used for encryption/decryption 44*5113495bSYour Name * Eg: see WMI_CIPHER_AES_CCM for CCMP 45*5113495bSYour Name * @key_len: length of key data 46*5113495bSYour Name * @key_txmic_len: length of Tx MIC 47*5113495bSYour Name * @key_rxmic_len: length of Rx MIC 48*5113495bSYour Name * @key_data: Key 49*5113495bSYour Name * @pn: packet number 50*5113495bSYour Name * @mac_header: MAC header 51*5113495bSYour Name * @data_len: length of data 52*5113495bSYour Name * @data: pointer to payload 53*5113495bSYour Name */ 54*5113495bSYour Name struct disa_encrypt_decrypt_req_params { 55*5113495bSYour Name uint32_t vdev_id; 56*5113495bSYour Name uint8_t key_flag; 57*5113495bSYour Name uint32_t key_idx; 58*5113495bSYour Name uint32_t key_cipher; 59*5113495bSYour Name uint32_t key_len; 60*5113495bSYour Name uint32_t key_txmic_len; 61*5113495bSYour Name uint32_t key_rxmic_len; 62*5113495bSYour Name uint8_t key_data[MAC_MAX_KEY_LENGTH]; 63*5113495bSYour Name uint8_t pn[MAC_PN_LENGTH]; 64*5113495bSYour Name uint8_t mac_header[MAX_MAC_HEADER_LEN]; 65*5113495bSYour Name uint32_t data_len; 66*5113495bSYour Name uint8_t *data; 67*5113495bSYour Name }; 68*5113495bSYour Name 69*5113495bSYour Name /** 70*5113495bSYour Name * struct disa_encrypt_decrypt_resp_params - disa encrypt response 71*5113495bSYour Name * @vdev_id: vdev id 72*5113495bSYour Name * @status: status 73*5113495bSYour Name * @data_len: data length 74*5113495bSYour Name * @data: data pointer 75*5113495bSYour Name */ 76*5113495bSYour Name struct disa_encrypt_decrypt_resp_params { 77*5113495bSYour Name uint32_t vdev_id; 78*5113495bSYour Name int32_t status; 79*5113495bSYour Name uint32_t data_len; 80*5113495bSYour Name uint8_t *data; 81*5113495bSYour Name }; 82*5113495bSYour Name 83*5113495bSYour Name /** 84*5113495bSYour Name * typedef encrypt_decrypt_resp_callback() - DISA callback function 85*5113495bSYour Name * @cookie: cookie passed in the DISA request 86*5113495bSYour Name * @resp: the DISA response 87*5113495bSYour Name */ 88*5113495bSYour Name typedef void (*encrypt_decrypt_resp_callback)(void *cookie, 89*5113495bSYour Name struct disa_encrypt_decrypt_resp_params *resp); 90*5113495bSYour Name #endif /* end of _WLAN_DISA_PUBLIC_STRUCT_H_ */ 91*5113495bSYour Name 92