|
@@ -1,6 +1,6 @@
|
|
|
/*
|
|
|
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
|
|
|
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
|
|
+ * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. 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
|
|
@@ -17,7 +17,7 @@
|
|
|
* PERFORMANCE OF THIS SOFTWARE.
|
|
|
*/
|
|
|
|
|
|
- /**
|
|
|
+/**
|
|
|
* DOC: Public APIs for crypto service
|
|
|
*/
|
|
|
#ifndef _WLAN_CRYPTO_GLOBAL_API_H_
|
|
@@ -25,8 +25,9 @@
|
|
|
|
|
|
#include "wlan_crypto_global_def.h"
|
|
|
#include <qdf_crypto.h>
|
|
|
+
|
|
|
/**
|
|
|
- * wlan_crypto_set_vdev_param - called by ucfg to set crypto param
|
|
|
+ * wlan_crypto_set_vdev_param() - called by ucfg to set crypto param
|
|
|
* @vdev: vdev
|
|
|
* @param: param to be set.
|
|
|
* @value: value
|
|
@@ -40,7 +41,7 @@ QDF_STATUS wlan_crypto_set_vdev_param(struct wlan_objmgr_vdev *vdev,
|
|
|
uint32_t value);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_set_peer_param - called by ucfg to set crypto param
|
|
|
+ * wlan_crypto_set_peer_param() - called by ucfg to set crypto param
|
|
|
*
|
|
|
* @peer: peer
|
|
|
* @param: param to be set.
|
|
@@ -55,7 +56,7 @@ QDF_STATUS wlan_crypto_set_peer_param(struct wlan_objmgr_peer *peer,
|
|
|
uint32_t value);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_get_param - called by ucfg to get crypto param
|
|
|
+ * wlan_crypto_get_param() - called by ucfg to get crypto param
|
|
|
* @vdev: vdev
|
|
|
* @param: param to be get.
|
|
|
*
|
|
@@ -65,8 +66,9 @@ QDF_STATUS wlan_crypto_set_peer_param(struct wlan_objmgr_peer *peer,
|
|
|
*/
|
|
|
int32_t wlan_crypto_get_param(struct wlan_objmgr_vdev *vdev,
|
|
|
wlan_crypto_param_type param);
|
|
|
+
|
|
|
/**
|
|
|
- * wlan_crypto_get_peer_param - called by ucfg to get crypto peer param
|
|
|
+ * wlan_crypto_get_peer_param() - called by ucfg to get crypto peer param
|
|
|
* @peer: peer
|
|
|
* @param: param to be get.
|
|
|
*
|
|
@@ -78,7 +80,7 @@ int32_t wlan_crypto_get_peer_param(struct wlan_objmgr_peer *peer,
|
|
|
wlan_crypto_param_type param);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_is_htallowed - called by ucfg to check if HT rates is allowed
|
|
|
+ * wlan_crypto_is_htallowed() - called by ucfg to check if HT rates is allowed
|
|
|
* @vdev: Vdev
|
|
|
* @peer: Peer
|
|
|
*
|
|
@@ -88,8 +90,9 @@ int32_t wlan_crypto_get_peer_param(struct wlan_objmgr_peer *peer,
|
|
|
*/
|
|
|
uint8_t wlan_crypto_is_htallowed(struct wlan_objmgr_vdev *vdev,
|
|
|
struct wlan_objmgr_peer *peer);
|
|
|
+
|
|
|
/**
|
|
|
- * wlan_crypto_setkey - called by ucfg to setkey
|
|
|
+ * wlan_crypto_setkey() - called by ucfg to setkey
|
|
|
* @vdev: vdev
|
|
|
* @req_key: req_key with cipher type, key macaddress
|
|
|
*
|
|
@@ -101,7 +104,7 @@ QDF_STATUS wlan_crypto_setkey(struct wlan_objmgr_vdev *vdev,
|
|
|
struct wlan_crypto_req_key *req_key);
|
|
|
|
|
|
/**
|
|
|
- * store_def_keyix_peer - called by wlan_crypto_setkey
|
|
|
+ * store_def_keyix_peer() - called by wlan_crypto_setkey
|
|
|
* to store default key index for each peer in the vdev.
|
|
|
* @vdev: vdev
|
|
|
* @object: Peer object
|
|
@@ -115,11 +118,11 @@ void store_def_keyix_peer(struct wlan_objmgr_vdev *vdev, void *object,
|
|
|
void *arg);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_getkey - called by ucfg to get key
|
|
|
+ * wlan_crypto_getkey() - called by ucfg to get key
|
|
|
* @vdev: vdev
|
|
|
* @req_key: key value will be copied in this req_key
|
|
|
- * @mac_address: mac address of the peer for unicast key
|
|
|
- * or broadcast address if group key is requested.
|
|
|
+ * @mac_addr: mac address of the peer for unicast key
|
|
|
+ * or broadcast address if group key is requested.
|
|
|
*
|
|
|
* This function gets called from ucfg to get key
|
|
|
*
|
|
@@ -130,10 +133,10 @@ QDF_STATUS wlan_crypto_getkey(struct wlan_objmgr_vdev *vdev,
|
|
|
uint8_t *mac_addr);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_delkey - called by ucfg to delete key
|
|
|
+ * wlan_crypto_delkey() - called by ucfg to delete key
|
|
|
* @vdev: vdev
|
|
|
- * @mac_address: mac address of the peer for unicast key
|
|
|
- * or broadcast address if group key is deleted.
|
|
|
+ * @macaddr: mac address of the peer for unicast key
|
|
|
+ * or broadcast address if group key is deleted.
|
|
|
* @key_idx: key index to be deleted
|
|
|
*
|
|
|
* This function gets called from ucfg to delete key
|
|
@@ -145,10 +148,10 @@ QDF_STATUS wlan_crypto_delkey(struct wlan_objmgr_vdev *vdev,
|
|
|
uint8_t key_idx);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_default_key - called by ucfg to set default tx key
|
|
|
+ * wlan_crypto_default_key() - called by ucfg to set default tx key
|
|
|
* @vdev: vdev
|
|
|
- * @mac_address: mac address of the peer for unicast key
|
|
|
- * or broadcast address if group key need to made default.
|
|
|
+ * @macaddr: mac address of the peer for unicast key
|
|
|
+ * or broadcast address if group key need to made default.
|
|
|
* @key_idx: key index to be made as default key
|
|
|
* @unicast: is key was unicast or group key.
|
|
|
*
|
|
@@ -162,7 +165,7 @@ QDF_STATUS wlan_crypto_default_key(struct wlan_objmgr_vdev *vdev,
|
|
|
bool unicast);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_encap - called by mgmt for encap the frame based on cipher
|
|
|
+ * wlan_crypto_encap() - called by mgmt for encap the frame based on cipher
|
|
|
* @vdev: vdev
|
|
|
* @wbuf: wbuf
|
|
|
* @macaddr: macaddr
|
|
@@ -178,7 +181,7 @@ QDF_STATUS wlan_crypto_encap(struct wlan_objmgr_vdev *vdev,
|
|
|
uint8_t encapdone);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_decap - called by mgmt for decap the frame based on cipher
|
|
|
+ * wlan_crypto_decap() - called by mgmt for decap the frame based on cipher
|
|
|
* @vdev: vdev
|
|
|
* @wbuf: wbuf
|
|
|
* @macaddr: macaddr
|
|
@@ -194,7 +197,7 @@ QDF_STATUS wlan_crypto_decap(struct wlan_objmgr_vdev *vdev,
|
|
|
uint8_t tid);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_enmic - called by mgmt for adding mic in frame based on cipher
|
|
|
+ * wlan_crypto_enmic() - called by mgmt for adding mic in frame based on cipher
|
|
|
* @vdev: vdev
|
|
|
* @wbuf: wbuf
|
|
|
* @macaddr: macaddr
|
|
@@ -210,7 +213,7 @@ QDF_STATUS wlan_crypto_enmic(struct wlan_objmgr_vdev *vdev,
|
|
|
uint8_t encapdone);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_demic - called by mgmt for remove and check mic for
|
|
|
+ * wlan_crypto_demic() - called by mgmt for remove and check mic for
|
|
|
* the frame based on cipher
|
|
|
* @vdev: vdev
|
|
|
* @wbuf: wbuf
|
|
@@ -229,7 +232,7 @@ QDF_STATUS wlan_crypto_demic(struct wlan_objmgr_vdev *vdev,
|
|
|
uint8_t keyid);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_vdev_is_pmf_enabled - called to check is pmf enabled in vdev
|
|
|
+ * wlan_crypto_vdev_is_pmf_enabled() - called to check is pmf enabled in vdev
|
|
|
* @vdev: vdev
|
|
|
*
|
|
|
* This function gets called to check is pmf enabled or not in vdev.
|
|
@@ -239,7 +242,7 @@ QDF_STATUS wlan_crypto_demic(struct wlan_objmgr_vdev *vdev,
|
|
|
bool wlan_crypto_vdev_is_pmf_enabled(struct wlan_objmgr_vdev *vdev);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_vdev_is_pmf_required - called to check is pmf required in vdev
|
|
|
+ * wlan_crypto_vdev_is_pmf_required() - called to check is pmf required in vdev
|
|
|
* @vdev: vdev
|
|
|
*
|
|
|
* This function gets called to check is pmf required or not in vdev.
|
|
@@ -249,7 +252,7 @@ bool wlan_crypto_vdev_is_pmf_enabled(struct wlan_objmgr_vdev *vdev);
|
|
|
bool wlan_crypto_vdev_is_pmf_required(struct wlan_objmgr_vdev *vdev);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_is_pmf_enabled - called by mgmt txrx to check is pmf enabled
|
|
|
+ * wlan_crypto_is_pmf_enabled() - called by mgmt txrx to check is pmf enabled
|
|
|
* @vdev: vdev
|
|
|
* @peer: peer
|
|
|
*
|
|
@@ -261,7 +264,7 @@ bool wlan_crypto_is_pmf_enabled(struct wlan_objmgr_vdev *vdev,
|
|
|
struct wlan_objmgr_peer *peer);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_is_key_valid - called by mgmt txrx to check if key is valid
|
|
|
+ * wlan_crypto_is_key_valid() - called by mgmt txrx to check if key is valid
|
|
|
* @vdev: vdev
|
|
|
* @peer: peer
|
|
|
* @keyidx : key index
|
|
@@ -275,7 +278,7 @@ bool wlan_crypto_is_key_valid(struct wlan_objmgr_vdev *vdev,
|
|
|
uint16_t keyidx);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_add_mmie - called by mgmt txrx to add mmie in frame
|
|
|
+ * wlan_crypto_add_mmie() - called by mgmt txrx to add mmie in frame
|
|
|
* @vdev: vdev
|
|
|
* @frm: frame starting pointer
|
|
|
* @len: length of the frame
|
|
@@ -289,7 +292,7 @@ uint8_t *wlan_crypto_add_mmie(struct wlan_objmgr_vdev *vdev,
|
|
|
uint32_t len);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_is_mmie_valid - called by mgmt txrx to check mmie of the frame
|
|
|
+ * wlan_crypto_is_mmie_valid() - called by mgmt txrx to check mmie of the frame
|
|
|
* @vdev: vdev
|
|
|
* @frm: frame starting pointer
|
|
|
* @efrm: end of frame pointer
|
|
@@ -303,7 +306,7 @@ bool wlan_crypto_is_mmie_valid(struct wlan_objmgr_vdev *vdev,
|
|
|
uint8_t *efrm);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_wpaie_check - called by mlme to check the wpaie
|
|
|
+ * wlan_crypto_wpaie_check() - called by mlme to check the wpaie
|
|
|
* @crypto_params: crypto params
|
|
|
* @frm: ie buffer
|
|
|
*
|
|
@@ -316,7 +319,7 @@ QDF_STATUS wlan_crypto_wpaie_check(struct wlan_crypto_params *crypto_params,
|
|
|
const uint8_t *frm);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_rsnie_check - called by mlme to check the rsnie
|
|
|
+ * wlan_crypto_rsnie_check() - called by mlme to check the rsnie
|
|
|
* @crypto_params: crypto params
|
|
|
* @frm: ie buffer
|
|
|
*
|
|
@@ -327,8 +330,9 @@ QDF_STATUS wlan_crypto_wpaie_check(struct wlan_crypto_params *crypto_params,
|
|
|
*/
|
|
|
QDF_STATUS wlan_crypto_rsnie_check(struct wlan_crypto_params *crypto_params,
|
|
|
const uint8_t *frm);
|
|
|
+
|
|
|
/**
|
|
|
- * wlan_crypto_build_wpaie - called by mlme to build wpaie
|
|
|
+ * wlan_crypto_build_wpaie() - called by mlme to build wpaie
|
|
|
* @vdev: vdev
|
|
|
* @iebuf: ie buffer
|
|
|
*
|
|
@@ -354,7 +358,7 @@ uint8_t *wlan_crypto_build_rsnie_with_pmksa(struct wlan_objmgr_vdev *vdev,
|
|
|
struct wlan_crypto_pmksa *pmksa);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_build_rsnie - called by mlme to build rsnie
|
|
|
+ * wlan_crypto_build_rsnie() - called by mlme to build rsnie
|
|
|
* @vdev: vdev
|
|
|
* @iebuf: ie buffer
|
|
|
* @bssid: bssid mac address to add pmkid in rsnie
|
|
@@ -368,7 +372,7 @@ uint8_t *wlan_crypto_build_rsnie(struct wlan_objmgr_vdev *vdev,
|
|
|
struct qdf_mac_addr *bssid);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_wapiie_check - called by mlme to check the wapiie
|
|
|
+ * wlan_crypto_wapiie_check() - called by mlme to check the wapiie
|
|
|
* @crypto_params: crypto params
|
|
|
* @frm: ie buffer
|
|
|
*
|
|
@@ -381,7 +385,7 @@ QDF_STATUS wlan_crypto_wapiie_check(struct wlan_crypto_params *crypto_params,
|
|
|
const uint8_t *frm);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_build_wapiie - called by mlme to build wapi ie
|
|
|
+ * wlan_crypto_build_wapiie() - called by mlme to build wapi ie
|
|
|
* @vdev: vdev
|
|
|
* @iebuf: ie buffer
|
|
|
*
|
|
@@ -391,10 +395,11 @@ QDF_STATUS wlan_crypto_wapiie_check(struct wlan_crypto_params *crypto_params,
|
|
|
*/
|
|
|
uint8_t *wlan_crypto_build_wapiie(struct wlan_objmgr_vdev *vdev,
|
|
|
uint8_t *iebuf);
|
|
|
+
|
|
|
/**
|
|
|
- * wlan_crypto_rsn_info - check is given params matching with vdev params.
|
|
|
+ * wlan_crypto_rsn_info() - check is given params matching with vdev params.
|
|
|
* @vdev: vdev
|
|
|
- * @crypto params: crypto params
|
|
|
+ * @crypto_params: crypto params
|
|
|
*
|
|
|
* This function gets called by mlme to check is given params matching with
|
|
|
* vdev params.
|
|
@@ -403,8 +408,9 @@ uint8_t *wlan_crypto_build_wapiie(struct wlan_objmgr_vdev *vdev,
|
|
|
*/
|
|
|
bool wlan_crypto_rsn_info(struct wlan_objmgr_vdev *vdev,
|
|
|
struct wlan_crypto_params *crypto_params);
|
|
|
+
|
|
|
/**
|
|
|
- * wlan_crypto_pn_check - called by data patch for PN check
|
|
|
+ * wlan_crypto_pn_check() - called by data patch for PN check
|
|
|
* @vdev: vdev
|
|
|
* @wbuf: wbuf
|
|
|
*
|
|
@@ -414,8 +420,9 @@ bool wlan_crypto_rsn_info(struct wlan_objmgr_vdev *vdev,
|
|
|
*/
|
|
|
QDF_STATUS wlan_crypto_pn_check(struct wlan_objmgr_vdev *vdev,
|
|
|
qdf_nbuf_t wbuf);
|
|
|
+
|
|
|
/**
|
|
|
- * wlan_crypto_vdev_get_crypto_params - called by mlme to get crypto params
|
|
|
+ * wlan_crypto_vdev_get_crypto_params() - called by mlme to get crypto params
|
|
|
* @vdev:vdev
|
|
|
*
|
|
|
* This function gets called by mlme to get crypto params
|
|
@@ -424,8 +431,9 @@ QDF_STATUS wlan_crypto_pn_check(struct wlan_objmgr_vdev *vdev,
|
|
|
*/
|
|
|
struct wlan_crypto_params *wlan_crypto_vdev_get_crypto_params(
|
|
|
struct wlan_objmgr_vdev *vdev);
|
|
|
+
|
|
|
/**
|
|
|
- * wlan_crypto_peer_get_crypto_params - called by mlme to get crypto params
|
|
|
+ * wlan_crypto_peer_get_crypto_params() - called by mlme to get crypto params
|
|
|
* @peer:peer
|
|
|
*
|
|
|
* This function gets called by mlme to get crypto params
|
|
@@ -436,7 +444,7 @@ struct wlan_crypto_params *wlan_crypto_peer_get_crypto_params(
|
|
|
struct wlan_objmgr_peer *peer);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_set_peer_wep_keys - set wep keys into peer entries
|
|
|
+ * wlan_crypto_set_peer_wep_keys() - set wep keys into peer entries
|
|
|
* @vdev:vdev
|
|
|
* @peer:peer
|
|
|
*
|
|
@@ -449,7 +457,7 @@ QDF_STATUS wlan_crypto_set_peer_wep_keys(struct wlan_objmgr_vdev *vdev,
|
|
|
struct wlan_objmgr_peer *peer);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_register_crypto_rx_ops - set crypto_rx_ops
|
|
|
+ * wlan_crypto_register_crypto_rx_ops() - set crypto_rx_ops
|
|
|
* @crypto_rx_ops: crypto_rx_ops
|
|
|
*
|
|
|
* This function gets called by object manager to register crypto rx ops.
|
|
@@ -460,7 +468,7 @@ QDF_STATUS wlan_crypto_register_crypto_rx_ops(
|
|
|
struct wlan_lmac_if_crypto_rx_ops *crypto_rx_ops);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_get_crypto_rx_ops - get crypto_rx_ops from psoc
|
|
|
+ * wlan_crypto_get_crypto_rx_ops() - get crypto_rx_ops from psoc
|
|
|
* @psoc: psoc
|
|
|
*
|
|
|
* This function gets called by umac to get the crypto_rx_ops
|
|
@@ -469,12 +477,13 @@ QDF_STATUS wlan_crypto_register_crypto_rx_ops(
|
|
|
*/
|
|
|
struct wlan_lmac_if_crypto_rx_ops *wlan_crypto_get_crypto_rx_ops(
|
|
|
struct wlan_objmgr_psoc *psoc);
|
|
|
+
|
|
|
/**
|
|
|
- * wlan_crypto_vdev_has_auth_mode - check authmode for vdev
|
|
|
+ * wlan_crypto_vdev_has_auth_mode() - check authmode for vdev
|
|
|
* @vdev: vdev
|
|
|
- * @authvalue: authvalue to be checked
|
|
|
+ * @authmode: authmode value to be checked
|
|
|
*
|
|
|
- * This function check is authvalue passed is set in vdev or not
|
|
|
+ * This function checks if authmode passed is set in vdev or not
|
|
|
*
|
|
|
* Return: true or false
|
|
|
*/
|
|
@@ -482,7 +491,7 @@ bool wlan_crypto_vdev_has_auth_mode(struct wlan_objmgr_vdev *vdev,
|
|
|
wlan_crypto_auth_mode authmode);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_peer_has_auth_mode - check authmode for peer
|
|
|
+ * wlan_crypto_peer_has_auth_mode() - check authmode for peer
|
|
|
* @peer: peer
|
|
|
* @authvalue: authvalue to be checked
|
|
|
*
|
|
@@ -494,7 +503,7 @@ bool wlan_crypto_peer_has_auth_mode(struct wlan_objmgr_peer *peer,
|
|
|
wlan_crypto_auth_mode authvalue);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_vdev_has_ucastcipher - check ucastcipher for vdev
|
|
|
+ * wlan_crypto_vdev_has_ucastcipher() - check ucastcipher for vdev
|
|
|
* @vdev: vdev
|
|
|
* @ucastcipher: ucastcipher to be checked
|
|
|
*
|
|
@@ -506,7 +515,7 @@ bool wlan_crypto_vdev_has_ucastcipher(struct wlan_objmgr_vdev *vdev,
|
|
|
wlan_crypto_cipher_type ucastcipher);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_peer_has_ucastcipher - check ucastcipher for peer
|
|
|
+ * wlan_crypto_peer_has_ucastcipher() - check ucastcipher for peer
|
|
|
* @peer: peer
|
|
|
* @ucastcipher: ucastcipher to be checked
|
|
|
*
|
|
@@ -519,7 +528,7 @@ bool wlan_crypto_peer_has_ucastcipher(struct wlan_objmgr_peer *peer,
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_vdev_has_mcastcipher - check mcastcipher for vdev
|
|
|
+ * wlan_crypto_vdev_has_mcastcipher() - check mcastcipher for vdev
|
|
|
* @vdev: vdev
|
|
|
* @mcastcipher: mcastcipher to be checked
|
|
|
*
|
|
@@ -531,7 +540,7 @@ bool wlan_crypto_vdev_has_mcastcipher(struct wlan_objmgr_vdev *vdev,
|
|
|
wlan_crypto_cipher_type mcastcipher);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_peer_has_mcastcipher - check mcastcipher for peer
|
|
|
+ * wlan_crypto_peer_has_mcastcipher() - check mcastcipher for peer
|
|
|
* @peer: peer
|
|
|
* @mcastcipher: mcastcipher to be checked
|
|
|
*
|
|
@@ -543,7 +552,7 @@ bool wlan_crypto_peer_has_mcastcipher(struct wlan_objmgr_peer *peer,
|
|
|
wlan_crypto_cipher_type mcastcipher);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_vdev_has_mgmtcipher - check mgmtcipher for vdev
|
|
|
+ * wlan_crypto_vdev_has_mgmtcipher() - check mgmtcipher for vdev
|
|
|
* @vdev: vdev
|
|
|
* @mgmtcipher: mgmtcipher to be checked
|
|
|
*
|
|
@@ -555,7 +564,7 @@ bool wlan_crypto_vdev_has_mgmtcipher(struct wlan_objmgr_vdev *vdev,
|
|
|
uint32_t mgmtcipher);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_peer_has_mgmtcipher - check mgmtcipher for peer
|
|
|
+ * wlan_crypto_peer_has_mgmtcipher() - check mgmtcipher for peer
|
|
|
* @peer: peer
|
|
|
* @mgmtcipher: mgmtcipher to be checked
|
|
|
*
|
|
@@ -567,18 +576,17 @@ bool wlan_crypto_peer_has_mgmtcipher(struct wlan_objmgr_peer *peer,
|
|
|
uint32_t mgmtcipher);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_get_keytype - get keytype
|
|
|
+ * wlan_crypto_get_key_type() - get keytype
|
|
|
* @key: key
|
|
|
*
|
|
|
* This function gets keytype from key
|
|
|
*
|
|
|
* Return: keytype
|
|
|
*/
|
|
|
-wlan_crypto_cipher_type wlan_crypto_get_key_type(
|
|
|
- struct wlan_crypto_key *key);
|
|
|
+wlan_crypto_cipher_type wlan_crypto_get_key_type(struct wlan_crypto_key *key);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_vdev_getkey - get key from vdev
|
|
|
+ * wlan_crypto_vdev_getkey() - get key from vdev
|
|
|
* @vdev: vdev
|
|
|
* @keyix: keyix
|
|
|
*
|
|
@@ -588,8 +596,9 @@ wlan_crypto_cipher_type wlan_crypto_get_key_type(
|
|
|
*/
|
|
|
struct wlan_crypto_key *wlan_crypto_vdev_getkey(struct wlan_objmgr_vdev *vdev,
|
|
|
uint16_t keyix);
|
|
|
+
|
|
|
/**
|
|
|
- * wlan_crypto_peer_getkey - get key from peer
|
|
|
+ * wlan_crypto_peer_getkey() - get key from peer
|
|
|
* @peer: peer
|
|
|
* @keyix: keyix
|
|
|
*
|
|
@@ -599,8 +608,9 @@ struct wlan_crypto_key *wlan_crypto_vdev_getkey(struct wlan_objmgr_vdev *vdev,
|
|
|
*/
|
|
|
struct wlan_crypto_key *wlan_crypto_peer_getkey(struct wlan_objmgr_peer *peer,
|
|
|
uint16_t keyix);
|
|
|
+
|
|
|
/**
|
|
|
- * wlan_crypto_get_peer_fils_aead - Get peer fils aead set flag
|
|
|
+ * wlan_crypto_get_peer_fils_aead() - Get peer fils aead set flag
|
|
|
* @peer: Peer object
|
|
|
*
|
|
|
* This function returns the peer fils aead set flag value.
|
|
@@ -610,7 +620,7 @@ struct wlan_crypto_key *wlan_crypto_peer_getkey(struct wlan_objmgr_peer *peer,
|
|
|
uint8_t wlan_crypto_get_peer_fils_aead(struct wlan_objmgr_peer *peer);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_set_peer_fils_aead - Set peer fils aead set flag
|
|
|
+ * wlan_crypto_set_peer_fils_aead() - Set peer fils aead set flag
|
|
|
* @peer: Peer object
|
|
|
* @value: Value to set the flag
|
|
|
*
|
|
@@ -622,7 +632,7 @@ void wlan_crypto_set_peer_fils_aead(
|
|
|
struct wlan_objmgr_peer *peer, uint8_t value);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_get_key_header - get header length
|
|
|
+ * wlan_crypto_get_key_header() - get header length
|
|
|
* @key: key
|
|
|
*
|
|
|
* This function gets header length based on keytype
|
|
@@ -632,7 +642,7 @@ void wlan_crypto_set_peer_fils_aead(
|
|
|
uint8_t wlan_crypto_get_key_header(struct wlan_crypto_key *key);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_get_key_trailer - get cipher trailer length
|
|
|
+ * wlan_crypto_get_key_trailer() - get cipher trailer length
|
|
|
* @key: key
|
|
|
*
|
|
|
* This function gets cipher trailer length based on keytype
|
|
@@ -642,7 +652,7 @@ uint8_t wlan_crypto_get_key_header(struct wlan_crypto_key *key);
|
|
|
uint8_t wlan_crypto_get_key_trailer(struct wlan_crypto_key *key);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_get_key_miclen - get cipher miclen length
|
|
|
+ * wlan_crypto_get_key_miclen() - get cipher miclen length
|
|
|
* @key: key
|
|
|
*
|
|
|
* This function gets cipher miclen length based on keytype
|
|
@@ -652,7 +662,7 @@ uint8_t wlan_crypto_get_key_trailer(struct wlan_crypto_key *key);
|
|
|
uint8_t wlan_crypto_get_key_miclen(struct wlan_crypto_key *key);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_get_keyid - get keyid from frame
|
|
|
+ * wlan_crypto_get_keyid() - get keyid from frame
|
|
|
* @data: frame
|
|
|
* @hdrlen: 802.11 header length
|
|
|
*
|
|
@@ -663,7 +673,7 @@ uint8_t wlan_crypto_get_key_miclen(struct wlan_crypto_key *key);
|
|
|
uint16_t wlan_crypto_get_keyid(uint8_t *data, int hdrlen);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_restore_keys - restore crypto keys in hw keycache
|
|
|
+ * wlan_crypto_restore_keys() - restore crypto keys in hw keycache
|
|
|
* @vdev: vdev
|
|
|
*
|
|
|
* This function restores keys in hw keycache
|
|
@@ -673,7 +683,7 @@ uint16_t wlan_crypto_get_keyid(uint8_t *data, int hdrlen);
|
|
|
void wlan_crypto_restore_keys(struct wlan_objmgr_vdev *vdev);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_check_rsn_match - called by ucfg to check for RSN match
|
|
|
+ * wlan_crypto_check_rsn_match() - called by ucfg to check for RSN match
|
|
|
* @psoc: psoc pointer
|
|
|
* @vdev_id: vdev id
|
|
|
* @ie_ptr: pointer to IEs
|
|
@@ -685,12 +695,12 @@ void wlan_crypto_restore_keys(struct wlan_objmgr_vdev *vdev);
|
|
|
* Return: true or false
|
|
|
*/
|
|
|
bool wlan_crypto_check_rsn_match(struct wlan_objmgr_psoc *psoc,
|
|
|
- uint8_t vedv_id, uint8_t *ie_ptr,
|
|
|
+ uint8_t vdev_id, uint8_t *ie_ptr,
|
|
|
uint16_t ie_len, struct wlan_crypto_params *
|
|
|
peer_crypto_params);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_check_rsn_match - called by ucfg to check for WPA match
|
|
|
+ * wlan_crypto_check_wpa_match() - called by ucfg to check for WPA match
|
|
|
* @psoc: psoc pointer
|
|
|
* @vdev_id: vdev id
|
|
|
* @ie_ptr: pointer to IEs
|
|
@@ -702,7 +712,7 @@ bool wlan_crypto_check_rsn_match(struct wlan_objmgr_psoc *psoc,
|
|
|
* Return: true or false
|
|
|
*/
|
|
|
bool wlan_crypto_check_wpa_match(struct wlan_objmgr_psoc *psoc,
|
|
|
- uint8_t vedv_id, uint8_t *ie_ptr,
|
|
|
+ uint8_t vdev_id, uint8_t *ie_ptr,
|
|
|
uint16_t ie_len, struct wlan_crypto_params *
|
|
|
peer_crypto_params);
|
|
|
|
|
@@ -717,7 +727,7 @@ const uint8_t *
|
|
|
wlan_crypto_parse_rsnxe_ie(const uint8_t *rsnxe_ie, uint8_t *cap_len);
|
|
|
|
|
|
/**
|
|
|
- * wlan_get_crypto_params_from_wapi_ie - Function to get crypto params
|
|
|
+ * wlan_get_crypto_params_from_wapi_ie() - Function to get crypto params
|
|
|
* from wapi ie
|
|
|
* @crypto_params: return crypto parameters
|
|
|
* @ie_ptr: pointer to IEs
|
|
@@ -743,7 +753,7 @@ wlan_get_crypto_params_from_wapi_ie(struct wlan_crypto_params *crypto_params,
|
|
|
#endif
|
|
|
|
|
|
/**
|
|
|
- * wlan_get_crypto_params_from_wpa_ie - Function to get crypto params
|
|
|
+ * wlan_get_crypto_params_from_wpa_ie() - Function to get crypto params
|
|
|
* from wpa ie
|
|
|
* @crypto_params: return crypto parameters
|
|
|
* @ie_ptr: pointer to IEs
|
|
@@ -759,7 +769,7 @@ wlan_get_crypto_params_from_wpa_ie(struct wlan_crypto_params *crypto_params,
|
|
|
const uint8_t *ie_ptr, uint16_t ie_len);
|
|
|
|
|
|
/**
|
|
|
- * wlan_get_crypto_params_from_rsn_ie - Function to get crypto params
|
|
|
+ * wlan_get_crypto_params_from_rsn_ie() - Function to get crypto params
|
|
|
* from rsn ie
|
|
|
* @crypto_params: return crypto parameters
|
|
|
* @ie_ptr: pointer to IEs
|
|
@@ -775,7 +785,7 @@ wlan_get_crypto_params_from_rsn_ie(struct wlan_crypto_params *crypto_params,
|
|
|
const uint8_t *ie_ptr, uint16_t ie_len);
|
|
|
|
|
|
/**
|
|
|
- * wlan_set_vdev_crypto_prarams_from_ie - Sets vdev crypto params from IE info
|
|
|
+ * wlan_set_vdev_crypto_prarams_from_ie() - Sets vdev crypto params from IE info
|
|
|
* @vdev: vdev pointer
|
|
|
* @ie_ptr: pointer to IE
|
|
|
* @ie_len: IE length
|
|
@@ -910,7 +920,7 @@ QDF_STATUS wlan_crypto_set_key_req(struct wlan_objmgr_vdev *vdev,
|
|
|
enum wlan_crypto_key_type key_type);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_free_vdev_key - Free keys for vdev
|
|
|
+ * wlan_crypto_free_vdev_key() - Free keys for vdev
|
|
|
* @vdev: vdev object
|
|
|
*
|
|
|
* This function frees keys stored in vdev crypto object.
|
|
@@ -920,7 +930,7 @@ QDF_STATUS wlan_crypto_set_key_req(struct wlan_objmgr_vdev *vdev,
|
|
|
void wlan_crypto_free_vdev_key(struct wlan_objmgr_vdev *vdev);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_reset_vdev_params - Reset params for vdev
|
|
|
+ * wlan_crypto_reset_vdev_params() - Reset params for vdev
|
|
|
* @vdev: vdev object
|
|
|
*
|
|
|
* This function reset params stored in vdev crypto object.
|
|
@@ -994,7 +1004,7 @@ wlan_crypto_get_peer_pmksa(struct wlan_objmgr_vdev *vdev,
|
|
|
struct wlan_crypto_pmksa *pmksa);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_get_pmksa - called to get pmksa of bssid passed.
|
|
|
+ * wlan_crypto_get_pmksa() - called to get pmksa of bssid passed.
|
|
|
* @vdev: vdev
|
|
|
* @bssid: bssid
|
|
|
*
|
|
@@ -1007,7 +1017,7 @@ wlan_crypto_get_pmksa(struct wlan_objmgr_vdev *vdev,
|
|
|
struct qdf_mac_addr *bssid);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_get_fils_pmksa - Get the PMKSA for FILS
|
|
|
+ * wlan_crypto_get_fils_pmksa() - Get the PMKSA for FILS
|
|
|
* SSID, if the SSID and cache id matches
|
|
|
* @vdev: Pointer with VDEV object
|
|
|
* @cache_id: Cache id
|
|
@@ -1022,7 +1032,7 @@ wlan_crypto_get_fils_pmksa(struct wlan_objmgr_vdev *vdev,
|
|
|
uint8_t ssid_len);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_pmksa_flush - called to flush saved pmksa
|
|
|
+ * wlan_crypto_pmksa_flush() - called to flush saved pmksa
|
|
|
* @crypto_params: crypto_params
|
|
|
*
|
|
|
* This function flush saved pmksa from crypto params.
|
|
@@ -1032,7 +1042,7 @@ wlan_crypto_get_fils_pmksa(struct wlan_objmgr_vdev *vdev,
|
|
|
QDF_STATUS wlan_crypto_pmksa_flush(struct wlan_crypto_params *crypto_params);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_set_vdev_param - called by ucfg to set crypto param
|
|
|
+ * wlan_crypto_set_del_pmksa() - called by ucfg to set/delete PMKSA
|
|
|
* @vdev: vdev
|
|
|
* @pmksa: pmksa to be set/del.
|
|
|
* @set: set(set=1) or del(set=0) pmksa from the list.
|
|
@@ -1047,7 +1057,7 @@ QDF_STATUS wlan_crypto_set_del_pmksa(struct wlan_objmgr_vdev *vdev,
|
|
|
bool set);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_update_pmk_cache_ft - Updates the mobility domain information
|
|
|
+ * wlan_crypto_update_pmk_cache_ft() - Updates the mobility domain information
|
|
|
* for a BSSID in the PMKSA Cache table.
|
|
|
* @vdev: vdev
|
|
|
* @pmksa: pmksa to be updated.
|
|
@@ -1062,7 +1072,7 @@ QDF_STATUS wlan_crypto_update_pmk_cache_ft(struct wlan_objmgr_vdev *vdev,
|
|
|
|
|
|
#if defined(WLAN_SAE_SINGLE_PMK) && defined(WLAN_FEATURE_ROAM_OFFLOAD)
|
|
|
/**
|
|
|
- * wlan_crypto_selective_clear_sae_single_pmk_entries - Clear the PMK entries
|
|
|
+ * wlan_crypto_selective_clear_sae_single_pmk_entries() - Clear the PMK entries
|
|
|
* for BSS which have the single PMK flag set other than the current connected
|
|
|
* AP
|
|
|
* @vdev: Vdev
|
|
@@ -1073,7 +1083,7 @@ wlan_crypto_selective_clear_sae_single_pmk_entries(
|
|
|
struct wlan_objmgr_vdev *vdev, struct qdf_mac_addr *conn_bssid);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_set_sae_single_pmk_bss_cap - Set the peer SAE single pmk
|
|
|
+ * wlan_crypto_set_sae_single_pmk_bss_cap() - Set the peer SAE single pmk
|
|
|
* feature supported status
|
|
|
* @vdev: Vdev
|
|
|
* @bssid: BSSID for which the flag is to be set
|
|
@@ -1085,7 +1095,7 @@ void wlan_crypto_set_sae_single_pmk_bss_cap(struct wlan_objmgr_vdev *vdev,
|
|
|
bool single_pmk_capable_bss);
|
|
|
|
|
|
/**
|
|
|
- * wlan_crypto_set_sae_single_pmk_bss_cap - Set the peer SAE single pmk info
|
|
|
+ * wlan_crypto_set_sae_single_pmk_info() - Set the peer SAE single pmk info
|
|
|
* @vdev: Vdev
|
|
|
* @roam_sync_pmksa: pmk info for roamed AP
|
|
|
*/
|
|
@@ -1129,7 +1139,7 @@ wlan_crypto_set_ltf_keyseed(struct wlan_objmgr_psoc *psoc,
|
|
|
|
|
|
#ifdef WLAN_FEATURE_FILS_SK
|
|
|
/**
|
|
|
- * lim_create_fils_rik()- This API create rik using rrk coming from
|
|
|
+ * wlan_crypto_create_fils_rik() - This API create rik using rrk coming from
|
|
|
* supplicant.
|
|
|
* @rrk: input rrk
|
|
|
* @rrk_len: rrk length
|