2 Declaration of structures and functions of MnpDxe driver.
4 Copyright (c) 2005 - 2010, Intel Corporation.<BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions
7 of the BSD License which accompanies this distribution. The full
8 text of the license may be found at<BR>
9 http://opensource.org/licenses/bsd-license.php
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.
19 #include "MnpDriver.h"
21 #define NET_ETHER_FCS_SIZE 4
23 #define MNP_SYS_POLL_INTERVAL (10 * TICKS_PER_MS) // 10 milliseconds
24 #define MNP_TIMEOUT_CHECK_INTERVAL (50 * TICKS_PER_MS) // 50 milliseconds
25 #define MNP_MEDIA_DETECT_INTERVAL (500 * TICKS_PER_MS) // 500 milliseconds
26 #define MNP_TX_TIMEOUT_TIME (500 * TICKS_PER_MS) // 500 milliseconds
27 #define MNP_INIT_NET_BUFFER_NUM 512
28 #define MNP_NET_BUFFER_INCREASEMENT 64
29 #define MNP_MAX_NET_BUFFER_NUM 65536
31 #define MNP_MAX_RCVD_PACKET_QUE_SIZE 256
33 #define MNP_RECEIVE_UNICAST 0x01
34 #define MNP_RECEIVE_BROADCAST 0x02
36 #define UNICAST_PACKET MNP_RECEIVE_UNICAST
37 #define BROADCAST_PACKET MNP_RECEIVE_BROADCAST
39 #define MNP_INSTANCE_DATA_SIGNATURE SIGNATURE_32 ('M', 'n', 'p', 'I')
41 #define MNP_INSTANCE_DATA_FROM_THIS(a) \
46 MNP_INSTANCE_DATA_SIGNATURE \
52 MNP_SERVICE_DATA
*MnpServiceData
;
58 EFI_MANAGED_NETWORK_PROTOCOL ManagedNetwork
;
63 LIST_ENTRY GroupCtrlBlkList
;
67 LIST_ENTRY RxDeliveredPacketQueue
;
68 LIST_ENTRY RcvdPacketQueue
;
69 UINTN RcvdPacketQueueSize
;
71 EFI_MANAGED_NETWORK_CONFIG_DATA ConfigData
;
78 EFI_MAC_ADDRESS Address
;
83 LIST_ENTRY CtrlBlkEntry
;
84 MNP_GROUP_ADDRESS
*GroupAddress
;
85 } MNP_GROUP_CONTROL_BLOCK
;
89 MNP_INSTANCE_DATA
*Instance
;
90 EFI_MANAGED_NETWORK_RECEIVE_DATA RxData
;
97 Initialize the mnp device context data.
99 @param[in, out] MnpDeviceData Pointer to the mnp device context data.
100 @param[in] ImageHandle The driver image handle.
101 @param[in] ControllerHandle Handle of device to bind driver to.
103 @retval EFI_SUCCESS The mnp service context is initialized.
104 @retval EFI_UNSUPPORTED ControllerHandle does not support Simple Network Protocol.
105 @retval Others Other errors as indicated.
109 MnpInitializeDeviceData (
110 IN OUT MNP_DEVICE_DATA
*MnpDeviceData
,
111 IN EFI_HANDLE ImageHandle
,
112 IN EFI_HANDLE ControllerHandle
116 Destroy the MNP device context data.
118 @param[in, out] MnpDeviceData Pointer to the mnp device context data.
119 @param[in] ImageHandle The driver image handle.
123 MnpDestroyDeviceData (
124 IN OUT MNP_DEVICE_DATA
*MnpDeviceData
,
125 IN EFI_HANDLE ImageHandle
129 Create mnp service context data.
131 @param[in] MnpDeviceData Pointer to the mnp device context data.
132 @param[in] VlanId The VLAN ID.
133 @param[in] Priority The VLAN priority. If VlanId is 0,
136 @return A pointer to MNP_SERVICE_DATA or NULL if failed to create MNP service context.
140 MnpCreateServiceData (
141 IN MNP_DEVICE_DATA
*MnpDeviceData
,
143 IN UINT8 Priority OPTIONAL
147 Initialize the mnp service context data.
149 @param[in, out] MnpServiceData Pointer to the mnp service context data.
150 @param[in] ImageHandle The driver image handle.
151 @param[in] ControllerHandle Handle of device to bind driver to.
153 @retval EFI_SUCCESS The mnp service context is initialized.
154 @retval EFI_UNSUPPORTED ControllerHandle does not support Simple Network Protocol.
155 @retval Others Other errors as indicated.
159 MnpInitializeServiceData (
160 IN OUT MNP_SERVICE_DATA
*MnpServiceData
,
161 IN EFI_HANDLE ImageHandle
,
162 IN EFI_HANDLE ControllerHandle
166 Destroy the MNP service context data.
168 @param[in, out] MnpServiceData Pointer to the mnp service context data.
170 @retval EFI_SUCCESS The mnp service context is destroyed.
171 @retval Others Errors as indicated.
175 MnpDestroyServiceData (
176 IN OUT MNP_SERVICE_DATA
*MnpServiceData
180 Destroy all child of the MNP service data.
182 @param[in, out] MnpServiceData Pointer to the mnp service context data.
184 @retval EFI_SUCCESS All child are destroyed.
185 @retval Others Failed to destroy all child.
189 MnpDestroyServiceChild (
190 IN OUT MNP_SERVICE_DATA
*MnpServiceData
194 Find the MNP Service Data for given VLAN ID.
196 @param[in] MnpDeviceData Pointer to the mnp device context data.
197 @param[in] VlanId The VLAN ID.
199 @return A pointer to MNP_SERVICE_DATA or NULL if not found.
204 IN MNP_DEVICE_DATA
*MnpDeviceData
,
209 Initialize the mnp instance context data.
211 @param[in] MnpServiceData Pointer to the mnp service context data.
212 @param[in, out] Instance Pointer to the mnp instance context data
217 MnpInitializeInstanceData (
218 IN MNP_SERVICE_DATA
*MnpServiceData
,
219 IN OUT MNP_INSTANCE_DATA
*Instance
223 Check whether the token specified by Arg matches the token in Item.
225 @param[in] Map Pointer to the NET_MAP.
226 @param[in] Item Pointer to the NET_MAP_ITEM.
227 @param[in] Arg Pointer to the Arg, it's a pointer to the token to
230 @retval EFI_SUCCESS The token specified by Arg is different from the
232 @retval EFI_ACCESS_DENIED The token specified by Arg is the same as that in
239 IN NET_MAP_ITEM
*Item
,
244 Cancel the token specified by Arg if it matches the token in Item.
246 @param[in, out] Map Pointer to the NET_MAP.
247 @param[in, out] Item Pointer to the NET_MAP_ITEM.
248 @param[in] Arg Pointer to the Arg, it's a pointer to the
251 @retval EFI_SUCCESS The Arg is NULL, and the token in Item is cancelled,
252 or the Arg isn't NULL, and the token in Item is
253 different from the Arg.
254 @retval EFI_ABORTED The Arg isn't NULL, the token in Item mathces the
255 Arg, and the token is cancelled.
261 IN OUT NET_MAP_ITEM
*Item
,
266 Flush the instance's received data.
268 @param[in, out] Instance Pointer to the mnp instance context data.
272 MnpFlushRcvdDataQueue (
273 IN OUT MNP_INSTANCE_DATA
*Instance
277 Configure the Instance using ConfigData.
279 @param[in, out] Instance Pointer to the mnp instance context data.
280 @param[in] ConfigData Pointer to the configuration data used to configure
283 @retval EFI_SUCCESS The Instance is configured.
284 @retval EFI_UNSUPPORTED EnableReceiveTimestamps is on and the
285 implementation doesn't support it.
286 @retval Others Other errors as indicated.
290 MnpConfigureInstance (
291 IN OUT MNP_INSTANCE_DATA
*Instance
,
292 IN EFI_MANAGED_NETWORK_CONFIG_DATA
*ConfigData OPTIONAL
296 Do the group operations for this instance.
298 @param[in, out] Instance Pointer to the instance context data.
299 @param[in] JoinFlag Set to TRUE to join a group. Set to TRUE to
300 leave a group/groups.
301 @param[in] MacAddress Pointer to the group address to join or leave.
302 @param[in] CtrlBlk Pointer to the group control block if JoinFlag
305 @retval EFI_SUCCESS The group operation finished.
306 @retval EFI_OUT_OF_RESOURCES Failed due to lack of memory resources.
307 @retval Others Other errors as indicated.
312 IN OUT MNP_INSTANCE_DATA
*Instance
,
314 IN EFI_MAC_ADDRESS
*MacAddress OPTIONAL
,
315 IN MNP_GROUP_CONTROL_BLOCK
*CtrlBlk OPTIONAL
319 Validates the Mnp transmit token.
321 @param[in] Instance Pointer to the Mnp instance context data.
322 @param[in] Token Pointer to the transmit token to check.
324 @return The Token is valid or not.
329 IN MNP_INSTANCE_DATA
*Instance
,
330 IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN
*Token
334 Build the packet to transmit from the TxData passed in.
336 @param[in] MnpServiceData Pointer to the mnp service context data.
337 @param[in] TxData Pointer to the transmit data containing the information
339 @param[out] PktBuf Pointer to record the address of the packet.
340 @param[out] PktLen Pointer to a UINT32 variable used to record the packet's
346 IN MNP_SERVICE_DATA
*MnpServiceData
,
347 IN EFI_MANAGED_NETWORK_TRANSMIT_DATA
*TxData
,
353 Synchronously send out the packet.
355 @param[in] MnpServiceData Pointer to the mnp service context data.
356 @param[in] Packet Pointer to the pakcet buffer.
357 @param[in] Length The length of the packet.
358 @param[in, out] Token Pointer to the token the packet generated from.
360 @retval EFI_SUCCESS The packet is sent out.
361 @retval EFI_TIMEOUT Time out occurs, the packet isn't sent.
362 @retval EFI_DEVICE_ERROR An unexpected network error occurs.
367 IN MNP_SERVICE_DATA
*MnpServiceData
,
370 IN OUT EFI_MANAGED_NETWORK_COMPLETION_TOKEN
*Token
374 Try to deliver the received packet to the instance.
376 @param[in, out] Instance Pointer to the mnp instance context data.
378 @retval EFI_SUCCESS The received packet is delivered, or there is no
379 packet to deliver, or there is no available receive
381 @retval EFI_OUT_OF_RESOURCES The deliver fails due to lack of memory resource.
385 MnpInstanceDeliverPacket (
386 IN OUT MNP_INSTANCE_DATA
*Instance
390 Recycle the RxData and other resources used to hold and deliver the received
393 @param[in] Event The event this notify function registered to.
394 @param[in] Context Pointer to the context data registerd to the Event.
405 Try to receive a packet and deliver it.
407 @param[in, out] MnpDeviceData Pointer to the mnp device context data.
409 @retval EFI_SUCCESS add return value to function comment
410 @retval EFI_NOT_STARTED The simple network protocol is not started.
411 @retval EFI_NOT_READY No packet received.
412 @retval EFI_DEVICE_ERROR An unexpected error occurs.
417 IN OUT MNP_DEVICE_DATA
*MnpDeviceData
421 Allocate a free NET_BUF from MnpDeviceData->FreeNbufQue. If there is none
422 in the queue, first try to allocate some and add them into the queue, then
423 fetch the NET_BUF from the updated FreeNbufQue.
425 @param[in, out] MnpDeviceData Pointer to the MNP_DEVICE_DATA.
427 @return Pointer to the allocated free NET_BUF structure, if NULL the
433 IN OUT MNP_DEVICE_DATA
*MnpDeviceData
437 Try to reclaim the Nbuf into the buffer pool.
439 @param[in, out] MnpDeviceData Pointer to the mnp device context data.
440 @param[in, out] Nbuf Pointer to the NET_BUF to free.
445 IN OUT MNP_DEVICE_DATA
*MnpDeviceData
,
450 Remove the received packets if timeout occurs.
452 @param[in] Event The event this notify function registered to.
453 @param[in] Context Pointer to the context data registered to the event.
458 MnpCheckPacketTimeout (
464 Poll to update MediaPresent field in SNP ModeData by Snp.GetStatus().
466 @param[in] Event The event this notify function registered to.
467 @param[in] Context Pointer to the context data registered to the event.
472 MnpCheckMediaStatus (
478 Poll to receive the packets from Snp. This function is either called by upperlayer
479 protocols/applications or the system poll timer notify mechanism.
481 @param[in] Event The event this notify function registered to.
482 @param[in] Context Pointer to the context data registered to the event.
493 Returns the operational parameters for the current MNP child driver. May also
494 support returning the underlying SNP driver mode data.
496 The GetModeData() function is used to read the current mode data (operational
497 parameters) from the MNP or the underlying SNP.
499 @param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
500 @param[out] MnpConfigData Pointer to storage for MNP operational parameters. Type
501 EFI_MANAGED_NETWORK_CONFIG_DATA is defined in "Related
503 @param[out] SnpModeData Pointer to storage for SNP operational parameters. This
504 feature may be unsupported. Type EFI_SIMPLE_NETWORK_MODE
505 is defined in the EFI_SIMPLE_NETWORK_PROTOCOL.
507 @retval EFI_SUCCESS The operation completed successfully.
508 @retval EFI_INVALID_PARAMETER This is NULL.
509 @retval EFI_UNSUPPORTED The requested feature is unsupported in this
511 @retval EFI_NOT_STARTED This MNP child driver instance has not been
512 configured. The default values are returned in
513 MnpConfigData if it is not NULL.
514 @retval Others The mode data could not be read.
520 IN EFI_MANAGED_NETWORK_PROTOCOL
*This
,
521 OUT EFI_MANAGED_NETWORK_CONFIG_DATA
*MnpConfigData OPTIONAL
,
522 OUT EFI_SIMPLE_NETWORK_MODE
*SnpModeData OPTIONAL
526 Sets or clears the operational parameters for the MNP child driver.
528 The Configure() function is used to set, change, or reset the operational
529 parameters for the MNP child driver instance. Until the operational parameters
530 have been set, no network traffic can be sent or received by this MNP child
531 driver instance. Once the operational parameters have been reset, no more
532 traffic can be sent or received until the operational parameters have been set
534 Each MNP child driver instance can be started and stopped independently of
535 each other by setting or resetting their receive filter settings with the
536 Configure() function.
537 After any successful call to Configure(), the MNP child driver instance is
538 started. The internal periodic timer (if supported) is enabled. Data can be
539 transmitted and may be received if the receive filters have also been enabled.
540 Note: If multiple MNP child driver instances will receive the same packet
541 because of overlapping receive filter settings, then the first MNP child
542 driver instance will receive the original packet and additional instances will
543 receive copies of the original packet.
544 Note: Warning: Receive filter settings that overlap will consume extra
545 processor and/or DMA resources and degrade system and network performance.
547 @param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
548 @param[in] MnpConfigData Pointer to configuration data that will be assigned
549 to the MNP child driver instance. If NULL, the MNP
550 child driver instance is reset to startup defaults
551 and all pending transmit and receive requests are
552 flushed. Type EFI_MANAGED_NETWORK_CONFIG_DATA is
553 defined in EFI_MANAGED_NETWORK_PROTOCOL.GetModeData().
555 @retval EFI_SUCCESS The operation completed successfully.
556 @retval EFI_INVALID_PARAMETER One or more of the following conditions is
559 * MnpConfigData.ProtocolTypeFilter is not
561 The operational data for the MNP child driver
562 instance is unchanged.
563 @retval EFI_OUT_OF_RESOURCES Required system resources (usually memory)
564 could not be allocated.
565 The MNP child driver instance has been reset to
567 @retval EFI_UNSUPPORTED The requested feature is unsupported in
568 this [MNP] implementation. The operational data
569 for the MNP child driver instance is unchanged.
570 @retval EFI_DEVICE_ERROR An unexpected network or system error
571 occurred. The MNP child driver instance has
572 been reset to startup defaults.
573 @retval Others The MNP child driver instance has been reset to
580 IN EFI_MANAGED_NETWORK_PROTOCOL
*This
,
581 IN EFI_MANAGED_NETWORK_CONFIG_DATA
*MnpConfigData OPTIONAL
585 Translates an IP multicast address to a hardware (MAC) multicast address. This
586 function may be unsupported in some MNP implementations.
588 The McastIpToMac() function translates an IP multicast address to a hardware
589 (MAC) multicast address. This function may be implemented by calling the
590 underlying EFI_SIMPLE_NETWORK. MCastIpToMac() function, which may also be
591 unsupported in some MNP implementations.
593 @param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
594 @param[in] Ipv6Flag Set to TRUE to if IpAddress is an IPv6 multicast address.
595 Set to FALSE if IpAddress is an IPv4 multicast address.
596 @param[in] IpAddress Pointer to the multicast IP address (in network byte
598 @param[out] MacAddress Pointer to the resulting multicast MAC address.
600 @retval EFI_SUCCESS The operation completed successfully.
601 @retval EFI_INVALID_PARAMETER One of the following conditions is TRUE:
604 * IpAddress is not a valid multicast IP
606 * MacAddress is NULL.
607 @retval EFI_NOT_STARTED This MNP child driver instance has not been
609 @retval EFI_UNSUPPORTED The requested feature is unsupported in this
611 @retval EFI_DEVICE_ERROR An unexpected network or system error occurred.
612 @retval Others The address could not be converted.
617 IN EFI_MANAGED_NETWORK_PROTOCOL
*This
,
619 IN EFI_IP_ADDRESS
*IpAddress
,
620 OUT EFI_MAC_ADDRESS
*MacAddress
624 Enables and disables receive filters for multicast address. This function may
625 be unsupported in some MNP implementations.
627 The Groups() function only adds and removes multicast MAC addresses from the
628 filter list. The MNP driver does not transmit or process Internet Group
629 Management Protocol (IGMP) packets. If JoinFlag is FALSE and MacAddress is
630 NULL, then all joined groups are left.
632 @param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
633 @param[in] JoinFlag Set to TRUE to join this multicast group.
634 Set to FALSE to leave this multicast group.
635 @param[in] MacAddress Pointer to the multicast MAC group (address) to join or
638 @retval EFI_SUCCESS The requested operation completed successfully.
639 @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
641 * JoinFlag is TRUE and MacAddress is NULL.
642 * MacAddress is not a valid multicast MAC
644 * The MNP multicast group settings are
646 @retval EFI_NOT_STARTED This MNP child driver instance has not been
648 @retval EFI_ALREADY_STARTED The supplied multicast group is already joined.
649 @retval EFI_NOT_FOUND The supplied multicast group is not joined.
650 @retval EFI_DEVICE_ERROR An unexpected network or system error occurred.
651 The MNP child driver instance has been reset to
653 @retval EFI_UNSUPPORTED The requested feature is unsupported in this MNP
655 @retval Others The requested operation could not be completed.
656 The MNP multicast group settings are unchanged.
662 IN EFI_MANAGED_NETWORK_PROTOCOL
*This
,
664 IN EFI_MAC_ADDRESS
*MacAddress OPTIONAL
668 Places asynchronous outgoing data packets into the transmit queue.
670 The Transmit() function places a completion token into the transmit packet
671 queue. This function is always asynchronous.
672 The caller must fill in the Token.Event and Token.TxData fields in the
673 completion token, and these fields cannot be NULL. When the transmit operation
674 completes, the MNP updates the Token.Status field and the Token.Event is
676 Note: There may be a performance penalty if the packet needs to be
677 defragmented before it can be transmitted by the network device. Systems in
678 which performance is critical should review the requirements and features of
679 the underlying communications device and drivers.
682 @param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
683 @param[in] Token Pointer to a token associated with the transmit data
684 descriptor. Type EFI_MANAGED_NETWORK_COMPLETION_TOKEN
685 is defined in "Related Definitions" below.
687 @retval EFI_SUCCESS The transmit completion token was cached.
688 @retval EFI_NOT_STARTED This MNP child driver instance has not been
690 @retval EFI_INVALID_PARAMETER One or more of the following conditions is
694 * Token.Event is NULL.
695 * Token.TxData is NULL.
696 * Token.TxData.DestinationAddress is not
697 NULL and Token.TxData.HeaderLength is zero.
698 * Token.TxData.FragmentCount is zero.
699 * (Token.TxData.HeaderLength +
700 Token.TxData.DataLength) is not equal to the
702 Token.TxData.FragmentTable[].FragmentLength
705 Token.TxData.FragmentTable[].FragmentLength
708 Token.TxData.FragmentTable[].FragmentBufferfields
710 * Token.TxData.DataLength is greater than MTU.
711 @retval EFI_ACCESS_DENIED The transmit completion token is already in the
713 @retval EFI_OUT_OF_RESOURCES The transmit data could not be queued due to a
714 lack of system resources (usually memory).
715 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
716 The MNP child driver instance has been reset to
718 @retval EFI_NOT_READY The transmit request could not be queued because
719 the transmit queue is full.
725 IN EFI_MANAGED_NETWORK_PROTOCOL
*This
,
726 IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN
*Token
730 Aborts an asynchronous transmit or receive request.
732 The Cancel() function is used to abort a pending transmit or receive request.
733 If the token is in the transmit or receive request queues, after calling this
734 function, Token.Status will be set to EFI_ABORTED and then Token.Event will be
735 signaled. If the token is not in one of the queues, which usually means that
736 the asynchronous operation has completed, this function will not signal the
737 token and EFI_NOT_FOUND is returned.
739 @param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
740 @param[in] Token Pointer to a token that has been issued by
741 EFI_MANAGED_NETWORK_PROTOCOL.Transmit() or
742 EFI_MANAGED_NETWORK_PROTOCOL.Receive(). If NULL, all
743 pending tokens are aborted.
745 @retval EFI_SUCCESS The asynchronous I/O request was aborted and
746 Token.Event was signaled. When Token is NULL,
747 all pending requests were aborted and their
748 events were signaled.
749 @retval EFI_NOT_STARTED This MNP child driver instance has not been
751 @retval EFI_INVALID_PARAMETER This is NULL.
752 @retval EFI_NOT_FOUND When Token is not NULL, the asynchronous I/O
753 request was not found in the transmit or
754 receive queue. It has either completed or was
755 not issued by Transmit() and Receive().
761 IN EFI_MANAGED_NETWORK_PROTOCOL
*This
,
762 IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN
*Token OPTIONAL
766 Places an asynchronous receiving request into the receiving queue.
768 The Receive() function places a completion token into the receive packet
769 queue. This function is always asynchronous.
770 The caller must fill in the Token.Event field in the completion token, and
771 this field cannot be NULL. When the receive operation completes, the MNP
772 updates the Token.Status and Token.RxData fields and the Token.Event is
775 @param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
776 @param[in] Token Pointer to a token associated with the receive
777 data descriptor. Type
778 EFI_MANAGED_NETWORK_COMPLETION_TOKEN is defined in
779 EFI_MANAGED_NETWORK_PROTOCOL.Transmit().
781 @retval EFI_SUCCESS The receive completion token was cached.
782 @retval EFI_NOT_STARTED This MNP child driver instance has not been
784 @retval EFI_INVALID_PARAMETER One or more of the following conditions is
788 * Token.Event is NULL
789 @retval EFI_OUT_OF_RESOURCES The transmit data could not be queued due to a
790 lack of system resources (usually memory).
791 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
792 The MNP child driver instance has been reset to
794 @retval EFI_ACCESS_DENIED The receive completion token was already in the
796 @retval EFI_NOT_READY The receive request could not be queued because
797 the receive queue is full.
803 IN EFI_MANAGED_NETWORK_PROTOCOL
*This
,
804 IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN
*Token
808 Polls for incoming data packets and processes outgoing data packets.
810 The Poll() function can be used by network drivers and applications to
811 increase the rate that data packets are moved between the communications
812 device and the transmit and receive queues.
813 Normally, a periodic timer event internally calls the Poll() function. But, in
814 some systems, the periodic timer event may not call Poll() fast enough to
815 transmit and/or receive all data packets without missing packets. Drivers and
816 applications that are experiencing packet loss should try calling the Poll()
819 @param[in] This Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.
821 @retval EFI_SUCCESS Incoming or outgoing data was processed.
822 @retval EFI_NOT_STARTED This MNP child driver instance has not been
824 @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The
825 MNP child driver instance has been reset to startup
827 @retval EFI_NOT_READY No incoming or outgoing data was processed. Consider
828 increasing the polling rate.
829 @retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive
830 queue. Consider increasing the polling rate.
836 IN EFI_MANAGED_NETWORK_PROTOCOL
*This
840 Configure the Snp receive filters according to the instances' receive filter
843 @param[in] MnpDeviceData Pointer to the mnp device context data.
845 @retval EFI_SUCCESS The receive filters is configured.
846 @retval EFI_OUT_OF_RESOURCES The receive filters can't be configured due
847 to lack of memory resource.
851 MnpConfigReceiveFilters (
852 IN MNP_DEVICE_DATA
*MnpDeviceData