• Kai Germaschewski's avatar
    NET: Do not use dev->hard_header_len in eth_header() · 02e0e212
    Kai Germaschewski authored
    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. 
    02e0e212
eth.c 6.23 KB