NET: Do not use dev->hard_header_len in eth_header()
The actual return value of eth_header() is never used, only its sign. So it does not make a difference if we return dev->hard_header_len or ETH_HLEN, but the latter makes more sense as that is the number of bytes we added to the front of the frame. For 99% of the drivers, dev->hard_header_len == ETH_HLEN, so no difference at all, but if a driver actually needs additional headroom and thus has dev->hard_header_len > ETH_HLEN, the process of building the ethernet header should not care at all.
Showing
Please register or sign in to comment