Преглед изворни кода

qcacmn: Fix umac/cmn_services/crypto documentation

The kernel-doc script identified some documentation issues in the
umac/cmn_services/crypto folder, so fix them. In addition there are
multiple instances of both the interface and the implementation being
documented, so remove the duplicates, keeping just the interface
documentation.

Change-Id: Ied5bfcdff185d0b144f8c41affb5adcb3b8a5b88
CRs-Fixed: 3394398
Jeff Johnson пре 2 година
родитељ
комит
b0fa96084a

+ 93 - 83
umac/cmn_services/crypto/inc/wlan_crypto_global_api.h

@@ -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

+ 17 - 17
umac/cmn_services/crypto/inc/wlan_crypto_global_def.h

@@ -17,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
- /**
+/**
  * DOC: Public definitions  for crypto service
  */
 
@@ -190,13 +190,13 @@ typedef enum wlan_crypto_rsn_cap {
 } wlan_crypto_rsn_cap;
 
 /**
- * wlan_crypto_rsnx_cap - RSNXE capabilities
- * WLAN_CRYPTO_RSNX_CAP_PROTECTED_TWT: Protected TWT
- * WLAN_CRYPTO_RSNX_CAP_SAE_H2E: SAE Hash to Element
- * WLAN_CRYPTO_RSNX_CAP_SAE_PK: SAE PK
- * WLAN_CRYPTO_RSNX_CAP_SECURE_LTF: Secure LTF
- * WLAN_CRYPTO_RSNX_CAP_SECURE_RTT: Secure RTT
- * WLAN_CRYPTO_RSNX_CAP_URNM_MFPR: Unassociated Range
+ * enum wlan_crypto_rsnx_cap - RSNXE capabilities
+ * @WLAN_CRYPTO_RSNX_CAP_PROTECTED_TWT: Protected TWT
+ * @WLAN_CRYPTO_RSNX_CAP_SAE_H2E: SAE Hash to Element
+ * @WLAN_CRYPTO_RSNX_CAP_SAE_PK: SAE PK
+ * @WLAN_CRYPTO_RSNX_CAP_SECURE_LTF: Secure LTF
+ * @WLAN_CRYPTO_RSNX_CAP_SECURE_RTT: Secure RTT
+ * @WLAN_CRYPTO_RSNX_CAP_URNM_MFPR: Unassociated Range
  * Negotiation and Measurement MFP Required
  *
  * Definition: (IEEE Std 802.11-2020, 9.4.2.241, Table 9-780)
@@ -216,7 +216,7 @@ enum wlan_crypto_rsnx_cap {
 };
 
 /**
- * wlan_crypto_vdev_pasn_caps  - PASN peer related vdev
+ * enum wlan_crypto_vdev_pasn_caps  - PASN peer related vdev
  * crypto parameters
  * @WLAN_CRYPTO_URNM_MFPR: URNM MFP required in RSNXE
  * @WLAN_CRYPTO_MFPC: MFP capable bit from RSN IE
@@ -335,7 +335,7 @@ struct wlan_crypto_pmksa {
 
 #ifdef WLAN_ADAPTIVE_11R
 /**
- * struct wlan_crypto_pmksa - structure to store AKM(s) present in RSN IE of
+ * struct key_mgmt_list - structure to store AKM(s) present in RSN IE of
  * Beacon/Probe response
  * @key_mgmt: AKM(s) present in RSN IE of Beacon/Probe response
  */
