]> git.baikalelectronics.ru Git - kernel.git/commit
net: cdc_mbim: handle unaccelerated VLAN tagged frames
authorBjørn Mork <bjorn@mork.no>
Fri, 9 May 2014 12:45:00 +0000 (14:45 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 May 2014 17:29:53 +0000 (13:29 -0400)
commit332ddc4ae77e342faaa1d3cbfeb4551349d3490d
tree70813a5cc3f755729c5e412af1419cfc4cf5cae8
parent95475bcf9203a6bb65f8d3a3138d6b3af298c81e
net: cdc_mbim: handle unaccelerated VLAN tagged frames

This driver maps 802.1q VLANs to MBIM sessions. The mapping is based on
a bogus assumption that all tagged frames will use the acceleration API
because we enable NETIF_F_HW_VLAN_CTAG_TX. This fails for e.g. frames
tagged in userspace using packet sockets. Such frames will erroneously
be considered as untagged and silently dropped based on not being IP.

Fix by falling back to looking into the ethernet header for a tag if no
accelerated tag was found.

Fixes: 217d580b0989 ("net: cdc_ncm: map MBIM IPS SessionID to VLAN ID")
Cc: Greg Suarez <gsuarez@smithmicro.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/cdc_mbim.c