• Bjørn Mork's avatar
    net: cdc_mbim: handle unaccelerated VLAN tagged frames · 6b5eeb7f
    Bjørn Mork authored
    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: a82c7ce5 ("net: cdc_ncm: map MBIM IPS SessionID to VLAN ID")
    Cc: Greg Suarez <gsuarez@smithmicro.com>
    Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    6b5eeb7f
cdc_mbim.c 13.5 KB