lkml.org 
[lkml]   [2011]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[172/262] ASIX: Simplify condition in rx_fixup()
    3.0-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Marek Vasut <marek.vasut@gmail.com>

    commit bc466e678d0a98f445bf3f9c76fedf18e7dcc6b0 upstream.

    Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    drivers/net/usb/asix.c | 5 ++---
    1 file changed, 2 insertions(+), 3 deletions(-)

    --- a/drivers/net/usb/asix.c
    +++ b/drivers/net/usb/asix.c
    @@ -314,10 +314,9 @@ static int asix_rx_fixup(struct usbnet *
    skb_pull(skb, 4);

    while (skb->len > 0) {
    - if ((short)(header & 0x0000ffff) !=
    - ~((short)((header & 0xffff0000) >> 16))) {
    + if ((header & 0xffff) != ((~header >> 16) & 0xffff))
    netdev_err(dev->net, "asix_rx_fixup() Bad Header Length\n");
    - }
    +
    /* get the packet length */
    size = (u16) (header & 0x0000ffff);




    \
     
     \ /
      Last update: 2011-11-10 06:03    [W:4.061 / U:1.876 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site