From d7a13e6d82bf3d6cc90534a42d5d949833836ecc Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 7 Jun 2014 16:15:59 +0200 Subject: [PATCH] backports: handle changes to vlan_rx_add/kill pointers in cdc_mbim.c These callback pointers are now also used in cdc_mbim.c Signed-off-by: Hauke Mehrtens --- .../0033-ndo_vlan_rx_vid/cdc_mbim.patch | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 patches/collateral-evolutions/network/0033-ndo_vlan_rx_vid/cdc_mbim.patch diff --git a/patches/collateral-evolutions/network/0033-ndo_vlan_rx_vid/cdc_mbim.patch b/patches/collateral-evolutions/network/0033-ndo_vlan_rx_vid/cdc_mbim.patch new file mode 100644 index 000000000000..de3ad1d8b065 --- /dev/null +++ b/patches/collateral-evolutions/network/0033-ndo_vlan_rx_vid/cdc_mbim.patch @@ -0,0 +1,50 @@ +diff --git a/drivers/net/usb/cdc_mbim.c b/drivers/net/usb/cdc_mbim.c +index bc23273..459730d 100644 +--- a/drivers/net/usb/cdc_mbim.c ++++ b/drivers/net/usb/cdc_mbim.c +@@ -70,7 +70,13 @@ static int cdc_mbim_wdm_manage_power(str + return cdc_mbim_manage_power(dev, status); + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) + static int cdc_mbim_rx_add_vid(struct net_device *netdev, __be16 proto, u16 vid) ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) ++static int cdc_mbim_rx_add_vid(struct net_device *netdev, u16 vid) ++#else ++static void cdc_mbim_rx_add_vid(struct net_device *netdev, u16 vid) ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) */ + { + struct usbnet *dev = netdev_priv(netdev); + struct cdc_mbim_state *info = (void *)&dev->data; +@@ -78,13 +84,21 @@ static int cdc_mbim_rx_add_vid(struct ne + /* creation of this VLAN is a request to tag IP session 0 */ + if (vid == MBIM_IPS0_VID) + info->flags |= FLAG_IPS0_VLAN; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) + else + if (vid >= 512) /* we don't map these to MBIM session */ + return -EINVAL; + return 0; ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) */ + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) + static int cdc_mbim_rx_kill_vid(struct net_device *netdev, __be16 proto, u16 vid) ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) ++static int cdc_mbim_rx_kill_vid(struct net_device *netdev, u16 vid) ++#else ++static void cdc_mbim_rx_kill_vid(struct net_device *netdev, u16 vid) ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) */ + { + struct usbnet *dev = netdev_priv(netdev); + struct cdc_mbim_state *info = (void *)&dev->data; +@@ -92,7 +106,9 @@ static int cdc_mbim_rx_kill_vid(struct n + /* this is a request for an untagged IP session 0 */ + if (vid == MBIM_IPS0_VID) + info->flags &= ~FLAG_IPS0_VLAN; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) + return 0; ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) */ + } + + static const struct net_device_ops cdc_mbim_netdev_ops = { -- 2.30.2