aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/rndis_host.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/usb/rndis_host.c')
-rw-r--r--drivers/net/usb/rndis_host.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c
index cc49aac70224..524a47a28120 100644
--- a/drivers/net/usb/rndis_host.c
+++ b/drivers/net/usb/rndis_host.c
@@ -13,11 +13,9 @@
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software 16 * along with this program; if not, see <http://www.gnu.org/licenses/>.
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 17 */
19#include <linux/module.h> 18#include <linux/module.h>
20#include <linux/init.h>
21#include <linux/netdevice.h> 19#include <linux/netdevice.h>
22#include <linux/etherdevice.h> 20#include <linux/etherdevice.h>
23#include <linux/ethtool.h> 21#include <linux/ethtool.h>
@@ -494,6 +492,10 @@ EXPORT_SYMBOL_GPL(rndis_unbind);
494 */ 492 */
495int rndis_rx_fixup(struct usbnet *dev, struct sk_buff *skb) 493int rndis_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
496{ 494{
495 /* This check is no longer done by usbnet */
496 if (skb->len < dev->net->hard_header_len)
497 return 0;
498
497 /* peripheral may have batched packets to us... */ 499 /* peripheral may have batched packets to us... */
498 while (likely(skb->len)) { 500 while (likely(skb->len)) {
499 struct rndis_data_hdr *hdr = (void *)skb->data; 501 struct rndis_data_hdr *hdr = (void *)skb->data;