diff options
| author | Michael Brown | 2012-03-02 19:02:03 +0100 |
|---|---|---|
| committer | Michael Brown | 2012-03-02 19:02:03 +0100 |
| commit | 6324bd9389521c7e86384591f41eb78a81e9af47 (patch) | |
| tree | 2047727059c7c2daf309bc00002571c3a20de1e9 /src/include | |
| parent | [iscsi] Send any padding inline with the data segment (diff) | |
| download | ipxe-6324bd9389521c7e86384591f41eb78a81e9af47.tar.gz ipxe-6324bd9389521c7e86384591f41eb78a81e9af47.tar.xz ipxe-6324bd9389521c7e86384591f41eb78a81e9af47.zip | |
[undi] Allow underlying PXE stack to construct link-layer header
Some PXE stacks (observed with a QLogic 8242) will always try to
prepend a link-layer header, even if the caller uses P_UNKNOWN to
indicate that the link-layer header has already been filled in. This
results in an invalid packet being transmitted.
Work around these faulty PXE stacks where possible by stripping the
existing link-layer header and allowing the PXE stack to (re)construct
the link-layer header itself.
Originally-fixed-by: Buck Huppmann <buckh@pobox.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/ipxe/ethernet.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/include/ipxe/ethernet.h b/src/include/ipxe/ethernet.h index 7e49655a3..3d2d462ef 100644 --- a/src/include/ipxe/ethernet.h +++ b/src/include/ipxe/ethernet.h @@ -10,6 +10,8 @@ FILE_LICENCE ( GPL2_OR_LATER ); #include <stdint.h> +#include <ipxe/netdevice.h> +#include <ipxe/iobuf.h> /** * Check if Ethernet address is all zeroes @@ -77,6 +79,12 @@ static inline int is_valid_ether_addr ( const void *addr ) { ( ! is_zero_ether_addr ( addr ) ) ); } +extern int eth_push ( struct net_device *netdev, struct io_buffer *iobuf, + const void *ll_dest, const void *ll_source, + uint16_t net_proto ); +extern int eth_pull ( struct net_device *netdev, struct io_buffer *iobuf, + const void **ll_dest, const void **ll_source, + uint16_t *net_proto, unsigned int *flags ); extern void eth_init_addr ( const void *hw_addr, void *ll_addr ); extern const char * eth_ntoa ( const void *ll_addr ); extern int eth_mc_hash ( unsigned int af, const void *net_addr, |
