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