@@ -409,7 +409,7 @@ typedef enum wlan_crypto_param_type {
  * @keyix:          key id
  * @cipher_type:    cipher type being used for this key
  * @key_type:       unicast or broadcast key
- * @mac_addr:       MAC address of the peer
+ * @macaddr:        MAC address of the peer
  * @src_addr:       Source mac address associated with the key
  * @cipher_table:   table which stores cipher related info
  * @private:        private pointer to save cipher context
@@ -463,7 +463,7 @@ struct wlan_crypto_key {
  * @keytsc:                     key transmit sequence counter
  * @keydata:                    key value
  * @txiv:                       wapi key tx iv
- * @rxiv:                       wapi key rx iv
+ * @recviv:                     wapi key rx iv
  * @filsaad:                    FILS AEAD data
  *
  * Key request structure used for setkey, getkey or delkey
@@ -499,7 +499,6 @@ struct wlan_crypto_req_key {
  * @register_events: function pointer to register wmi event handler
  * @deregister_events: function pointer to deregister wmi event handler
  */
-
 struct wlan_lmac_if_crypto_tx_ops {
 	QDF_STATUS (*allockey)(struct wlan_objmgr_vdev *vdev,
 			       struct wlan_crypto_key *key,
@@ -529,10 +528,11 @@ struct wlan_lmac_if_crypto_tx_ops {
 /**
  * struct wlan_lmac_if_crypto_rx_ops - structure of crypto rx  function
  *                  pointers
- * @encap: function pointer to encap tx frame
- * @decap:  function pointer to decap rx frame in hw
- * @enmic: function pointer to enmic tx frame
- * @demic: function pointer to demic rx frame
+ * @crypto_encap: function pointer to encap tx frame
+ * @crypto_decap:  function pointer to decap rx frame in hw
+ * @crypto_enmic: function pointer to enmic tx frame
+ * @crypto_demic: function pointer to demic rx frame
+ * @set_peer_wep_keys: function pointer to set WEP keys
  * @get_rxpn: function pointer to get current Rx pn value of peer
  */
 

+ 8 - 7
umac/cmn_services/crypto/inc/wlan_crypto_main.h

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2017-2018, 2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 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
@@ -16,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
- /**
+/**
  * DOC: Private API for crypto service with object manager handler
  */
 #ifndef _WLAN_CRYPTO_MAIN_H_
@@ -24,16 +25,16 @@
 #include "wlan_crypto_global_def.h"
 
 /**
- * wlan_crypto_init - Init the crypto service with object manager
- *                    Called from umac init context.
+ * wlan_crypto_init() - Init the crypto service with object manager
+ *                      Called from umac init context.
  *
  * Return: QDF_STATUS_SUCCESS - in case of success
  */
 QDF_STATUS wlan_crypto_init(void);
 
 /**
- * wlan_crypto_deinit - Deinit the crypto service with object manager
- *                    Called from umac deinit context.
+ * wlan_crypto_deinit() - Deinit the crypto service with object manager
+ *                        Called from umac deinit context.
  *
  * Return: QDF_STATUS_SUCCESS - in case of success
  */
@@ -41,7 +42,7 @@ QDF_STATUS wlan_crypto_deinit(void);
 
 #ifdef CRYPTO_SET_KEY_CONVERGED
 /**
- * wlan_crypto_psoc_enable: psoc enable API for wlan crypto component
+ * wlan_crypto_psoc_enable() - psoc enable API for wlan crypto component
  * @psoc: pointer to PSOC
  *
  * Return: status of operation
@@ -49,7 +50,7 @@ QDF_STATUS wlan_crypto_deinit(void);
 QDF_STATUS wlan_crypto_psoc_enable(struct wlan_objmgr_psoc *psoc);
 
 /**
- * wlan_crypto_psoc_disable: psoc disable API for wlan crypto component
+ * wlan_crypto_psoc_disable() - psoc disable API for wlan crypto component
  * @psoc: pointer to PSOC
  *
  * Return: status of operation

+ 5 - 5
umac/cmn_services/crypto/src/wlan_crypto_def_i.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-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: Private definitions for handling crypto params
  */
 #ifndef _WLAN_CRYPTO_DEF_I_H_
@@ -398,9 +398,9 @@ typedef void (*crypto_add_key_callback)(void *context,
  * @bigtk_key:        bigtk key buffer for this peer
  * @igtk_key_type:    igtk key type
  * @def_tx_keyid:     default key used for this peer
- * @def_igtk_tx_keyid default igtk key used for this peer
- * @def_bigtk_tx_keyid default bigtk key used for this peer
- * @fils_aead_set     fils params for this peer
+ * @def_igtk_tx_keyid: default igtk key used for this peer
+ * @def_bigtk_tx_keyid: default bigtk key used for this peer
+ * @fils_aead_set:    fils params for this peer
  * @add_key_ctx: Opaque context to be used by the caller to associate the
  *  add key request with the response
  * @add_key_cb: Callback function to be called with the add key result

+ 16 - 434
umac/cmn_services/crypto/src/wlan_crypto_global_api.c

@@ -17,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
- /**
+/**
  * DOC: Public APIs for crypto service
  */
 
@@ -89,8 +89,9 @@ static int is_bigtk(uint16_t keyix)
 }
 
 /**
- * wlan_crypto_vdev_get_crypto_params - called by mlme to get crypto params
- * @vdev:vdev
+ * wlan_crypto_vdev_get_comp_params() - called by mlme to get crypto params
+ * @vdev: vdev
+ * @crypto_priv: location to store pointer to the crypto private data
  *
  * This function gets called by mlme to get crypto params
  *
@@ -111,8 +112,9 @@ static struct wlan_crypto_params *wlan_crypto_vdev_get_comp_params(
 }
 
 /**
- * wlan_crypto_peer_get_crypto_params - called by mlme to get crypto params
- * @peer:peer
+ * wlan_crypto_peer_get_comp_params() - called by mlme to get crypto params
+ * @peer: peer
+ * @crypto_priv: location to store pointer to the crypto private data
  *
  * This function gets called by mlme to get crypto params
  *
@@ -139,7 +141,7 @@ static QDF_STATUS wlan_crypto_set_igtk_key(struct wlan_crypto_key *key)
 }
 
 /**
- * wlan_crypto_set_param - called by ucfg to set crypto param
+ * wlan_crypto_set_param() - called by ucfg to set crypto param
  * @crypto_params: crypto_params
  * @param: param to be set.
  * @value: value
@@ -183,16 +185,6 @@ static QDF_STATUS wlan_crypto_set_param(struct wlan_crypto_params *crypto_params
 	return status;
 }
 
-/**
- * wlan_crypto_set_vdev_param - called by ucfg to set crypto param
- * @vdev: vdev
- * @param: param to be set.
- * @value: value
- *
- * This function gets called from ucfg to set param
- *
- * Return: QDF_STATUS_SUCCESS - in case of success
- */
 QDF_STATUS wlan_crypto_set_vdev_param(struct wlan_objmgr_vdev *vdev,
 					wlan_crypto_param_type param,
 					uint32_t value)
@@ -216,17 +208,6 @@ QDF_STATUS wlan_crypto_set_vdev_param(struct wlan_objmgr_vdev *vdev,
 	return status;
 }
 
-/**
- * wlan_crypto_set_param - called by ucfg to set crypto param
- *
- * @peer: peer
- * @param: param to be set.
- * @value: value
- *
- * This function gets called from ucfg to set param
- *
- * Return: QDF_STATUS_SUCCESS - in case of success
- */
 QDF_STATUS wlan_crypto_set_peer_param(struct wlan_objmgr_peer *peer,
 				wlan_crypto_param_type param,
 				uint32_t value)
@@ -251,7 +232,7 @@ QDF_STATUS wlan_crypto_set_peer_param(struct wlan_objmgr_peer *peer,
 }
 
 /**
- * wlan_crypto_get_param_value - called by crypto APIs to get value for param
+ * wlan_crypto_get_param_value() - called by crypto APIs to get value for param
  * @param: Crypto param type
  * @crypto_params: Crypto params struct
  *
@@ -293,15 +274,6 @@ static int32_t wlan_crypto_get_param_value(wlan_crypto_param_type param,
 	return value;
 }
 
-/**
- * wlan_crypto_get_param - called to get value for param from vdev
- * @vdev:  vdev
- * @param: Crypto param type
- *
- * This function gets called to get value for param from vdev
- *
- * Return: value or -1 for failure
- */
 int32_t wlan_crypto_get_param(struct wlan_objmgr_vdev *vdev,
 			      wlan_crypto_param_type param)
 {
@@ -321,15 +293,7 @@ int32_t wlan_crypto_get_param(struct wlan_objmgr_vdev *vdev,
 
 	return value;
 }
-/**
- * wlan_crypto_get_peer_param - called to get value for param from peer
- * @peer:  peer
- * @param: Crypto param type
- *
- * This function gets called to get value for param from peer
- *
- * Return: value or -1 for failure
- */
+
 int32_t wlan_crypto_get_peer_param(struct wlan_objmgr_peer *peer,
 				   wlan_crypto_param_type param)
 {
@@ -713,16 +677,6 @@ wlan_crypto_get_fils_pmksa(struct wlan_objmgr_vdev *vdev,
 	return NULL;
 }
 
-/**
- * wlan_crypto_is_htallowed - called to check is HT allowed for cipher
- * @vdev:  vdev
- * @peer:  peer
- *
- * This function gets called to check is HT allowed for cipher.
- * HT is not allowed for wep and tkip.
- *
- * Return: 0 - not allowed or 1 - allowed
- */
 uint8_t wlan_crypto_is_htallowed(struct wlan_objmgr_vdev *vdev,
 				 struct wlan_objmgr_peer *peer)
 {
@@ -754,15 +708,6 @@ uint8_t wlan_crypto_is_htallowed(struct wlan_objmgr_vdev *vdev,
 }
 qdf_export_symbol(wlan_crypto_is_htallowed);
 
-/**
- * wlan_crypto_setkey - called by ucfg to setkey
- * @vdev: vdev
- * @req_key: req_key with cipher type, key macaddress
- *
- * This function gets called from ucfg to sey key
- *
- * Return: QDF_STATUS_SUCCESS - in case of success
- */
 QDF_STATUS wlan_crypto_setkey(struct wlan_objmgr_vdev *vdev,
 				struct wlan_crypto_req_key *req_key)
 {
@@ -1139,16 +1084,6 @@ err:
 	return status;
 }
 
-/**
- * store_def_keyix_peer - store default keyix
- * @vdev: vdev
- * @object: Peer object
- * @arg: Argument passed by caller
- *
- * This function gets called from wlan_crypto_setkey
- *
- * Return: None
- */
 void store_def_keyix_peer(struct wlan_objmgr_vdev *vdev, void *object,
 			  void *arg)
 {
@@ -1169,14 +1104,6 @@ void store_def_keyix_peer(struct wlan_objmgr_vdev *vdev, void *object,
 
 qdf_export_symbol(store_def_keyix_peer);
 
-/**
- * wlan_crypto_get_keytype - 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)
 {
 	if (key && key->cipher_table) {
@@ -1186,15 +1113,7 @@ wlan_crypto_cipher_type wlan_crypto_get_key_type(struct wlan_crypto_key *key)
 	return WLAN_CRYPTO_CIPHER_NONE;
 }
 qdf_export_symbol(wlan_crypto_get_key_type);
-/**
- * wlan_crypto_vdev_getkey - get key from vdev
- * @vdev: vdev
- * @keyix: keyix
- *
- * This function gets key from vdev
- *
- * Return: key or NULL
- */
+
 struct wlan_crypto_key *wlan_crypto_vdev_getkey(struct wlan_objmgr_vdev *vdev,
 						uint16_t keyix)
 {
@@ -1230,15 +1149,6 @@ struct wlan_crypto_key *wlan_crypto_vdev_getkey(struct wlan_objmgr_vdev *vdev,
 }
 qdf_export_symbol(wlan_crypto_vdev_getkey);
 
-/**
- * wlan_crypto_peer_getkey - get key from peer
- * @peer: peer
- * @keyix: keyix
- *
- * This function gets key from peer
- *
- * Return: key or NULL
- */
 struct wlan_crypto_key *wlan_crypto_peer_getkey(struct wlan_objmgr_peer *peer,
 						uint16_t keyix)
 {
@@ -1275,17 +1185,6 @@ struct wlan_crypto_key *wlan_crypto_peer_getkey(struct wlan_objmgr_peer *peer,
 }
 qdf_export_symbol(wlan_crypto_peer_getkey);
 
-/**
- * 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.
- *
- * This function gets called from ucfg to get key
- *
- * Return: QDF_STATUS_SUCCESS - in case of success
- */
 QDF_STATUS wlan_crypto_getkey(struct wlan_objmgr_vdev *vdev,
 				struct wlan_crypto_req_key *req_key,
 				uint8_t *mac_addr)
@@ -1413,17 +1312,6 @@ err:
 	return status;
 }
 
-/**
- * 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.
- * @key_idx: key index to be deleted
- *
- * This function gets called from ucfg to delete key
- *
- * Return: QDF_STATUS_SUCCESS - in case of success
- */
 QDF_STATUS wlan_crypto_delkey(struct wlan_objmgr_vdev *vdev,
 				uint8_t *macaddr,
 				uint8_t key_idx)
@@ -1578,18 +1466,6 @@ static QDF_STATUS wlan_crypto_set_default_key(struct wlan_objmgr_vdev *vdev,
 }
 #endif
 
-/**
- * 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.
- * @key_idx: key index to be made as default key
- * @unicast: is key was unicast or group key.
- *
- * This function gets called from ucfg to set default key
- *
- * Return: QDF_STATUS_SUCCESS - in case of success
- */
 QDF_STATUS wlan_crypto_default_key(struct wlan_objmgr_vdev *vdev,
 					uint8_t *macaddr,
 					uint8_t key_idx,
@@ -1668,17 +1544,6 @@ QDF_STATUS wlan_crypto_default_key(struct wlan_objmgr_vdev *vdev,
 	return QDF_STATUS_SUCCESS;
 }
 
-/**
- * wlan_crypto_encap - called by mgmt for encap the frame based on cipher
- * @vdev: vdev
- * @wbuf: wbuf
- * @macaddr: macaddr
- * @encapdone: is encapdone already or not.
- *
- * This function gets called from mgmt txrx to encap frame.
- *
- * Return: QDF_STATUS_SUCCESS - in case of success
- */
 QDF_STATUS wlan_crypto_encap(struct wlan_objmgr_vdev *vdev,
 				qdf_nbuf_t wbuf,
 				uint8_t *mac_addr,
@@ -1777,17 +1642,6 @@ err:
 }
 qdf_export_symbol(wlan_crypto_encap);
 
-/**
- * wlan_crypto_decap - called by mgmt for decap the frame based on cipher
- * @vdev: vdev
- * @wbuf: wbuf
- * @macaddr: macaddr
- * @tid: tid of the frame
- *
- * This function gets called from mgmt txrx to decap frame.
- *
- * Return: QDF_STATUS_SUCCESS - in case of success
- */
 QDF_STATUS wlan_crypto_decap(struct wlan_objmgr_vdev *vdev,
 				qdf_nbuf_t wbuf,
 				uint8_t *mac_addr,
@@ -1896,17 +1750,7 @@ err:
 	return status;
 }
 qdf_export_symbol(wlan_crypto_decap);
-/**
- * wlan_crypto_enmic - called by mgmt for adding mic in frame based on cipher
- * @vdev: vdev
- * @wbuf: wbuf
- * @macaddr: macaddr
- * @encapdone: is encapdone already or not.
- *
- * This function gets called from mgmt txrx to adding mic to the frame.
- *
- * Return: QDF_STATUS_SUCCESS - in case of success
- */
+
 QDF_STATUS wlan_crypto_enmic(struct wlan_objmgr_vdev *vdev,
 				qdf_nbuf_t wbuf,
 				uint8_t *mac_addr,
@@ -1988,18 +1832,6 @@ QDF_STATUS wlan_crypto_enmic(struct wlan_objmgr_vdev *vdev,
 	return status;
 }
 
-/**
- * wlan_crypto_demic - called by mgmt for remove and check mic for
- *			                        the frame based on cipher
- * @vdev: vdev
- * @wbuf: wbuf
- * @macaddr: macaddr
- * @tid: tid of the frame
- * @keyid: keyid in the received frame
- * This function gets called from mgmt txrx to decap frame.
- *
- * Return: QDF_STATUS_SUCCESS - in case of success
- */
 QDF_STATUS wlan_crypto_demic(struct wlan_objmgr_vdev *vdev,
 			     qdf_nbuf_t wbuf,
 			     uint8_t *mac_addr,
@@ -2081,14 +1913,6 @@ QDF_STATUS wlan_crypto_demic(struct wlan_objmgr_vdev *vdev,
 	return status;
 }
 
-/**
- * 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.
- *
- * Return: true or false
- */
 bool wlan_crypto_vdev_is_pmf_enabled(struct wlan_objmgr_vdev *vdev)
 {
 
@@ -2114,14 +1938,6 @@ bool wlan_crypto_vdev_is_pmf_enabled(struct wlan_objmgr_vdev *vdev)
 	return false;
 }
 
-/**
- * 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.
- *
- * Return: true or false
- */
 bool wlan_crypto_vdev_is_pmf_required(struct wlan_objmgr_vdev *vdev)
 {
 	struct wlan_crypto_comp_priv *crypto_priv;
@@ -2143,15 +1959,6 @@ bool wlan_crypto_vdev_is_pmf_required(struct wlan_objmgr_vdev *vdev)
 	return false;
 }
 
-/**
- * wlan_crypto_is_pmf_enabled - called by mgmt txrx to check is pmf enabled
- * @vdev: vdev
- * @peer: peer
- *
- * This function gets called by mgmt txrx to check is pmf enabled or not.
- *
- * Return: true or false
- */
 bool wlan_crypto_is_pmf_enabled(struct wlan_objmgr_vdev *vdev,
 				struct wlan_objmgr_peer *peer)
 {
@@ -2186,16 +1993,6 @@ bool wlan_crypto_is_pmf_enabled(struct wlan_objmgr_vdev *vdev,
 	return false;
 }
 
-/**
- * wlan_crypto_is_key_valid - called by mgmt txrx to check if key is valid
- * @vdev: vdev
- * @peer: peer
- * @keyidx : key index
- *
- * This function gets called by mgmt txrx to check if key is valid
- *
- * Return: true or false
- */
 bool wlan_crypto_is_key_valid(struct wlan_objmgr_vdev *vdev,
 			      struct wlan_objmgr_peer *peer,
 			      uint16_t keyidx)
@@ -2226,16 +2023,6 @@ static void wlan_crypto_gmac_pn_swap(uint8_t *a, uint8_t *b)
 	a[5] = b[0];
 }
 
-/**
- * wlan_crypto_add_mmie - called by mgmt txrx to add mmie in frame
- * @vdev: vdev
- * @bfrm:  frame starting pointer
- * @len:  length of the frame
- *
- * This function gets called by mgmt txrx to add mmie in frame
- *
- * Return: end of frame or NULL in case failure
- */
 uint8_t *wlan_crypto_add_mmie(struct wlan_objmgr_vdev *vdev,
 				uint8_t *bfrm,
 				uint32_t len)
@@ -2362,16 +2149,6 @@ uint8_t *wlan_crypto_add_mmie(struct wlan_objmgr_vdev *vdev,
 }
 
 #define MAX_MIC_LEN 16
-/**
- * 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
- *
- * This function gets called by mgmt txrx to check mmie of the frame
- *
- * Return: true or false
- */
 bool wlan_crypto_is_mmie_valid(struct wlan_objmgr_vdev *vdev,
 					uint8_t *frm,
 					uint8_t *efrm)
@@ -2643,7 +2420,8 @@ wlan_crypto_wpa_keymgmt_to_suite(uint32_t keymgmt)
 
 	return status;
 }
-/**
+
+/*
  * Convert a WPA cipher selector OUI to an internal
  * cipher algorithm.  Where appropriate we also
  * record any key length.
@@ -2856,7 +2634,7 @@ QDF_STATUS wlan_crypto_wpaie_check(struct wlan_crypto_params *crypto_params,
 
 #ifdef WLAN_ADAPTIVE_11R
 /**
- * wlan_crypto_akm_list_in_order - store AMK list in order
+ * wlan_crypto_store_akm_list_in_order() - store AMK list in order
  * @crypto_params: crypto param structure
  * @key_mgmt: key management
  * @akm_index: place at which AMK present in RSN IE of Beacon/Probe response
@@ -3042,15 +2820,6 @@ QDF_STATUS wlan_crypto_rsnie_check(struct wlan_crypto_params *crypto_params,
 	return QDF_STATUS_SUCCESS;
 }
 
-/**
- * wlan_crypto_build_wpaie - called by mlme to build wpaie
- * @vdev: vdev
- * @iebuf: ie buffer
- *
- * This function gets called by mlme to build wpaie from given vdev
- *
- * Return: end of buffer
- */
 uint8_t *wlan_crypto_build_wpaie(struct wlan_objmgr_vdev *vdev,
 					uint8_t *iebuf)
 {
@@ -3494,15 +3263,6 @@ QDF_STATUS wlan_crypto_wapiie_check(struct wlan_crypto_params *crypto_params,
 	return QDF_STATUS_SUCCESS;
 }
 
-/**
- * wlan_crypto_build_wapiie - called by mlme to build wapi ie
- * @vdev: vdev
- * @iebuf: ie buffer
- *
- * This function gets called by mlme to build wapi ie from given vdev
- *
- * Return: end of buffer
- */
 uint8_t *wlan_crypto_build_wapiie(struct wlan_objmgr_vdev *vdev,
 				uint8_t *iebuf)
 {
@@ -3573,15 +3333,6 @@ uint8_t *wlan_crypto_build_wapiie(struct wlan_objmgr_vdev *vdev,
 
 }
 
-/**
- * wlan_crypto_pn_check - called by data patch for PN check
- * @vdev: vdev
- * @wbuf: wbuf
- *
- * This function gets called by data patch for PN check
- *
- * Return: QDF_STATUS
- */
 QDF_STATUS wlan_crypto_pn_check(struct wlan_objmgr_vdev *vdev,
 				qdf_nbuf_t wbuf)
 {
@@ -3591,14 +3342,6 @@ QDF_STATUS wlan_crypto_pn_check(struct wlan_objmgr_vdev *vdev,
 	return QDF_STATUS_SUCCESS;
 }
 
-/**
- * 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
- *
- * Return: wlan_crypto_params or NULL in case of failure
- */
 struct wlan_crypto_params *wlan_crypto_vdev_get_crypto_params(
 						struct wlan_objmgr_vdev *vdev)
 {
@@ -3607,14 +3350,6 @@ struct wlan_crypto_params *wlan_crypto_vdev_get_crypto_params(
 	return wlan_crypto_vdev_get_comp_params(vdev, &crypto_priv);
 }
 
-/**
- * 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
- *
- * Return: wlan_crypto_params or NULL in case of failure
- */
 struct wlan_crypto_params *wlan_crypto_peer_get_crypto_params(
 						struct wlan_objmgr_peer *peer)
 {
@@ -3753,14 +3488,6 @@ exit:
 	return status;
 }
 
-/**
- * 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.
- *
- * Return: QDF_STATUS
- */
 QDF_STATUS wlan_crypto_register_crypto_rx_ops(
 			struct wlan_lmac_if_crypto_rx_ops *crypto_rx_ops)
 {
@@ -3773,14 +3500,6 @@ QDF_STATUS wlan_crypto_register_crypto_rx_ops(
 	return QDF_STATUS_SUCCESS;
 }
 
-/**
- * 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
- *
- * Return: crypto_rx_ops
- */
 struct wlan_lmac_if_crypto_rx_ops *wlan_crypto_get_crypto_rx_ops(
 					struct wlan_objmgr_psoc *psoc)
 {
@@ -3797,15 +3516,6 @@ struct wlan_lmac_if_crypto_rx_ops *wlan_crypto_get_crypto_rx_ops(
 }
 qdf_export_symbol(wlan_crypto_get_crypto_rx_ops);
 
-/**
- * wlan_crypto_vdev_has_auth_mode - check authmode for vdev
- * @vdev: vdev
- * @authvalue: authvalue to be checked
- *
- * This function check is authvalue passed is set in vdev or not
- *
- * Return: true or false
- */
 bool wlan_crypto_vdev_has_auth_mode(struct wlan_objmgr_vdev *vdev,
 					wlan_crypto_auth_mode authvalue)
 {
@@ -3819,15 +3529,6 @@ bool wlan_crypto_vdev_has_auth_mode(struct wlan_objmgr_vdev *vdev,
 }
 qdf_export_symbol(wlan_crypto_vdev_has_auth_mode);
 
-/**
- * wlan_crypto_peer_has_auth_mode - check authmode for peer
- * @peer: peer
- * @authvalue: authvalue to be checked
- *
- * This function check is authvalue passed is set in peer or not
- *
- * Return: true or false
- */
 bool wlan_crypto_peer_has_auth_mode(struct wlan_objmgr_peer *peer,
 					wlan_crypto_auth_mode authvalue)
 {
@@ -3842,15 +3543,6 @@ bool wlan_crypto_peer_has_auth_mode(struct wlan_objmgr_peer *peer,
 }
 qdf_export_symbol(wlan_crypto_peer_has_auth_mode);
 
-/**
- * wlan_crypto_vdev_has_ucastcipher - check ucastcipher for vdev
- * @vdev: vdev
- * @ucastcipher: ucastcipher to be checked
- *
- * This function check is ucastcipher passed is set in vdev or not
- *
- * Return: true or false
- */
 bool wlan_crypto_vdev_has_ucastcipher(struct wlan_objmgr_vdev *vdev,
 					wlan_crypto_cipher_type ucastcipher)
 {
@@ -3865,15 +3557,6 @@ bool wlan_crypto_vdev_has_ucastcipher(struct wlan_objmgr_vdev *vdev,
 }
 qdf_export_symbol(wlan_crypto_vdev_has_ucastcipher);
 
-/**
- * wlan_crypto_peer_has_ucastcipher - check ucastcipher for peer
- * @peer: peer
- * @ucastcipher: ucastcipher to be checked
- *
- * This function check is ucastcipher passed is set in peer or not
- *
- * Return: true or false
- */
 bool wlan_crypto_peer_has_ucastcipher(struct wlan_objmgr_peer *peer,
 					wlan_crypto_cipher_type ucastcipher)
 {
@@ -3888,15 +3571,6 @@ bool wlan_crypto_peer_has_ucastcipher(struct wlan_objmgr_peer *peer,
 }
 qdf_export_symbol(wlan_crypto_peer_has_ucastcipher);
 
-/**
- * wlan_crypto_vdev_has_mcastcipher - check mcastcipher for vdev
- * @vdev: vdev
- * @mcastcipher: mcastcipher to be checked
- *
- * This function check is mcastcipher passed is set in vdev or not
- *
- * Return: true or false
- */
 bool wlan_crypto_vdev_has_mcastcipher(struct wlan_objmgr_vdev *vdev,
 					wlan_crypto_cipher_type mcastcipher)
 {
@@ -3911,15 +3585,6 @@ bool wlan_crypto_vdev_has_mcastcipher(struct wlan_objmgr_vdev *vdev,
 }
 qdf_export_symbol(wlan_crypto_vdev_has_mcastcipher);
 
-/**
- * wlan_crypto_peer_has_mcastcipher - check mcastcipher for peer
- * @peer: peer
- * @mcastcipher: mcastcipher to be checked
- *
- * This function check is mcastcipher passed is set in peer or not
- *
- * Return: true or false
- */
 bool wlan_crypto_peer_has_mcastcipher(struct wlan_objmgr_peer *peer,
 					wlan_crypto_cipher_type mcastcipher)
 {
@@ -3934,15 +3599,6 @@ bool wlan_crypto_peer_has_mcastcipher(struct wlan_objmgr_peer *peer,
 }
 qdf_export_symbol(wlan_crypto_peer_has_mcastcipher);
 
-/**
- * wlan_crypto_vdev_has_mgmtcipher - check mgmtcipher for vdev
- * @vdev: vdev
- * @mgmtcipher: mgmtcipher to be checked
- *
- * This function checks any one of mgmtciphers are supported by vdev or not.
- *
- * Return: true or false
- */
 bool wlan_crypto_vdev_has_mgmtcipher(struct wlan_objmgr_vdev *vdev,
 				     uint32_t mgmtcipher)
 {
@@ -3958,15 +3614,6 @@ bool wlan_crypto_vdev_has_mgmtcipher(struct wlan_objmgr_vdev *vdev,
 
 qdf_export_symbol(wlan_crypto_vdev_has_mgmtcipher);
 
-/**
- * wlan_crypto_peer_has_mgmtcipher - check mgmtcipher for peer
- * @peer: peer
- * @mgmtcipher: mgmtcipher to be checked
- *
- * This function checks any one of mgmtciphers are supported by peer or not
- *
- * Return: true or false
- */
 bool wlan_crypto_peer_has_mgmtcipher(struct wlan_objmgr_peer *peer,
 				     uint32_t mgmtcipher)
 {
@@ -4019,14 +3666,6 @@ wlan_crypto_set_peer_fils_aead(struct wlan_objmgr_peer *peer, uint8_t value)
 	crypto_priv->fils_aead_set = value;
 }
 
-/**
- * wlan_crypto_get_key_header - get header length
- * @key: key
- *
- * This function gets header length based on keytype
- *
- * Return: header length
- */
 uint8_t wlan_crypto_get_key_header(struct wlan_crypto_key *key)
 {
 	struct wlan_crypto_cipher *cipher_table;
@@ -4040,14 +3679,6 @@ uint8_t wlan_crypto_get_key_header(struct wlan_crypto_key *key)
 
 qdf_export_symbol(wlan_crypto_get_key_header);
 
-/**
- * wlan_crypto_get_key_trailer - get cipher trailer length
- * @key: key
- *
- * This function gets cipher trailer length based on keytype
- *
- * Return: cipher trailer length
- */
 uint8_t wlan_crypto_get_key_trailer(struct wlan_crypto_key *key)
 {
 	struct wlan_crypto_cipher *cipher_table;
@@ -4061,14 +3692,6 @@ uint8_t wlan_crypto_get_key_trailer(struct wlan_crypto_key *key)
 
 qdf_export_symbol(wlan_crypto_get_key_trailer);
 
-/**
- * wlan_crypto_get_key_miclen - get cipher miclen length
- * @key: key
- *
- * This function gets cipher miclen length based on keytype
- *
- * Return: cipher miclen length
- */
 uint8_t wlan_crypto_get_key_miclen(struct wlan_crypto_key *key)
 {
 	struct wlan_crypto_cipher *cipher_table;
@@ -4082,14 +3705,6 @@ uint8_t wlan_crypto_get_key_miclen(struct wlan_crypto_key *key)
 
 qdf_export_symbol(wlan_crypto_get_key_miclen);
 
-/**
- * wlan_crypto_get_keyid - get keyid from frame
- * @data: frame
- *
- * This function parse frame and returns keyid
- *
- * Return: keyid
- */
 uint16_t wlan_crypto_get_keyid(uint8_t *data, int hdrlen)
 {
 	struct wlan_frame_hdr *hdr = (struct wlan_frame_hdr *)data;
@@ -4124,7 +3739,7 @@ uint16_t wlan_crypto_get_keyid(uint8_t *data, int hdrlen)
 qdf_export_symbol(wlan_crypto_get_keyid);
 
 /**
- * crypto_plumb_peer_keys - called during radio reset
+ * crypto_plumb_peer_keys() - called during radio reset
  * @vdev: vdev
  * @object: peer
  * @arg: psoc
@@ -4179,15 +3794,6 @@ static void crypto_plumb_peer_keys(struct wlan_objmgr_vdev *vdev,
 	}
 }
 
-/**
- * wlan_crypto_restore_keys - called during radio reset
- * @vdev: vdev
- *
- * Clear and restore keycache, needed for some DA chipsets which put
- * random values in keycache when phy reset is triggered
- *
- * Return: void
- */
 void wlan_crypto_restore_keys(struct wlan_objmgr_vdev *vdev)
 {
 	int i;
@@ -4326,18 +3932,6 @@ wlan_get_crypto_params_from_wapi_ie(struct wlan_crypto_params *crypto_params,
 }
 #endif
 
-/**
- * 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
- * @ie_len: IE length
- * @peer_crypto_params: return peer crypto parameters
- *
- * This function gets called from ucfg to check RSN match.
- *
- * Return: true or false
- */
 bool wlan_crypto_check_rsn_match(struct wlan_objmgr_psoc *psoc,
 				 uint8_t vdev_id, uint8_t *ie_ptr,
 				 uint16_t ie_len, struct wlan_crypto_params *
@@ -4371,18 +3965,6 @@ bool wlan_crypto_check_rsn_match(struct wlan_objmgr_psoc *psoc,
 	return 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
- * @ie_len: IE length
- * @peer_crypto_params: return peer crypto parameters
- *
- * This function gets called from ucfg to check WPA match.
- *
- * Return: true or false
- */
 bool wlan_crypto_check_wpa_match(struct wlan_objmgr_psoc *psoc,
 				 uint8_t vdev_id, uint8_t *ie_ptr,
 				 uint16_t ie_len, struct wlan_crypto_params *

+ 2 - 14
umac/cmn_services/crypto/src/wlan_crypto_main.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-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,30 +17,18 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
- /**
+/**
  * DOC: Public API initialization of crypto service with object manager
  */
 #include <qdf_types.h>
 #include "wlan_crypto_main_i.h"
 #include "wlan_crypto_main.h"
 
-/**
- * wlan_crypto_init - Init the crypto service with object manager
- *                    Called from umac init context.
- *
- * Return: QDF_STATUS_SUCCESS - in case of success
- */
 QDF_STATUS wlan_crypto_init(void)
 {
 	return __wlan_crypto_init();
 }
 
-/**
- * wlan_crypto_deinit - Deinit the crypto service with object manager
- *                    Called from umac deinit context.
- *
- * Return: QDF_STATUS_SUCCESS - in case of success
- */
 QDF_STATUS wlan_crypto_deinit(void)
 {
 	return __wlan_crypto_deinit();

+ 6 - 5
umac/cmn_services/crypto/src/wlan_crypto_main_i.h

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 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
@@ -16,23 +17,23 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
- /**
+/**
  * DOC: Private API for crypto service with object manager handler
  */
 #ifndef _WLAN_CRYPTO_MAIN_I_H_
 #define _WLAN_CRYPTO_MAIN_I_H_
 
 /**
- * wlan_crypto_init - Init the crypto service with object manager
- *                    Called from umac init context.
+ * __wlan_crypto_init() - Init the crypto service with object manager
+ *                        Called from umac init context.
  *
  * Return: QDF_STATUS_SUCCESS - in case of success
  */
 QDF_STATUS __wlan_crypto_init(void);
 
 /**
- * wlan_crypto_deinit - Deinit the crypto service with object manager
- *                    Called from umac deinit context.
+ * __wlan_crypto_deinit() - Deinit the crypto service with object manager
+ *                          Called from umac deinit context.
  *
  * Return: QDF_STATUS_SUCCESS - in case of success
  */

+ 2 - 13
umac/cmn_services/crypto/src/wlan_crypto_obj_mgr.c

@@ -17,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
- /**
+/**
  * DOC: Public API initialization of crypto service with object manager
  */
 #include <qdf_types.h>
@@ -279,12 +279,7 @@ static QDF_STATUS wlan_crypto_peer_obj_destroy_handler(
 
 	return QDF_STATUS_SUCCESS;
 }
-/**
- * __wlan_crypto_init - Init the crypto service with object manager
- *                    Called from crypto init context.
- *
- * Return: QDF_STATUS_SUCCESS - in case of success
- */
+
 QDF_STATUS __wlan_crypto_init(void)
 {
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
@@ -328,12 +323,6 @@ register_success:
 	return status;
 }
 
-/**
- * __wlan_crypto_deinit - Deinit the crypto service with object manager
- *                         Called from crypto context.
- *
- * Return: QDF_STATUS_SUCCESS - in case of success
- */
 QDF_STATUS __wlan_crypto_deinit(void)
 {
 

+ 2 - 2
umac/cmn_services/crypto/src/wlan_crypto_obj_mgr_i.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-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 API initialization of crypto service with object manager
  */
 

+ 3 - 126
umac/cmn_services/crypto/src/wlan_crypto_param_handling.c

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2017-2019, 2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 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
@@ -16,7 +17,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
- /**
+/**
  * DOC: Public APIs for crypto service
  */
 /* include files */
@@ -56,15 +57,6 @@ cipher2cap(int cipher)
 	return 0;
 }
 
-/**
- * wlan_crypto_set_authmode - called by ucfg to configure authmode for vdev
- * @vdev: vdev
- * @authmode: authmode
- *
- * This function gets called from ucfg to configure authmode for vdev.
- *
- * Return: QDF_STATUS_SUCCESS - in case of success
- */
 QDF_STATUS wlan_crypto_set_authmode(struct wlan_crypto_params *crypto_params,
 					uint32_t authmode)
 {
@@ -72,28 +64,11 @@ QDF_STATUS wlan_crypto_set_authmode(struct wlan_crypto_params *crypto_params,
 	return QDF_STATUS_SUCCESS;
 }
 
-/**
- * wlan_crypto_get_authmode - called by ucfg to get authmode of particular vdev
- * @vdev: vdev
- *
- * This function gets called from ucfg to get authmode of particular vdev
- *
- * Return: authmode
- */
 int32_t wlan_crypto_get_authmode(struct wlan_crypto_params *crypto_params)
 {
 	return crypto_params->authmodeset;
 }
 
-/**
- * wlan_crypto_set_mcastcipher - called by ucfg to configure mcastcipher in vdev
- * @vdev: vdev
- * @wlan_crypto_cipher_type: mcast cipher value.
- *
- * This function gets called from ucfg to configure mcastcipher in vdev
- *
- * Return: QDF_STATUS_SUCCESS - in case of success
- */
 QDF_STATUS wlan_crypto_set_mcastcipher(struct wlan_crypto_params *crypto_params,
 					wlan_crypto_cipher_type cipher)
 {
@@ -115,29 +90,12 @@ QDF_STATUS wlan_crypto_set_mcastcipher(struct wlan_crypto_params *crypto_params,
 	}
 	return status;
 }
-/**
- * wlan_crypto_get_mcastcipher - called by ucfg to get mcastcipher from vdev
- * @vdev: vdev
- *
- * This function gets called from ucfg to get mcastcipher of particular vdev
- *
- * Return: mcast cipher
- */
+
 int32_t wlan_crypto_get_mcastcipher(struct wlan_crypto_params *crypto_params)
 {
 	return crypto_params->mcastcipherset;
 }
 
-/**
- * wlan_crypto_set_ucastciphers - called by ucfg to configure
- *                                        unicast ciphers in vdev
- * @vdev: vdev
- * @ciphers: bitmap value of all supported unicast ciphers
- *
- * This function gets called from ucfg to configure unicast ciphers in vdev
- *
- * Return: QDF_STATUS_SUCCESS - in case of success
- */
 QDF_STATUS wlan_crypto_set_ucastciphers(
 				struct wlan_crypto_params *crypto_params,
 				uint32_t cipher)
@@ -162,29 +120,11 @@ QDF_STATUS wlan_crypto_set_ucastciphers(
 	return status;
 }
 
-/**
- * wlan_crypto_get_ucastciphers - called by ucfg to get ucastcipher from vdev
- * @vdev: vdev
- *
- * This function gets called from ucfg to get supported unicast ciphers
- *
- * Return: bitmap value of all supported unicast ciphers
- */
 int32_t wlan_crypto_get_ucastciphers(struct wlan_crypto_params *crypto_params)
 {
 	return crypto_params->ucastcipherset;
 }
 
-/**
- * wlan_crypto_set_mgmtcipher - called by ucfg to configure
- *                                        mgmt ciphers in vdev
- * @vdev: vdev
- * @ciphers: bitmap value of all supported group mgmt ciphers
- *
- * This function gets called from ucfg to configure group mgmt ciphers in vdev
- *
- * Return: QDF_STATUS_SUCCESS - in case of success
- */
 QDF_STATUS wlan_crypto_set_mgmtcipher(
 				struct wlan_crypto_params *crypto_params,
 				uint32_t ciphers)
@@ -201,29 +141,11 @@ QDF_STATUS wlan_crypto_set_mgmtcipher(
 	return QDF_STATUS_SUCCESS;
 }
 
-/**
- * wlan_crypto_get_mgmtciphers - called by ucfg to get mgmtcipher from vdev
- * @vdev: vdev
- *
- * This function gets called from ucfg to get supported unicast ciphers
- *
- * Return: bitmap value of all supported unicast ciphers
- */
 int32_t wlan_crypto_get_mgmtciphers(struct wlan_crypto_params *crypto_params)
 {
 	return crypto_params->mgmtcipherset;
 }
 
-/**
- * wlan_crypto_set_cipher_cap - called by ucfg to configure
- *                                        cipher cap in vdev
- * @vdev: vdev
- * @ciphers: bitmap value of all supported unicast ciphers
- *
- * This function gets called from ucfg to configure unicast ciphers in vdev
- *
- * Return: QDF_STATUS_SUCCESS - in case of success
- */
 QDF_STATUS wlan_crypto_set_cipher_cap(
 				struct wlan_crypto_params *crypto_params,
 				uint32_t value)
@@ -233,29 +155,11 @@ QDF_STATUS wlan_crypto_set_cipher_cap(
 	return QDF_STATUS_SUCCESS;
 }
 
-/**
- * wlan_crypto_get_cipher_cap - called by ucfg to get cipher caps from vdev
- * @vdev: vdev
- *
- * This function gets called from ucfg to get supported unicast ciphers
- *
- * Return: bitmap value of all supported unicast ciphers
- */
 int32_t wlan_crypto_get_cipher_cap(struct wlan_crypto_params *crypto_params)
 {
 	return crypto_params->cipher_caps;
 }
 
-/**
- * wlan_crypto_set_rsn_cap - called by ucfg to configure
- *                                        cipher cap in vdev
- * @vdev: vdev
- * @ciphers: bitmap value of all supported unicast ciphers
- *
- * This function gets called from ucfg to configure unicast ciphers in vdev
- *
- * Return: QDF_STATUS_SUCCESS - in case of success
- */
 QDF_STATUS wlan_crypto_set_rsn_cap(
 				struct wlan_crypto_params *crypto_params,
 				uint32_t value)
@@ -265,30 +169,11 @@ QDF_STATUS wlan_crypto_set_rsn_cap(
 	return QDF_STATUS_SUCCESS;
 }
 
-/**
- * wlan_crypto_get_rsn_cap - called by ucfg to get rsn caps from vdev
- * @vdev: vdev
- *
- * This function gets called from ucfg to get supported unicast ciphers
- *
- * Return: bitmap value of all supported unicast ciphers
- */
 int32_t wlan_crypto_get_rsn_cap(struct wlan_crypto_params *crypto_params)
 {
 	return crypto_params->rsn_caps;
 }
 
-
-/**
- * wlan_crypto_set_key_mgmt - called by ucfg to configure
- *                                        key_mgmt in vdev
- * @vdev: vdev
- * @ciphers: bitmap value of all supported unicast ciphers
- *
- * This function gets called from ucfg to configure unicast ciphers in vdev
- *
- * Return: QDF_STATUS_SUCCESS - in case of success
- */
 QDF_STATUS wlan_crypto_set_key_mgmt(
 				struct wlan_crypto_params *crypto_params,
 				uint32_t value)
@@ -298,14 +183,6 @@ QDF_STATUS wlan_crypto_set_key_mgmt(
 	return QDF_STATUS_SUCCESS;
 }
 
-/**
- * wlan_crypto_get_key_mgmt - called by ucfg to get key mgmt from vdev
- * @vdev: vdev
- *
- * This function gets called from ucfg to get supported unicast ciphers
- *
- * Return: bitmap value of all supported unicast ciphers
- */
 int32_t wlan_crypto_get_key_mgmt(struct wlan_crypto_params *crypto_params)
 {
 	return crypto_params->key_mgmt;

+ 36 - 31
umac/cmn_services/crypto/src/wlan_crypto_param_handling_i.h

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2017-2018, 2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 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
@@ -16,15 +17,15 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
- /**
+/**
  * DOC: Public APIs for crypto service
  */
 /* include files */
 #ifndef __WLAN_CRYPTO_PARAM_HANDLING_I_H_
 #define __WLAN_CRYPTO_PARAM_HANDLING_I_H_
 /**
- * wlan_crypto_set_authmode - called by ucfg to configure authmode for vdev
- * @vdev: vdev
+ * wlan_crypto_set_authmode() - called by ucfg to configure authmode for vdev
+ * @crypto_params: crypto parameters
  * @authmode: authmode
  *
  * This function gets called from ucfg to configure authmode for vdev.
@@ -35,8 +36,9 @@ QDF_STATUS wlan_crypto_set_authmode(struct wlan_crypto_params *crypto_params,
 					uint32_t authmode);
 
 /**
- * wlan_crypto_get_authmode - called by ucfg to get authmode of particular vdev
- * @vdev: vdev
+ * wlan_crypto_get_authmode() - called by ucfg to get authmode of particular
+ *                              vdev
+ * @crypto_params: crypto parameters
  *
  * This function gets called from ucfg to get authmode of particular vdev
  *
@@ -45,9 +47,10 @@ QDF_STATUS wlan_crypto_set_authmode(struct wlan_crypto_params *crypto_params,
 int32_t wlan_crypto_get_authmode(struct wlan_crypto_params *crypto_params);
 
 /**
- * wlan_crypto_set_mcastcipher - called by ucfg to configure mcastcipher in vdev
- * @vdev: vdev
- * @wlan_crypto_cipher_type: mcast cipher value.
+ * wlan_crypto_set_mcastcipher() - called by ucfg to configure mcastcipher in
+ *                                 vdev
+ * @crypto_params: crypto parameters
+ * @cipher: mcast cipher value.
  *
  * This function gets called from ucfg to configure mcastcipher in vdev
  *
@@ -55,9 +58,10 @@ int32_t wlan_crypto_get_authmode(struct wlan_crypto_params *crypto_params);
  */
 QDF_STATUS wlan_crypto_set_mcastcipher(struct wlan_crypto_params *crypto_params,
 					wlan_crypto_cipher_type cipher);
+
 /**
- * wlan_crypto_get_mcastcipher - called by ucfg to get mcastcipher from vdev
- * @vdev: vdev
+ * wlan_crypto_get_mcastcipher() - called by ucfg to get mcastcipher from vdev
+ * @crypto_params: crypto parameters
  *
  * This function gets called from ucfg to get mcastcipher of particular vdev
  *
@@ -66,20 +70,21 @@ QDF_STATUS wlan_crypto_set_mcastcipher(struct wlan_crypto_params *crypto_params,
 int32_t wlan_crypto_get_mcastcipher(struct wlan_crypto_params *crypto_params);
 
 /**
- * wlan_crypto_set_ucastciphers - called by ucfg to configure
+ * wlan_crypto_set_ucastciphers() - called by ucfg to configure
  *                                        unicast ciphers in vdev
- * @vdev: vdev
+ * @crypto_params: crypto parameters
  * @ciphers: bitmap value of all supported unicast ciphers
  *
  * This function gets called from ucfg to configure unicast ciphers in vdev
  *
  * Return: QDF_STATUS_SUCCESS - in case of success
  */
-QDF_STATUS wlan_crypto_set_ucastciphers(struct wlan_crypto_params *,
+QDF_STATUS wlan_crypto_set_ucastciphers(struct wlan_crypto_params *crypto_params,
 						uint32_t ciphers);
+
 /**
- * wlan_crypto_get_ucastciphers - called by ucfg to get ucastcipher from vdev
- * @vdev: vdev
+ * wlan_crypto_get_ucastciphers() - called by ucfg to get ucastcipher from vdev
+ * @crypto_params: crypto parameters
  *
  * This function gets called from ucfg to get supported unicast ciphers
  *
@@ -88,9 +93,9 @@ QDF_STATUS wlan_crypto_set_ucastciphers(struct wlan_crypto_params *,
 int32_t wlan_crypto_get_ucastciphers(struct wlan_crypto_params *crypto_params);
 
 /**
- * wlan_crypto_set_mgmtcipher - called by ucfg to configure
+ * wlan_crypto_set_mgmtcipher() - called by ucfg to configure
  *                                        mgmt ciphers in vdev
- * @vdev: vdev
+ * @crypto_params: crypto parameters
  * @ciphers: bitmap value of all supported mgmt ciphers
  *
  * This function gets called from ucfg to configure mgmt ciphers in vdev
@@ -101,8 +106,8 @@ QDF_STATUS wlan_crypto_set_mgmtcipher(struct wlan_crypto_params *crypto_params,
 					uint32_t ciphers);
 
 /**
- * wlan_crypto_get_mgmtciphers - called by ucfg to get mgmtcipher from vdev
- * @vdev: vdev
+ * wlan_crypto_get_mgmtciphers() - called by ucfg to get mgmtcipher from vdev
+ * @crypto_params: crypto parameters
  *
  * This function gets called from ucfg to get supported unicast ciphers
  *
@@ -111,9 +116,9 @@ QDF_STATUS wlan_crypto_set_mgmtcipher(struct wlan_crypto_params *crypto_params,
 int32_t wlan_crypto_get_mgmtciphers(struct wlan_crypto_params *crypto_params);
 
 /**
- * wlan_crypto_set_cipher_cap - called by ucfg to configure
+ * wlan_crypto_set_cipher_cap() - called by ucfg to configure
  *                                        cipher cap in vdev
- * @vdev: vdev
+ * @crypto_params: crypto parameters
  * @ciphers: bitmap value of all supported unicast ciphers
  *
  * This function gets called from ucfg to configure unicast ciphers in vdev
@@ -124,8 +129,8 @@ QDF_STATUS wlan_crypto_set_cipher_cap(struct wlan_crypto_params *crypto_params,
 					uint32_t ciphers);
 
 /**
- * wlan_crypto_get_cipher_cap - called by ucfg to get cipher caps from vdev
- * @vdev: vdev
+ * wlan_crypto_get_cipher_cap() - called by ucfg to get cipher caps from vdev
+ * @crypto_params: crypto parameters
  *
  * This function gets called from ucfg to get supported unicast ciphers
  *
@@ -134,9 +139,9 @@ QDF_STATUS wlan_crypto_set_cipher_cap(struct wlan_crypto_params *crypto_params,
 int32_t wlan_crypto_get_cipher_cap(struct wlan_crypto_params *crypto_params);
 
 /**
- * wlan_crypto_set_rsn_cap - called by ucfg to configure
+ * wlan_crypto_set_rsn_cap() - called by ucfg to configure
  *                                        cipher cap in vdev
- * @vdev: vdev
+ * @crypto_params: crypto parameters
  * @ciphers: bitmap value of all supported unicast ciphers
  *
  * This function gets called from ucfg to configure unicast ciphers in vdev
@@ -147,8 +152,8 @@ QDF_STATUS wlan_crypto_set_rsn_cap(struct wlan_crypto_params *crypto_params,
 					uint32_t ciphers);
 
 /**
- * wlan_crypto_get_rsn_cap - called by ucfg to get rsn caps from vdev
- * @vdev: vdev
+ * wlan_crypto_get_rsn_cap() - called by ucfg to get rsn caps from vdev
+ * @crypto_params: crypto parameters
  *
  * This function gets called from ucfg to get supported unicast ciphers
  *
@@ -158,9 +163,9 @@ int32_t wlan_crypto_get_rsn_cap(struct wlan_crypto_params *crypto_params);
 
 
 /**
- * wlan_crypto_set_key_mgmt - called by ucfg to configure
+ * wlan_crypto_set_key_mgmt() - called by ucfg to configure
  *                                        key_mgmt in vdev
- * @vdev: vdev
+ * @crypto_params: crypto parameters
  * @ciphers: bitmap value of all supported unicast ciphers
  *
  * This function gets called from ucfg to configure unicast ciphers in vdev
@@ -171,8 +176,8 @@ QDF_STATUS wlan_crypto_set_key_mgmt(struct wlan_crypto_params *crypto_params,
 					uint32_t ciphers);
 
 /**
- * wlan_crypto_get_key_mgmt - called by ucfg to get key mgmt from vdev
- * @vdev: vdev
+ * wlan_crypto_get_key_mgmt() - called by ucfg to get key mgmt from vdev
+ * @crypto_params: crypto parameters
  *
  * This function gets called from ucfg to get supported unicast ciphers
  *