/* @this: the instance of the Simple Network Protocol @int_status: interface status @txbuf: transmission buffer  */
static efi_status_t EFIAPI efi_net_get_status(struct efi_simple_network *this, u32 *int_status, void **txbuf)
/* @this: the instance of the Simple Network Protocol @int_status: interface status @txbuf: transmission buffer  */
static efi_status_t EFIAPI efi_net_get_status(struct efi_simple_network *this, u32 *int_status, void **txbuf)
{
	efi_status_t ret = EFI_SUCCESS;
	EFI_ENTRY("%p, %p, %p", this, int_status, txbuf);
	efi_timer_check();
	if (!this) {
		ret = EFI_INVALID_PARAMETER;
		goto out;
	}
	switch (this->mode->state) {
	case EFI_NETWORK_STOPPED:
		ret = EFI_NOT_STARTED;
		goto out;
	case EFI_NETWORK_STARTED:
		ret = EFI_DEVICE_ERROR;
		goto out;
	default:
		break;
	}
	if (int_status) {
		*int_status = this->int_status;
		this->int_status = 0;
	}
	if (txbuf)
		*txbuf = new_tx_packet;
	new_tx_packet = NULL;
out:
	return EFI_EXIT(ret);
}