mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
qcacmn: add crypto api to free keys for vdev
Add api 'wlan_crypto_free_vdev_key' to free keys for specified vdev. CRs-Fixed: 2765406 Change-Id: I44b09ac30e16aca2aec8a0763b7848bfe779a345
This commit is contained in:
parent
547c60d7d7
commit
899debe4d7
2 changed files with 30 additions and 0 deletions
|
|
@ -846,6 +846,16 @@ struct wlan_crypto_key *wlan_crypto_get_key(struct wlan_objmgr_vdev *vdev,
|
|||
QDF_STATUS wlan_crypto_set_key_req(struct wlan_objmgr_vdev *vdev,
|
||||
struct wlan_crypto_key *req,
|
||||
enum wlan_crypto_key_type key_type);
|
||||
|
||||
/**
|
||||
* wlan_crypto_free_vdev_key - Free keys for vdev
|
||||
* @vdev: vdev object
|
||||
*
|
||||
* This function frees keys stored in vdev crypto object.
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void wlan_crypto_free_vdev_key(struct wlan_objmgr_vdev *vdev);
|
||||
#else
|
||||
static inline void wlan_crypto_update_set_key_peer(
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
|
|
@ -875,6 +885,10 @@ QDF_STATUS wlan_crypto_set_key_req(struct wlan_objmgr_vdev *vdev,
|
|||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline void wlan_crypto_free_vdev_key(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
}
|
||||
#endif /* CRYPTO_SET_KEY_CONVERGED */
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -204,6 +204,22 @@ static void wlan_crypto_free_key(struct wlan_crypto_comp_priv *crypto_priv)
|
|||
|
||||
}
|
||||
|
||||
#ifdef CRYPTO_SET_KEY_CONVERGED
|
||||
void wlan_crypto_free_vdev_key(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
struct wlan_crypto_comp_priv *crypto_priv;
|
||||
|
||||
crypto_debug("free key for vdev %d", wlan_vdev_get_id(vdev));
|
||||
crypto_priv = wlan_get_vdev_crypto_obj(vdev);
|
||||
if (!crypto_priv) {
|
||||
crypto_err("crypto_priv NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
wlan_crypto_free_key(crypto_priv);
|
||||
}
|
||||
#endif
|
||||
|
||||
static QDF_STATUS wlan_crypto_vdev_obj_destroy_handler(
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
void *arg){
|
||||
|
|
|
|||
Loading…
Reference in a new issue