1 /* 2 * Copyright (c) 2017-2018 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 /** 20 * DOC: Public APIs for crypto service 21 */ 22 /* include files */ 23 #ifndef __WLAN_CRYPTO_PARAM_HANDLING_I_H_ 24 #define __WLAN_CRYPTO_PARAM_HANDLING_I_H_ 25 /** 26 * wlan_crypto_set_authmode - called by ucfg to configure authmode for vdev 27 * @vdev: vdev 28 * @authmode: authmode 29 * 30 * This function gets called from ucfg to configure authmode for vdev. 31 * 32 * Return: QDF_STATUS_SUCCESS - in case of success 33 */ 34 QDF_STATUS wlan_crypto_set_authmode(struct wlan_crypto_params *crypto_params, 35 uint32_t authmode); 36 37 /** 38 * wlan_crypto_get_authmode - called by ucfg to get authmode of particular vdev 39 * @vdev: vdev 40 * 41 * This function gets called from ucfg to get authmode of particular vdev 42 * 43 * Return: authmode 44 */ 45 int32_t wlan_crypto_get_authmode(struct wlan_crypto_params *crypto_params); 46 47 /** 48 * wlan_crypto_set_mcastcipher - called by ucfg to configure mcastcipher in vdev 49 * @vdev: vdev 50 * @wlan_crypto_cipher_type: mcast cipher value. 51 * 52 * This function gets called from ucfg to configure mcastcipher in vdev 53 * 54 * Return: QDF_STATUS_SUCCESS - in case of success 55 */ 56 QDF_STATUS wlan_crypto_set_mcastcipher(struct wlan_crypto_params *crypto_params, 57 wlan_crypto_cipher_type cipher); 58 /** 59 * wlan_crypto_get_mcastcipher - called by ucfg to get mcastcipher from vdev 60 * @vdev: vdev 61 * 62 * This function gets called from ucfg to get mcastcipher of particular vdev 63 * 64 * Return: mcast cipher 65 */ 66 int32_t wlan_crypto_get_mcastcipher(struct wlan_crypto_params *crypto_params); 67 68 /** 69 * wlan_crypto_set_ucastciphers - called by ucfg to configure 70 * unicast ciphers in vdev 71 * @vdev: vdev 72 * @ciphers: bitmap value of all supported unicast ciphers 73 * 74 * This function gets called from ucfg to configure unicast ciphers in vdev 75 * 76 * Return: QDF_STATUS_SUCCESS - in case of success 77 */ 78 QDF_STATUS wlan_crypto_set_ucastciphers(struct wlan_crypto_params *, 79 uint32_t ciphers); 80 /** 81 * wlan_crypto_get_ucastciphers - called by ucfg to get ucastcipher from vdev 82 * @vdev: vdev 83 * 84 * This function gets called from ucfg to get supported unicast ciphers 85 * 86 * Return: bitmap value of all supported unicast ciphers 87 */ 88 int32_t wlan_crypto_get_ucastciphers(struct wlan_crypto_params *crypto_params); 89 90 /** 91 * wlan_crypto_set_mgmtcipher - called by ucfg to configure 92 * mgmt ciphers in vdev 93 * @vdev: vdev 94 * @ciphers: bitmap value of all supported unicast ciphers 95 * 96 * This function gets called from ucfg to configure unicast ciphers in vdev 97 * 98 * Return: QDF_STATUS_SUCCESS - in case of success 99 */ 100 QDF_STATUS wlan_crypto_set_mgmtcipher(struct wlan_crypto_params *crypto_params, 101 uint32_t ciphers); 102 103 /** 104 * wlan_crypto_get_mgmtciphers - called by ucfg to get mgmtcipher from vdev 105 * @vdev: vdev 106 * 107 * This function gets called from ucfg to get supported unicast ciphers 108 * 109 * Return: bitmap value of all supported unicast ciphers 110 */ 111 int32_t wlan_crypto_get_mgmtciphers(struct wlan_crypto_params *crypto_params); 112 113 /** 114 * wlan_crypto_set_cipher_cap - called by ucfg to configure 115 * cipher cap in vdev 116 * @vdev: vdev 117 * @ciphers: bitmap value of all supported unicast ciphers 118 * 119 * This function gets called from ucfg to configure unicast ciphers in vdev 120 * 121 * Return: QDF_STATUS_SUCCESS - in case of success 122 */ 123 QDF_STATUS wlan_crypto_set_cipher_cap(struct wlan_crypto_params *crypto_params, 124 uint32_t ciphers); 125 126 /** 127 * wlan_crypto_get_cipher_cap - called by ucfg to get cipher caps from vdev 128 * @vdev: vdev 129 * 130 * This function gets called from ucfg to get supported unicast ciphers 131 * 132 * Return: bitmap value of all supported unicast ciphers 133 */ 134 int32_t wlan_crypto_get_cipher_cap(struct wlan_crypto_params *crypto_params); 135 136 /** 137 * wlan_crypto_set_rsn_cap - called by ucfg to configure 138 * cipher cap in vdev 139 * @vdev: vdev 140 * @ciphers: bitmap value of all supported unicast ciphers 141 * 142 * This function gets called from ucfg to configure unicast ciphers in vdev 143 * 144 * Return: QDF_STATUS_SUCCESS - in case of success 145 */ 146 QDF_STATUS wlan_crypto_set_rsn_cap(struct wlan_crypto_params *crypto_params, 147 uint32_t ciphers); 148 149 /** 150 * wlan_crypto_get_rsn_cap - called by ucfg to get rsn caps from vdev 151 * @vdev: vdev 152 * 153 * This function gets called from ucfg to get supported unicast ciphers 154 * 155 * Return: bitmap value of all supported unicast ciphers 156 */ 157 int32_t wlan_crypto_get_rsn_cap(struct wlan_crypto_params *crypto_params); 158 159 160 /** 161 * wlan_crypto_set_key_mgmt - called by ucfg to configure 162 * key_mgmt in vdev 163 * @vdev: vdev 164 * @ciphers: bitmap value of all supported unicast ciphers 165 * 166 * This function gets called from ucfg to configure unicast ciphers in vdev 167 * 168 * Return: QDF_STATUS_SUCCESS - in case of success 169 */ 170 QDF_STATUS wlan_crypto_set_key_mgmt(struct wlan_crypto_params *crypto_params, 171 uint32_t ciphers); 172 173 /** 174 * wlan_crypto_get_key_mgmt - called by ucfg to get key mgmt from vdev 175 * @vdev: vdev 176 * 177 * This function gets called from ucfg to get supported unicast ciphers 178 * 179 * Return: bitmap value of all supported unicast ciphers 180 */ 181 int32_t wlan_crypto_get_key_mgmt(struct wlan_crypto_params *crypto_params); 182 #endif /* __WLAN_CRYPTO_PARAM_HANDLING_I_H_ */ 183