mirror of
https://github.com/ipxe/ipxe
synced 2025-12-25 00:17:57 +03:00
[rndis] Add rndis_rx_err()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -347,6 +347,8 @@ extern void rndis_tx_complete_err ( struct rndis_device *rndis,
|
|||||||
extern int rndis_tx_defer ( struct rndis_device *rndis,
|
extern int rndis_tx_defer ( struct rndis_device *rndis,
|
||||||
struct io_buffer *iobuf );
|
struct io_buffer *iobuf );
|
||||||
extern void rndis_rx ( struct rndis_device *rndis, struct io_buffer *iobuf );
|
extern void rndis_rx ( struct rndis_device *rndis, struct io_buffer *iobuf );
|
||||||
|
extern void rndis_rx_err ( struct rndis_device *rndis, struct io_buffer *iobuf,
|
||||||
|
int rc );
|
||||||
|
|
||||||
extern struct rndis_device * alloc_rndis ( size_t priv_len );
|
extern struct rndis_device * alloc_rndis ( size_t priv_len );
|
||||||
extern int register_rndis ( struct rndis_device *rndis );
|
extern int register_rndis ( struct rndis_device *rndis );
|
||||||
|
|||||||
@@ -795,6 +795,21 @@ void rndis_rx ( struct rndis_device *rndis, struct io_buffer *iobuf ) {
|
|||||||
netdev_rx_err ( netdev, iob_disown ( iobuf ), rc );
|
netdev_rx_err ( netdev, iob_disown ( iobuf ), rc );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Discard packet from underlying transport layer
|
||||||
|
*
|
||||||
|
* @v rndis RNDIS device
|
||||||
|
* @v iobuf I/O buffer
|
||||||
|
* @v rc Packet status code
|
||||||
|
*/
|
||||||
|
void rndis_rx_err ( struct rndis_device *rndis, struct io_buffer *iobuf,
|
||||||
|
int rc ) {
|
||||||
|
struct net_device *netdev = rndis->netdev;
|
||||||
|
|
||||||
|
/* Record error */
|
||||||
|
netdev_rx_err ( netdev, iob_disown ( iobuf ), rc );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set receive filter
|
* Set receive filter
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user