blob: db7d632324a319fe9f9f465002fdc694573d0b8d [file] [log] [blame]
Mukul Sharmad75a6672017-06-22 15:40:53 +05301/*
Jeff Johnsonb4c29962017-10-07 19:35:14 -07002 * Copyright (c) 2017 The Linux Foundation. All rights reserved.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for
5 * any purpose with or without fee is hereby granted, provided that the
6 * above copyright notice and this permission notice appear in all
7 * copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 * PERFORMANCE OF THIS SOFTWARE.
17 */
18/**
19 * DOC: Declare various struct, macros which shall be used in
20 * pmo gtk related feature.
21 *
22 * Note: This file shall not contain public API's prototype/declarations.
23 *
24 */
Mukul Sharmad75a6672017-06-22 15:40:53 +053025
26#ifndef _WLAN_PMO_GTK_PUBLIC_STRUCT_H
27#define _WLAN_PMO_GTK_PUBLIC_STRUCT_H
28
29#include "wlan_pmo_common_public_struct.h"
30
31#define PMO_GTK_OFFLOAD_ENABLE 0
32#define PMO_GTK_OFFLOAD_DISABLE 1
Vignesh Viswanathan21d9ecb2017-09-18 15:12:09 +053033#define PMO_KEK_LEN_LEGACY 16
34#define PMO_KEK_LEN 64
Mukul Sharmad75a6672017-06-22 15:40:53 +053035#define PMO_KCK_LEN 16
36#define PMO_REPLAY_COUNTER_LEN 8
37#define PMO_MAC_MAX_KEY_LENGTH 32
38#define PMO_IGTK_PN_SIZE 6
39
40/**
41 * struct pmo_gtk_req - pmo gtk request
42 * @flags: optional flags
43 * @kck: Key confirmation key
44 * @kek: key encryption key
Vignesh Viswanathan21d9ecb2017-09-18 15:12:09 +053045 * @kek_len: KEK Length
Mukul Sharmad75a6672017-06-22 15:40:53 +053046 * @replay_counter: replay_counter
47 * @bssid: bssid
48 */
49struct pmo_gtk_req {
50 uint32_t flags;
51 uint8_t kck[PMO_KCK_LEN];
52 uint8_t kek[PMO_KEK_LEN];
Vignesh Viswanathan21d9ecb2017-09-18 15:12:09 +053053 uint32_t kek_len;
Mukul Sharmad75a6672017-06-22 15:40:53 +053054 uint64_t replay_counter;
55 struct qdf_mac_addr bssid;
56};
57
58/**
59 * struct pmo_gtk_rsp_params - pmo gtk response
60 * @psoc: objmgr psoc
61 * @vdev_id: vdev id on which arp offload needed
62 * @status_flag: status flags
63 * @refresh_cnt: number of successful GTK refresh exchanges since SET operation
64 * @igtk_key_index: igtk key index
65 * @igtk_key_length: igtk key length
66 * @igtk_key_rsc: igtk key index
67 * @igtk_key: igtk key length
68 */
69struct pmo_gtk_rsp_params {
70 uint8_t vdev_id;
71 uint32_t status_flag;
72 uint32_t refresh_cnt;
73 uint64_t replay_counter;
74 uint8_t igtk_key_index;
75 uint8_t igtk_key_length;
76 uint8_t igtk_key_rsc[PMO_IGTK_PN_SIZE];
77 uint8_t igtk_key[PMO_MAC_MAX_KEY_LENGTH];
78 struct qdf_mac_addr bssid;
79};
80
81/**
82 * typedef for gtk response callback
83 */
84typedef void (*pmo_gtk_rsp_callback)(void *callback_context,
85 struct pmo_gtk_rsp_params *gtk_rsp);
86
87/**
88 * struct pmo_gtk_rsp_req -gtk respsonse request
89 * @callback: client callback for providing gtk resposne when fwr send event
90 * @callback_context: client callback response
91 */
92struct pmo_gtk_rsp_req {
93 pmo_gtk_rsp_callback callback;
94 void *callback_context;
95};
96
97#endif /* end of _WLAN_PMO_GTK_PUBLIC_STRUCT_H */
98