|
@@ -316,18 +316,22 @@ PXENV_EXIT_t pxenv_undi_transmit ( struct s_PXENV_UNDI_TRANSMIT
|
316
|
316
|
}
|
317
|
317
|
}
|
318
|
318
|
|
|
319
|
+ /* Flag transmission as in-progress. Do this before starting
|
|
320
|
+ * to transmit the packet, because the ISR may trigger before
|
|
321
|
+ * we return from netdev_tx().
|
|
322
|
+ */
|
|
323
|
+ undi_tx_count++;
|
|
324
|
+
|
319
|
325
|
/* Transmit packet */
|
320
|
|
- DBG2 ( "\n" ); /* ISR may trigger before we return from netdev_tx() */
|
|
326
|
+ DBG2 ( "\n" );
|
321
|
327
|
if ( ( rc = netdev_tx ( pxe_netdev, iobuf ) ) != 0 ) {
|
322
|
328
|
DBG2 ( "PXENV_UNDI_TRANSMIT could not transmit: %s\n",
|
323
|
329
|
strerror ( rc ) );
|
|
330
|
+ undi_tx_count--;
|
324
|
331
|
undi_transmit->Status = PXENV_STATUS ( rc );
|
325
|
332
|
return PXENV_EXIT_FAILURE;
|
326
|
333
|
}
|
327
|
334
|
|
328
|
|
- /* Flag transmission as in-progress */
|
329
|
|
- undi_tx_count++;
|
330
|
|
-
|
331
|
335
|
undi_transmit->Status = PXENV_STATUS_SUCCESS;
|
332
|
336
|
return PXENV_EXIT_SUCCESS;
|
333
|
337
|
}
|