aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/ipxe/rndis.h2
-rw-r--r--src/net/rndis.c15
2 files changed, 17 insertions, 0 deletions
diff --git a/src/include/ipxe/rndis.h b/src/include/ipxe/rndis.h
index b7c9c06..bc077f2 100644
--- a/src/include/ipxe/rndis.h
+++ b/src/include/ipxe/rndis.h
@@ -347,6 +347,8 @@ extern void rndis_tx_complete_err ( struct rndis_device *rndis,
extern int rndis_tx_defer ( 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 int register_rndis ( struct rndis_device *rndis );
diff --git a/src/net/rndis.c b/src/net/rndis.c
index cd710a4..48447f1 100644
--- a/src/net/rndis.c
+++ b/src/net/rndis.c
@@ -796,6 +796,21 @@ void rndis_rx ( struct rndis_device *rndis, struct io_buffer *iobuf ) {
}
/**
+ * 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
*
* @v rndis RNDIS device