]> err.no Git - linux-2.6/commitdiff
igb: endianness fix
authorAl Viro <viro@ftp.linux.org.uk>
Sun, 16 Mar 2008 22:43:06 +0000 (22:43 +0000)
committerJeff Garzik <jeff@garzik.org>
Wed, 26 Mar 2008 03:16:01 +0000 (23:16 -0400)
le16_to_cpu() should be done before mask and shift...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/igb/igb_main.c

index 928ce8287e6932027fdffdc316962a64f6be73e1..9f3168d6e2396909b8abbf42ea59fb1ef3d7c31c 100644 (file)
@@ -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
                 * into the page.
                 */
-               hlen = le16_to_cpu((rx_desc->wb.lower.lo_dword.hdr_info &
-                 E1000_RXDADV_HDRBUFLEN_MASK) >> E1000_RXDADV_HDRBUFLEN_SHIFT);
+               hlen = (le16_to_cpu(rx_desc->wb.lower.lo_dword.hdr_info) &
+                 E1000_RXDADV_HDRBUFLEN_MASK) >> E1000_RXDADV_HDRBUFLEN_SHIFT;
                if (hlen > adapter->rx_ps_hdr_size)
                        hlen = adapter->rx_ps_hdr_size;