]>
Commit | Line | Data |
---|---|---|
90b24889 WF |
1 | /** @file\r |
2 | The driver binding protocol for the WiFi Connection Manager.\r | |
3 | \r | |
4 | Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>\r | |
5 | \r | |
ecf98fbc | 6 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
90b24889 WF |
7 | \r |
8 | **/\r | |
9 | \r | |
10 | #ifndef __EFI_WIFI_DRIVER_BINDING__\r | |
11 | #define __EFI_WIFI_DRIVER_BINDING__\r | |
12 | \r | |
13 | /**\r | |
14 | Tests to see if this driver supports a given controller. If a child device is provided,\r | |
15 | it further tests to see if this driver supports creating a handle for the specified child device.\r | |
16 | \r | |
17 | This function checks to see if the driver specified by This supports the device specified by\r | |
18 | ControllerHandle. Drivers will typically use the device path attached to\r | |
19 | ControllerHandle and/or the services from the bus I/O abstraction attached to\r | |
20 | ControllerHandle to determine if the driver supports ControllerHandle. This function\r | |
21 | may be called many times during platform initialization. In order to reduce boot times, the tests\r | |
22 | performed by this function must be very small, and take as little time as possible to execute. This\r | |
23 | function must not change the state of any hardware devices, and this function must be aware that the\r | |
24 | device specified by ControllerHandle may already be managed by the same driver or a\r | |
25 | different driver. This function must match its calls to AllocatePages() with FreePages(),\r | |
26 | AllocatePool() with FreePool(), and OpenProtocol() with CloseProtocol().\r | |
27 | Because ControllerHandle may have been previously started by the same driver, if a protocol is\r | |
28 | already in the opened state, then it must not be closed with CloseProtocol(). This is required\r | |
29 | to guarantee the state of ControllerHandle is not modified by this function.\r | |
30 | \r | |
31 | @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r | |
32 | @param[in] ControllerHandle The handle of the controller to test. This handle\r | |
33 | must support a protocol interface that supplies\r | |
34 | an I/O abstraction to the driver.\r | |
35 | @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This\r | |
36 | parameter is ignored by device drivers, and is optional for bus\r | |
37 | drivers. For bus drivers, if this parameter is not NULL, then\r | |
38 | the bus driver must determine if the bus controller specified\r | |
39 | by ControllerHandle and the child controller specified\r | |
40 | by RemainingDevicePath are both supported by this\r | |
41 | bus driver.\r | |
42 | \r | |
43 | @retval EFI_SUCCESS The device specified by ControllerHandle and\r | |
44 | RemainingDevicePath is supported by the driver specified by This.\r | |
45 | @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and\r | |
46 | RemainingDevicePath is already being managed by the driver\r | |
47 | specified by This.\r | |
48 | @retval EFI_ACCESS_DENIED The device specified by ControllerHandle and\r | |
49 | RemainingDevicePath is already being managed by a different\r | |
50 | driver or an application that requires exclusive access.\r | |
51 | Currently not implemented.\r | |
52 | @retval EFI_UNSUPPORTED The device specified by ControllerHandle and\r | |
53 | RemainingDevicePath is not supported by the driver specified by This.\r | |
54 | \r | |
55 | **/\r | |
56 | EFI_STATUS\r | |
57 | EFIAPI\r | |
58 | WifiMgrDxeDriverBindingSupported (\r | |
59 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
60 | IN EFI_HANDLE ControllerHandle,\r | |
61 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r | |
62 | );\r | |
63 | \r | |
64 | /**\r | |
65 | Starts a device controller or a bus controller.\r | |
66 | \r | |
67 | The Start() function is designed to be invoked from the EFI boot service ConnectController().\r | |
68 | As a result, much of the error checking on the parameters to Start() has been moved into this\r | |
69 | common boot service. It is legal to call Start() from other locations,\r | |
70 | but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r | |
71 | 1. ControllerHandle must be a valid EFI_HANDLE.\r | |
72 | 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned\r | |
73 | EFI_DEVICE_PATH_PROTOCOL.\r | |
74 | 3. Prior to calling Start(), the Supported() function for the driver specified by This must\r | |
75 | have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.\r | |
76 | \r | |
77 | @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r | |
78 | @param[in] ControllerHandle The handle of the controller to start. This handle\r | |
79 | must support a protocol interface that supplies\r | |
80 | an I/O abstraction to the driver.\r | |
81 | @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This\r | |
82 | parameter is ignored by device drivers, and is optional for bus\r | |
83 | drivers. For a bus driver, if this parameter is NULL, then handles\r | |
84 | for all the children of Controller are created by this driver.\r | |
85 | If this parameter is not NULL and the first Device Path Node is\r | |
86 | not the End of Device Path Node, then only the handle for the\r | |
87 | child device specified by the first Device Path Node of\r | |
88 | RemainingDevicePath is created by this driver.\r | |
89 | If the first Device Path Node of RemainingDevicePath is\r | |
90 | the End of Device Path Node, no child handle is created by this\r | |
91 | driver.\r | |
92 | \r | |
93 | @retval EFI_SUCCESS The device was started.\r | |
94 | @retval EFI_DEVICE_ERROR The device could not be started due to a device error.Currently not implemented.\r | |
95 | @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.\r | |
96 | @retval Others The driver failded to start the device.\r | |
97 | \r | |
98 | **/\r | |
99 | EFI_STATUS\r | |
100 | EFIAPI\r | |
101 | WifiMgrDxeDriverBindingStart (\r | |
102 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
103 | IN EFI_HANDLE ControllerHandle,\r | |
104 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL\r | |
105 | );\r | |
106 | \r | |
107 | /**\r | |
108 | Stops a device controller or a bus controller.\r | |
109 | \r | |
110 | The Stop() function is designed to be invoked from the EFI boot service DisconnectController().\r | |
111 | As a result, much of the error checking on the parameters to Stop() has been moved\r | |
112 | into this common boot service. It is legal to call Stop() from other locations,\r | |
113 | but the following calling restrictions must be followed, or the system behavior will not be deterministic.\r | |
114 | 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this\r | |
115 | same driver's Start() function.\r | |
116 | 2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid\r | |
117 | EFI_HANDLE. In addition, all of these handles must have been created in this driver's\r | |
118 | Start() function, and the Start() function must have called OpenProtocol() on\r | |
119 | ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.\r | |
120 | \r | |
121 | @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.\r | |
122 | @param[in] ControllerHandle A handle to the device being stopped. The handle must\r | |
123 | support a bus specific I/O protocol for the driver\r | |
124 | to use to stop the device.\r | |
125 | @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.\r | |
126 | @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL\r | |
127 | if NumberOfChildren is 0.\r | |
128 | \r | |
129 | @retval EFI_SUCCESS The device was stopped.\r | |
130 | @retval EFI_DEVICE_ERROR The device could not be stopped due to a device error.\r | |
131 | \r | |
132 | **/\r | |
133 | EFI_STATUS\r | |
134 | EFIAPI\r | |
135 | WifiMgrDxeDriverBindingStop (\r | |
136 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
137 | IN EFI_HANDLE ControllerHandle,\r | |
138 | IN UINTN NumberOfChildren,\r | |
139 | IN EFI_HANDLE *ChildHandleBuffer OPTIONAL\r | |
140 | );\r | |
141 | \r | |
142 | #endif\r |