/* Try to recycle all the transmitted buffer address from SNP. */
EFI_STATUS MnpRecycleTxBuf(IN OUT MNP_DEVICE_DATA *MnpDeviceData)
/* Try to recycle all the transmitted buffer address from SNP. */
EFI_STATUS MnpRecycleTxBuf(IN OUT MNP_DEVICE_DATA *MnpDeviceData)
{
  UINT8                        *TxBuf;
  EFI_SIMPLE_NETWORK_PROTOCOL  *Snp;
  EFI_STATUS                   Status;
  Snp = MnpDeviceData->Snp;
  ASSERT (Snp != NULL);
  do {
    TxBuf  = NULL;
    Status = Snp->GetStatus (Snp, NULL, (VOID **)&TxBuf);
    if (EFI_ERROR (Status)) {
      return Status;
    }
    if (TxBuf != NULL) {
      MnpFreeTxBuf (MnpDeviceData, TxBuf);
    }
  } while (TxBuf != NULL);
  return EFI_SUCCESS;
}