Commit 7deb07b1 authored by Al Viro's avatar Al Viro Committed by Jeff Garzik

igb: endianness fix

le16_to_cpu() should be done before mask and shift...
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 2cfb8b71
...@@ -3452,8 +3452,8 @@ static bool igb_clean_rx_irq_adv(struct igb_adapter *adapter, ...@@ -3452,8 +3452,8 @@ static bool igb_clean_rx_irq_adv(struct igb_adapter *adapter,
* that case, it fills the header buffer and spills the rest * that case, it fills the header buffer and spills the rest
* into the page. * into the page.
*/ */
hlen = le16_to_cpu((rx_desc->wb.lower.lo_dword.hdr_info & hlen = (le16_to_cpu(rx_desc->wb.lower.lo_dword.hdr_info) &
E1000_RXDADV_HDRBUFLEN_MASK) >> E1000_RXDADV_HDRBUFLEN_SHIFT); E1000_RXDADV_HDRBUFLEN_MASK) >> E1000_RXDADV_HDRBUFLEN_SHIFT;
if (hlen > adapter->rx_ps_hdr_size) if (hlen > adapter->rx_ps_hdr_size)
hlen = adapter->rx_ps_hdr_size; hlen = adapter->rx_ps_hdr_size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment