/* This function send the RNDIS command through the device's Data endpoint */
EFI_STATUS RndisTransmitDataMsg(IN USB_RNDIS_DEVICE *UsbRndisDevice, IN REMOTE_NDIS_MSG_HEADER *RndisMsg, IN OUT UINTN *TransferLength)
/* This function send the RNDIS command through the device's Data endpoint */
EFI_STATUS RndisTransmitDataMsg(IN USB_RNDIS_DEVICE *UsbRndisDevice, IN REMOTE_NDIS_MSG_HEADER *RndisMsg, IN OUT UINTN *TransferLength)
{
  EFI_STATUS  Status;
  UINT32      UsbStatus;
  if (UsbRndisDevice->BulkInEndpoint == 0) {
    GetEndpoint (UsbRndisDevice->UsbIoCdcData, UsbRndisDevice);
  }
  PrintRndisMsg (RndisMsg);
  Status = UsbRndisDevice->UsbIoCdcData->UsbBulkTransfer (
                                           UsbRndisDevice->UsbIoCdcData,
                                           UsbRndisDevice->BulkOutEndpoint,
                                           RndisMsg,
                                           TransferLength,
                                           USB_TX_ETHERNET_BULK_TIMEOUT,
                                           &UsbStatus
                                           );
  if (Status == EFI_SUCCESS) {
    gStopBulkInCnt = MAXIMUM_STOPBULKIN_CNT;
  }
  return Status;
}