1.6.3.18 DRV_G3ADP_MAC_EventAcknowledge Function

C

bool DRV_G3ADP_MAC_EventAcknowledge(DRV_HANDLE hMac, TCPIP_MAC_EVENT tcpAckEv);

Summary

Acknowledges and re-enables processed events.

Description

This function acknowledges and re-enables processed events. Multiple events can be ORed together as they are processed together. The events acknowledged by this function should be the events that have been retrieved from the stack by calling DRV_G3ADP_MAC_EventPendingGet() or have been passed to the stack by the driver using the registered notification handler and have been processed and have to be re-enabled.

Precondition

DRV_G3ADP_MAC_Initialize must have been called to set up the driver. DRV_G3ADP_MAC_Open() should have been called to obtain a valid handle.

Parameters

ParamDescription
hMacHandle identifying the MAC driver client
tcpAckEvThe events that the user processed and need to be re-enabled

Returns

  • true if events acknowledged

  • false if no events to be acknowledged

Example

    TCPIP_MAC_EVENT activeEvents;

    // Get Pending events
    activeEvents = DRV_G3ADP_MAC_EventPendingGet(pNetIf->hIfMac);
    // Process events
    (...)
    // Acknowledge events
    DRV_G3ADP_MAC_EventAcknowledge( hMac, activeEvents );

Remarks

  • All events should be acknowledged, in order to be re-enabled.

  • Some events are fatal errors and should not be acknowledged ( TCPIP_MAC_EV_RX_BUSERR, TCPIP_MAC_EV_TX_BUSERR). Driver/stack re-initialization is needed under such circumstances.

  • Some events are just system/application behavior and they are intended only as simple info (TCPIP_MAC_EV_RX_OVFLOW, TCPIP_MAC_EV_RX_BUFNA, TCPIP_MAC_EV_TX_ABORT, TCPIP_MAC_EV_RX_ACT).

  • The events are persistent. They shouldn't be re-enabled unless they have been processed and the condition that generated them was removed. Re-enabling them immediately without proper processing will have dramatic effects on system performance.