1*5113495bSYour Name /* 2*5113495bSYour Name * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved. 3*5113495bSYour Name * Copyright (c) 2022-2023 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 21*5113495bSYour Name * pmo gtk related feature. 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_PMO_GTK_PUBLIC_STRUCT_H 28*5113495bSYour Name #define _WLAN_PMO_GTK_PUBLIC_STRUCT_H 29*5113495bSYour Name 30*5113495bSYour Name #include "wlan_pmo_common_public_struct.h" 31*5113495bSYour Name 32*5113495bSYour Name #define PMO_GTK_OFFLOAD_ENABLE 0 33*5113495bSYour Name #define PMO_GTK_OFFLOAD_DISABLE 1 34*5113495bSYour Name #define PMO_KEK_LEN 64 35*5113495bSYour Name #define PMO_KCK_LEN 32 36*5113495bSYour Name #define PMO_REPLAY_COUNTER_LEN 8 37*5113495bSYour Name #define PMO_MAC_MAX_KEY_LENGTH 32 38*5113495bSYour Name #define PMO_IGTK_PN_SIZE 6 39*5113495bSYour Name 40*5113495bSYour Name /** 41*5113495bSYour Name * struct pmo_gtk_req - pmo gtk request 42*5113495bSYour Name * @flags: optional flags 43*5113495bSYour Name * @kck: Key confirmation key 44*5113495bSYour Name * @kck_len: Key confirmation key length 45*5113495bSYour Name * @kek: key encryption key 46*5113495bSYour Name * @kek_len: KEK Length 47*5113495bSYour Name * @replay_counter: replay_counter 48*5113495bSYour Name * @bssid: bssid 49*5113495bSYour Name * @is_fils_connection: is current connection with peer FILS or not. 50*5113495bSYour Name */ 51*5113495bSYour Name struct pmo_gtk_req { 52*5113495bSYour Name uint32_t flags; 53*5113495bSYour Name uint8_t kck[PMO_KCK_LEN]; 54*5113495bSYour Name uint8_t kck_len; 55*5113495bSYour Name uint8_t kek[PMO_KEK_LEN]; 56*5113495bSYour Name uint32_t kek_len; 57*5113495bSYour Name uint64_t replay_counter; 58*5113495bSYour Name struct qdf_mac_addr bssid; 59*5113495bSYour Name bool is_fils_connection; 60*5113495bSYour Name }; 61*5113495bSYour Name 62*5113495bSYour Name /** 63*5113495bSYour Name * struct pmo_gtk_rsp_params - pmo gtk response 64*5113495bSYour Name * @vdev_id: vdev id on which arp offload needed 65*5113495bSYour Name * @status_flag: status flags 66*5113495bSYour Name * @refresh_cnt: number of successful GTK refresh exchanges since SET operation 67*5113495bSYour Name * @replay_counter:GTK replay counter 68*5113495bSYour Name * @igtk_key_index: igtk key index 69*5113495bSYour Name * @igtk_key_length: igtk key length 70*5113495bSYour Name * @igtk_key_rsc: igtk key index 71*5113495bSYour Name * @igtk_key: igtk key length 72*5113495bSYour Name * @bssid: BSSID 73*5113495bSYour Name */ 74*5113495bSYour Name struct pmo_gtk_rsp_params { 75*5113495bSYour Name uint8_t vdev_id; 76*5113495bSYour Name uint32_t status_flag; 77*5113495bSYour Name uint32_t refresh_cnt; 78*5113495bSYour Name uint64_t replay_counter; 79*5113495bSYour Name uint8_t igtk_key_index; 80*5113495bSYour Name uint8_t igtk_key_length; 81*5113495bSYour Name uint8_t igtk_key_rsc[PMO_IGTK_PN_SIZE]; 82*5113495bSYour Name uint8_t igtk_key[PMO_MAC_MAX_KEY_LENGTH]; 83*5113495bSYour Name struct qdf_mac_addr bssid; 84*5113495bSYour Name }; 85*5113495bSYour Name 86*5113495bSYour Name /** 87*5113495bSYour Name * typedef pmo_gtk_rsp_callback() - gtk response callback 88*5113495bSYour Name * @callback_context: client context 89*5113495bSYour Name * @gtk_rsp: GTK response 90*5113495bSYour Name */ 91*5113495bSYour Name typedef void (*pmo_gtk_rsp_callback)(void *callback_context, 92*5113495bSYour Name struct pmo_gtk_rsp_params *gtk_rsp); 93*5113495bSYour Name 94*5113495bSYour Name /** 95*5113495bSYour Name * struct pmo_gtk_rsp_req - gtk respsonse request 96*5113495bSYour Name * @callback: client callback for providing gtk response when fwr send event 97*5113495bSYour Name * @callback_context: client callback response 98*5113495bSYour Name */ 99*5113495bSYour Name struct pmo_gtk_rsp_req { 100*5113495bSYour Name pmo_gtk_rsp_callback callback; 101*5113495bSYour Name void *callback_context; 102*5113495bSYour Name }; 103*5113495bSYour Name 104*5113495bSYour Name #endif /* end of _WLAN_PMO_GTK_PUBLIC_STRUCT_H */ 105*5113495bSYour Name 106