From patchwork Thu Apr 14 01:43:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: huajun li X-Patchwork-Id: 91173 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 57838B6F7C for ; Thu, 14 Apr 2011 11:43:50 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756106Ab1DNBne (ORCPT ); Wed, 13 Apr 2011 21:43:34 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:38579 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754433Ab1DNBnd (ORCPT ); Wed, 13 Apr 2011 21:43:33 -0400 Received: by fxm17 with SMTP id 17so864127fxm.19 for ; Wed, 13 Apr 2011 18:43:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to:cc :content-type; bh=tCDEknQCUKHB96vqFCVQEQNJ0rt2EcmuVrw1dX/s4wo=; b=o8bqm5REag+5tXIF10mwZspnL4UWkWn+KXZUdw2rUpzxU1eHDWv3upP03YJ7+TAJSA r2Vbv2b4SrFqJ3oIAc3e9wFmQbM7iLLaZuSybx1U55zR5ZXw15mjMargzc97YAuYkpTE 89n8qTWiTQNQpeIX+wZE+hYYuiS1iDdkVxjUQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=ME6ElU695po6cM5kxhMN29vkzyGQT70qIksEJLhuL7ngjY2zi5WAreH78rVnykC/8M Kv9L1AkzHvs26ixBLR8/YGMXLXYzOcgVbZ5dxfn7KcAyA6mr3eK/DYR95UHzegC0L5nx Jy/Sm7dYiqzfu9RwmNvU7LUDOryTl59r9IqKQ= MIME-Version: 1.0 Received: by 10.223.15.72 with SMTP id j8mr170989faa.69.1302745412640; Wed, 13 Apr 2011 18:43:32 -0700 (PDT) Received: by 10.223.78.197 with HTTP; Wed, 13 Apr 2011 18:43:32 -0700 (PDT) Date: Thu, 14 Apr 2011 09:43:32 +0800 Message-ID: Subject: [PATCH] Clean up 'FLAG_POINTTOPOINT' and 'FLAG_MULTI_PACKET' overlaps in usbnet.h From: huajun li To: David Miller Cc: Gottfried Haider , netdev Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org USB tethering does not work anymore since 2.6.39-rc2, but it's okay in -rc1. The root cause is the new added mask code 'FLAG_POINTTOPOINT' overlaps 'FLAG_MULTI_PACKET' in include/linux/usb/usbnet.h, this causes logic issue in rx_process(). This patch cleans up the overlap. Reported-and-Tested-by: Gottfried Haider Signed-off-by: Huajun Li --- include/linux/usb/usbnet.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 3c7329b..0e18550 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h @@ -103,8 +103,8 @@ struct driver_info { * Indicates to usbnet, that USB driver accumulates multiple IP packets. * Affects statistic (counters) and short packet handling. */ -#define FLAG_MULTI_PACKET 0x1000 -#define FLAG_RX_ASSEMBLE 0x2000 /* rx packets may span >1 frames */ +#define FLAG_MULTI_PACKET 0x2000 +#define FLAG_RX_ASSEMBLE 0x4000 /* rx packets may span >1 frames */ /* init device ... can sleep, or cause probe() failure */ int (*bind)(struct usbnet *, struct usb_interface *);