backports: add wwan device drivers
authorPatrick Ziegler <patrick.ziegler@fh-kl.de>
Thu, 15 Aug 2013 12:40:56 +0000 (14:40 +0200)
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>
Fri, 16 Aug 2013 02:56:27 +0000 (19:56 -0700)
Add cdc_mbim, cdc_ncm, sierra_net, qmi_wwan device drivers.

Signed-off-by: Patrick Ziegler <patrick.ziegler@fh-kl.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
backport/Kconfig
backport/Makefile.kernel
copy-list
patches/collateral-evolutions/network/0001-netdev_ops/qmi_wwan.patch [new file with mode: 0644]
patches/collateral-evolutions/network/0001-netdev_ops/sierra_net.patch [new file with mode: 0644]
patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_cdc_mbim.patch [new file with mode: 0644]
patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_cdc_ncm.patch [new file with mode: 0644]
patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_qmi_wwan.patch [new file with mode: 0644]
patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_sierra_net.patch [new file with mode: 0644]
patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_usb_class_cdc-wdm.patch [new file with mode: 0644]

index 845b233cffc580c6c5b9dfa4c4a54e78fabf7862..64a5f8b8bf573ffc530bb0771990590ed0f51d96 100644 (file)
@@ -48,3 +48,5 @@ source drivers/platform/x86/Kconfig
 source net/ieee802154/Kconfig
 source net/mac802154/Kconfig
 source drivers/net/ieee802154/Kconfig
+
+source drivers/usb/class/Kconfig
index ac29dea447eb60b73d83806cf628ef0352cfb75a..ca75ce1f38b1086c6cd9bfeeedfa8b1ee1df8f0b 100644 (file)
@@ -40,3 +40,6 @@ obj-$(CPTCFG_INTEL_IPS) += drivers/platform/x86/
 obj-$(CPTCFG_IEEE802154) += net/ieee802154/
 obj-$(CPTCFG_MAC802154) += net/mac802154/
 obj-$(CPTCFG_IEEE802154) += drivers/net/ieee802154/
+
+obj-$(CPTCFG_USB_WDM) += drivers/usb/class/
+obj-$(CPTCFG_USB_USBNET) += drivers/net/usb/
index aaf5ae9def2f425178353221ca4b6c291e56ba63..7da4bb7b68b4a3d435e6d315cbf15c15e4906cf8 100644 (file)
--- a/copy-list
+++ b/copy-list
@@ -100,6 +100,20 @@ drivers/net/ethernet/broadcom/Makefile
 drivers/net/ethernet/broadcom/b44.c
 drivers/net/ethernet/broadcom/b44.h
 
+# wwan drivers
+include/uapi/linux/usb/cdc.h
+include/uapi/linux/usb/cdc-wdm.h
+include/linux/usb/cdc_ncm.h
+include/linux/usb/cdc-wdm.h
+
+drivers/usb/class/Makefile
+drivers/usb/class/Kconfig
+drivers/usb/class/cdc-wdm.c
+drivers/net/usb/cdc_mbim.c
+drivers/net/usb/cdc_ncm.c
+drivers/net/usb/sierra_net.c
+drivers/net/usb/qmi_wwan.c
+
 # DRM
 include/drm/
 include/uapi/drm/
diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/qmi_wwan.patch b/patches/collateral-evolutions/network/0001-netdev_ops/qmi_wwan.patch
new file mode 100644 (file)
index 0000000..6281c8d
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/drivers/net/usb/qmi_wwan.c
++++ b/drivers/net/usb/qmi_wwan.c
+@@ -331,7 +331,7 @@
+               dev->net->dev_addr[0] |= 0x02;  /* set local assignment bit */
+               dev->net->dev_addr[0] &= 0xbf;  /* clear "IP" bit */
+       }
+-      dev->net->netdev_ops = &qmi_wwan_netdev_ops;
++      netdev_attach_ops(dev->net, &qmi_wwan_netdev_ops);
+ err:
+       return status;
+ }
diff --git a/patches/collateral-evolutions/network/0001-netdev_ops/sierra_net.patch b/patches/collateral-evolutions/network/0001-netdev_ops/sierra_net.patch
new file mode 100644 (file)
index 0000000..e7ff14b
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/drivers/net/usb/sierra_net.c
++++ b/drivers/net/usb/sierra_net.c
+@@ -695,7 +695,7 @@
+       priv->usbnet = dev;
+       priv->ifnum = ifacenum;
+-      dev->net->netdev_ops = &sierra_net_device_ops;
++      netdev_attach_ops(dev->net, &sierra_net_device_ops);
+       /* change MAC addr to include, ifacenum, and to be unique */
+       dev->net->dev_addr[ETH_ALEN-2] = atomic_inc_return(&iface_counter);
diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_cdc_mbim.patch b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_cdc_mbim.patch
new file mode 100644 (file)
index 0000000..0feffc8
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/drivers/net/usb/cdc_mbim.c
++++ b/drivers/net/usb/cdc_mbim.c
+@@ -417,7 +417,9 @@
+       .resume = cdc_mbim_resume,
+       .reset_resume = cdc_mbim_resume,
+       .supports_autosuspend = 1,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
+       .disable_hub_initiated_lpm = 1,
++#endif
+ };
+ module_usb_driver(cdc_mbim_driver);
diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_cdc_ncm.patch b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_cdc_ncm.patch
new file mode 100644 (file)
index 0000000..c6419fe
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/drivers/net/usb/cdc_ncm.c
++++ b/drivers/net/usb/cdc_ncm.c
+@@ -1271,7 +1271,9 @@
+       .resume = usbnet_resume,
+       .reset_resume = usbnet_resume,
+       .supports_autosuspend = 1,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
+       .disable_hub_initiated_lpm = 1,
++#endif
+ };
+ module_usb_driver(cdc_ncm_driver);
diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_qmi_wwan.patch b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_qmi_wwan.patch
new file mode 100644 (file)
index 0000000..8f3355d
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/drivers/net/usb/qmi_wwan.c
++++ b/drivers/net/usb/qmi_wwan.c
+@@ -672,7 +672,9 @@
+       .resume               = qmi_wwan_resume,
+       .reset_resume         = qmi_wwan_resume,
+       .supports_autosuspend = 1,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
+       .disable_hub_initiated_lpm = 1,
++#endif
+ };
+ module_usb_driver(qmi_wwan_driver);
diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_sierra_net.patch b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_usb_sierra_net.patch
new file mode 100644 (file)
index 0000000..553f2ca
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/drivers/net/usb/sierra_net.c
++++ b/drivers/net/usb/sierra_net.c
+@@ -959,7 +959,9 @@
+       .suspend = usbnet_suspend,
+       .resume = usbnet_resume,
+       .no_dynamic_id = 1,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
+       .disable_hub_initiated_lpm = 1,
++#endif
+ };
+ module_usb_driver(sierra_net_driver);
diff --git a/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_usb_class_cdc-wdm.patch b/patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_usb_class_cdc-wdm.patch
new file mode 100644 (file)
index 0000000..c3af4a1
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/drivers/usb/class/cdc-wdm.c
++++ b/drivers/usb/class/cdc-wdm.c
+@@ -1060,7 +1060,9 @@
+       .post_reset =   wdm_post_reset,
+       .id_table =     wdm_ids,
+       .supports_autosuspend = 1,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
+       .disable_hub_initiated_lpm = 1,
++#endif
+ };
+ module_usb_driver(wdm_driver);