Bewerken

Delen via


MINIPORT_WDI_TX_DATA_SEND callback function (dot11wdi.h)

Important

This topic is part of the WDI driver model released in Windows 10. The WDI driver model is in maintenance mode and will only receive high priority fixes. WiFiCx is the Wi-Fi driver model released in Windows 11. We recommend that you use WiFiCx to take advantage of the latest features.

The MiniportWdiTxDataSend handler function specifies an RA-TID or port queue to transmit from. It is issued in the context of the TX thread from the operating system, resume indication, or a work item.

This is a WDI miniport handler inside NDIS_MINIPORT_WDI_DATA_HANDLERS.

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

Syntax

MINIPORT_WDI_TX_DATA_SEND MiniportWdiTxDataSend;

void MiniportWdiTxDataSend(
  [in] TAL_TXRX_HANDLE MiniportTalTxRxContext,
  [in] WDI_PORT_ID PortId,
  [in] WDI_PEER_ID PeerId,
  [in] WDI_EXTENDED_TID ExTid,
  [in] UINT16 NumQueueFrames,
  [in] UINT32 NumActiveFrames,
  [in] BOOLEAN bRobustnessFlag
)
{...}

Parameters

[in] MiniportTalTxRxContext

TAL device handle returned by the IHV miniport in MiniportWdiTalTxRxInitialize.

[in] PortId

The port ID.

[in] PeerId

The peer ID.

[in] ExTid

The Extended TID.

[in] NumQueueFrames

The queue length, in frames.

[in] NumActiveFrames

The total number of frames in action (schedulable) queues.

[in] bRobustnessFlag

The robustness flag. If the robustness flag is set to TRUE, the NIC ensures reliable delivery within a small number of retries by aggressively lowering the TX data rate used for the frame using CTS and/or other mechanisms.

Return value

None

Remarks

In port queuing mode, the WDI_PEER_ID and WDI_EXTENDED_TID are set to wildcards. In the context of the send request, the TxEngine issues NdisWdiTxDequeueIndication to take ownership of a number of frames from the FIFO RA-TID queue and transfer them to the target. If it cannot dequeue any frames, the TxEngine issues NdisWdiTxSendPauseIndication in the same context instead of NdisWdiTxDequeueIndication.

The TxEngine must issue a transfer complete and send complete indications to return ownership of any frames it dequeues to TxMgr. If the transfer complete contains a failure code, the TxEngine must not issue a send completion.

Examples

To define a MiniportWdiTxDataSend 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 MiniportWdiTxDataSend function that is named "MyTxDataSend", use the MINIPORT_WDI_TX_DATA_SEND type as shown in this code example:

MINIPORT_WDI_TX_DATA_SEND MyTxDataSend;

Then, implement your function as follows:

_Use_decl_annotations_
VOID
 MyTxDataSend(
    TAL_TXRX_HANDLE MiniportTalTxRxContext,
    WDI_PORT_ID PortId,
    WDI_PEER_ID PeerId,
    WDI_EXTENDED_TID ExTid,
    UINT16 NumQueueFrames,
    UINT32 NumActiveFrames,
    BOOLEAN bRobustnessFlag
    )
  {...}

The MINIPORT_WDI_TX_DATA_SEND 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_DATA_SEND 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

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

See also

NDIS_MINIPORT_WDI_DATA_HANDLERS

NdisWdiTxDequeueIndication

NdisWdiTxSendPauseIndication

TAL_TXRX_HANDLE

WDI TX path

WDI_EXTENDED_TID

WDI_PEER_ID

WDI_PORT_ID