diff options
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/wil_platform.h')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/wil_platform.h | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/wil6210/wil_platform.h b/drivers/net/wireless/ath/wil6210/wil_platform.h index d7fa19b7886d..9a949d910343 100644 --- a/drivers/net/wireless/ath/wil6210/wil_platform.h +++ b/drivers/net/wireless/ath/wil6210/wil_platform.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2014 Qualcomm Atheros, Inc. | 2 | * Copyright (c) 2014-2015 Qualcomm Atheros, Inc. |
3 | * | 3 | * |
4 | * Permission to use, copy, modify, and/or distribute this software for any | 4 | * Permission to use, copy, modify, and/or distribute this software for any |
5 | * purpose with or without fee is hereby granted, provided that the above | 5 | * purpose with or without fee is hereby granted, provided that the above |
@@ -20,16 +20,48 @@ | |||
20 | struct device; | 20 | struct device; |
21 | 21 | ||
22 | /** | 22 | /** |
23 | * struct wil_platform_ops - wil platform module callbacks | 23 | * struct wil_platform_ops - wil platform module calls from this |
24 | * driver to platform driver | ||
24 | */ | 25 | */ |
25 | struct wil_platform_ops { | 26 | struct wil_platform_ops { |
26 | int (*bus_request)(void *handle, uint32_t kbps /* KBytes/Sec */); | 27 | int (*bus_request)(void *handle, uint32_t kbps /* KBytes/Sec */); |
27 | int (*suspend)(void *handle); | 28 | int (*suspend)(void *handle); |
28 | int (*resume)(void *handle); | 29 | int (*resume)(void *handle); |
29 | void (*uninit)(void *handle); | 30 | void (*uninit)(void *handle); |
31 | int (*notify_crash)(void *handle); | ||
30 | }; | 32 | }; |
31 | 33 | ||
32 | void *wil_platform_init(struct device *dev, struct wil_platform_ops *ops); | 34 | /** |
35 | * struct wil_platform_rops - wil platform module callbacks from | ||
36 | * platform driver to this driver | ||
37 | * @ramdump: store a ramdump from the wil firmware. The platform | ||
38 | * driver may add additional data to the ramdump to | ||
39 | * generate the final crash dump. | ||
40 | * @fw_recovery: start a firmware recovery process. Called as | ||
41 | * part of a crash recovery process which may include other | ||
42 | * related platform subsystems. | ||
43 | */ | ||
44 | struct wil_platform_rops { | ||
45 | int (*ramdump)(void *wil_handle, void *buf, uint32_t size); | ||
46 | int (*fw_recovery)(void *wil_handle); | ||
47 | }; | ||
48 | |||
49 | /** | ||
50 | * wil_platform_init - initialize the platform driver | ||
51 | * | ||
52 | * @dev - pointer to the wil6210 device | ||
53 | * @ops - structure with platform driver operations. Platform | ||
54 | * driver will fill this structure with function pointers. | ||
55 | * @rops - structure with callbacks from platform driver to | ||
56 | * this driver. The platform driver copies the structure to | ||
57 | * its own storage. Can be NULL if this driver does not | ||
58 | * support crash recovery. | ||
59 | * @wil_handle - context for this driver that will be passed | ||
60 | * when platform driver invokes one of the callbacks in | ||
61 | * rops. May be NULL if rops is NULL. | ||
62 | */ | ||
63 | void *wil_platform_init(struct device *dev, struct wil_platform_ops *ops, | ||
64 | const struct wil_platform_rops *rops, void *wil_handle); | ||
33 | 65 | ||
34 | int __init wil_platform_modinit(void); | 66 | int __init wil_platform_modinit(void); |
35 | void wil_platform_modexit(void); | 67 | void wil_platform_modexit(void); |