Merge tag 'nfs-for-5.5-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
[linux-2.6-microblaze.git] / drivers / staging / wfx / secure_link.h
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (c) 2019, Silicon Laboratories, Inc.
4  */
5 #ifndef WFX_SECURE_LINK_H
6 #define WFX_SECURE_LINK_H
7
8 #include <linux/of.h>
9
10 #include "hif_api_general.h"
11
12 struct wfx_dev;
13
14
15 struct sl_context {
16 };
17
18 static inline bool wfx_is_secure_command(struct wfx_dev *wdev, int cmd_id)
19 {
20         return false;
21 }
22
23 static inline int wfx_sl_decode(struct wfx_dev *wdev, struct hif_sl_msg *m)
24 {
25         return -EIO;
26 }
27
28 static inline int wfx_sl_encode(struct wfx_dev *wdev, struct hif_msg *input,
29                                 struct hif_sl_msg *output)
30 {
31         return -EIO;
32 }
33
34 static inline int wfx_sl_check_pubkey(struct wfx_dev *wdev, u8 *ncp_pubkey,
35                                       u8 *ncp_pubmac)
36 {
37         return -EIO;
38 }
39
40 static inline void wfx_sl_fill_pdata(struct device *dev,
41                                      struct wfx_platform_data *pdata)
42 {
43         if (of_find_property(dev->of_node, "slk_key", NULL))
44                 dev_err(dev, "secure link is not supported by this driver, ignoring provided key\n");
45 }
46
47 static inline int wfx_sl_init(struct wfx_dev *wdev)
48 {
49         return -EIO;
50 }
51
52 static inline void wfx_sl_deinit(struct wfx_dev *wdev)
53 {
54 }
55
56
57 #endif