1*5113495bSYour Name /*
2*5113495bSYour Name * Copyright (c) 2019 The Linux Foundation. All rights reserved.
3*5113495bSYour Name * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
4*5113495bSYour Name *
5*5113495bSYour Name * Permission to use, copy, modify, and/or distribute this software for
6*5113495bSYour Name * any purpose with or without fee is hereby granted, provided that the
7*5113495bSYour Name * above copyright notice and this permission notice appear in all
8*5113495bSYour Name * copies.
9*5113495bSYour Name *
10*5113495bSYour Name * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11*5113495bSYour Name * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12*5113495bSYour Name * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13*5113495bSYour Name * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14*5113495bSYour Name * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15*5113495bSYour Name * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16*5113495bSYour Name * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17*5113495bSYour Name * PERFORMANCE OF THIS SOFTWARE.
18*5113495bSYour Name */
19*5113495bSYour Name
20*5113495bSYour Name /*
21*5113495bSYour Name * DOC: contains crypto north bound interface definitions
22*5113495bSYour Name */
23*5113495bSYour Name
24*5113495bSYour Name #include <qdf_types.h>
25*5113495bSYour Name #include <wlan_crypto_global_def.h>
26*5113495bSYour Name #include <wlan_objmgr_vdev_obj.h>
27*5113495bSYour Name #include <wlan_crypto_global_api.h>
28*5113495bSYour Name #include "wlan_crypto_def_i.h"
29*5113495bSYour Name
ucfg_crypto_set_key_req(struct wlan_objmgr_vdev * vdev,struct wlan_crypto_key * req,enum wlan_crypto_key_type key_type)30*5113495bSYour Name QDF_STATUS ucfg_crypto_set_key_req(struct wlan_objmgr_vdev *vdev,
31*5113495bSYour Name struct wlan_crypto_key *req,
32*5113495bSYour Name enum wlan_crypto_key_type key_type)
33*5113495bSYour Name {
34*5113495bSYour Name /*
35*5113495bSYour Name * It is the job of dispatcher to decide whether the
36*5113495bSYour Name * request has to be sent to scheduler or should be
37*5113495bSYour Name * sent as a offload request or process directly.
38*5113495bSYour Name *
39*5113495bSYour Name * Current requirement is to process set key request
40*5113495bSYour Name * as run to completion without posting any messages.
41*5113495bSYour Name * Hence the request handler is directly called from
42*5113495bSYour Name * here.
43*5113495bSYour Name */
44*5113495bSYour Name return wlan_crypto_set_key_req(vdev, req, key_type);
45*5113495bSYour Name }
46*5113495bSYour Name
ucfg_crypto_flush_entries(struct wlan_objmgr_psoc * psoc)47*5113495bSYour Name void ucfg_crypto_flush_entries(struct wlan_objmgr_psoc *psoc)
48*5113495bSYour Name {
49*5113495bSYour Name crypto_flush_entries(psoc);
50*5113495bSYour Name }
51*5113495bSYour Name
ucfg_crypto_free_key_by_link_id(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * link_addr,uint8_t link_id)52*5113495bSYour Name void ucfg_crypto_free_key_by_link_id(struct wlan_objmgr_psoc *psoc,
53*5113495bSYour Name struct qdf_mac_addr *link_addr,
54*5113495bSYour Name uint8_t link_id)
55*5113495bSYour Name {
56*5113495bSYour Name wlan_crypto_free_key_by_link_id(psoc, link_addr, link_id);
57*5113495bSYour Name }
58