The first get status call (efi_call_3(net->get_status, ...)) returns GRUB_EFI_SUCCESS and sets txbuf to 0. The second time this function is called it enters the while loop and the get status call (efi_call_3(net->get_status, ...)) returns GRUB_EFI_SUCCESS and sets txbuf to 1 which does not match the address of dev->txbuf.
The first get status call (efi_call_ 3(net-> get_status, ...)) returns GRUB_EFI_SUCCESS and sets txbuf to 0. The second time this function is called it enters the while loop and the get status call (efi_call_ 3(net-> get_status, ...)) returns GRUB_EFI_SUCCESS and sets txbuf to 1 which does not match the address of dev->txbuf.