MINIPORT_WDI_TX_ABORT callback function

The MiniportWdiTxAbort handler function aborts outstanding TX frames for a given port or peer, which includes initiating the completion of frames owned by the TAL/target. This request is issued to the TAL as part of handling MiniportPause (adapter-wide TX abort), dot11 reset (port-wide abort), and after NdisWdiPeerDeleteIndication if WDI is operating in peer queuing mode.

This is a WDI miniport handler inside NDIS_MINIPORT_WDI_DATA_HANDLERS.

Note  You must declare the function by using the MINIPORT_WDI_TX_ABORT type. For more information, see the following Examples section.
 

Syntax

MINIPORT_WDI_TX_ABORT MiniportWdiTxAbort;

void MiniportWdiTxAbort(
  TAL_TXRX_HANDLE MiniportTalTxRxContext,
  WDI_PORT_ID PortId,
  WDI_PEER_ID PeerId,
  NDIS_STATUS *pWifiStatus
)
{...}

Parameters

MiniportTalTxRxContext

TAL device handle returned by the IHV miniport in MiniportWdiTalTxRxInitialize.

PortId

The port ID.

PeerId

The peer ID.

*pWifiStatus

Pointer to a status of the MiniportWdiTxAbort, which should be set by the IHV miniport. See the Remarks section for more information.

Return Value

This callback function does not return a value.

Remarks

A wildcard may be specified for the PeerId to stop TX on a port.

A wildcard for PortId and PeerId may be specified to stop TX across the adapter.

To complete the stop operation, the TAL must do the following steps.

  1. Initiate the return of ownership of TX data buffers corresponding to the input parameters to the host. These frames should be completed by indicating transfer completion for all frames passed to the TxEngine in send requests and indicating NdisWdiTxSendCompleteIndication for outstanding TX frames that require explicit send completion (if the TX frame was not transfer completed with a success code).
  2. Return a success status, or return a pending status and issue NdisWdiTxAbortConfirm later.

Examples

To define a MiniportWdiTxAbort function, you must first provide a function declaration that identifies the type of function you're defining. Windows provides a set of function types for drivers. Declaring a function using the function types helps Code Analysis for Drivers, Static Driver Verifier (SDV), and other verification tools find errors, and it's a requirement for writing drivers for the Windows operating system.

For example, to define a MiniportWdiTxAbort function that is named "MyTxAbort", use the MINIPORT_WDI_TX_ABORT type as shown in this code example:

MINIPORT_WDI_TX_ABORT MyTxAbort;
Then, implement your function as follows:
_Use_decl_annotations_
VOID
 MyTxAbort(
    TAL_TXRX_HANDLE MiniportTalTxRxContext,
    WDI_PORT_ID PortId,
    WDI_PEER_ID PeerId,
    NDIS_STATUS *pWifiStatus
    )
  {...}
The MINIPORT_WDI_TX_ABORT function type is defined in the dot11wdi.h header file. To more accurately identify errors when you run the code analysis tools, be sure to add the _Use_decl_annotations_ annotation to your function definition. The _Use_decl_annotations_ annotation ensures that the annotations that are applied to the MINIPORT_WDI_TX_ABORT function type in the header file are used. For more information about the requirements for function declarations, see Declaring Functions by Using Function Role Types for NDIS Drivers.

For information about Use_decl_annotations, see Annotating Function Behavior.

Requirements

   
Minimum supported client Windows 10
Minimum supported server Windows Server 2016
Target Platform Windows
Header dot11wdi.h

See Also

MiniportPause

NDIS_MINIPORT_WDI_DATA_HANDLERS

NdisWdiPeerDeleteIndication

NdisWdiTxAbortConfirm

NdisWdiTxSendCompleteIndication

TAL_TXRX_HANDLE

WDI TX path

WDI_PEER_ID

WDI_PORT_ID