EVT_WIFI_DEVICE_SEND_COMMAND callback function (wificx.h)

A WiFiCx driver's EvtWifiDeviceSendCommand callback function retrieves and processes a command message sent by the WiFiCx framework.

Syntax

EVT_WIFI_DEVICE_SEND_COMMAND EvtWifiDeviceSendCommand;

void EvtWifiDeviceSendCommand(
  WDFDEVICE Device,
  WIFIREQUEST SendRequest
)
{...}

Parameters

Device

[In] A handle to a framework device object that the client driver obtained from a previous call to WdfDeviceCreate.

SendRequest

[In] A handle to a framework WIFIREQUEST object that represents a command message.

Return value

None

Remarks

A WiFiCx client driver must register its EvtWifiDeviceSendCommand callback function by calling WiFiDeviceInitialize.

The WiFiCx framework invokes EvtWifiDeviceSendCommand to issue a command message to the client driver.

  • To retrieve the message, the client driver calls WifiRequestGetInOutBuffer to get the input/output buffer and buffer lengths. The driver also needs to call WifiRequestGetMessageId to retrieve the message ID.

  • To complete the request, the driver sends the M3 for the command asynchronously by calling WifiRequestComplete.

  • If this command is a set command and the original request did not contain a large enough buffer, the client should call WifiRequestSetBytesNeeded to set the required buffer size and then fail the request with status BUFFER_OVERFLOW.

  • If this command is a task command, the client driver needs to later send the associated M4 indication by calling WifiDeviceReceiveIndication and pass the indication buffer with a WDI header that contains the same message ID as contained in the M1.

For more information, see Handling WiFiCx command messages.

Requirements

Requirement Value
Minimum supported client Windows 11
Minimum supported server Windows Server 2022
Header wificx.h
IRQL <= DISPATCH_LEVEL

See also

Handling WiFiCx command messages

WiFiDeviceInitialize

WifiRequestGetInOutBuffer

WifiRequestGetMessageId

WifiRequestComplete