In order to convert usb functions to the new function interface they need to be compiled as modules. This patch creates a u_ether module which will be used by the new functions. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@xxxxxxxxxxx> Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx> --- drivers/usb/gadget/Kconfig | 10 ++++++++++ drivers/usb/gadget/Makefile | 1 + drivers/usb/gadget/cdc2.c | 1 - drivers/usb/gadget/ether.c | 1 - drivers/usb/gadget/g_ffs.c | 2 +- drivers/usb/gadget/multi.c | 2 +- drivers/usb/gadget/ncm.c | 1 - drivers/usb/gadget/nokia.c | 2 +- drivers/usb/gadget/u_ether.c | 7 +++++++ 9 files changed, 21 insertions(+), 6 deletions(-) diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 02f0099..d6b45fb 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -557,6 +557,9 @@ config USB_F_SS_LB config USB_U_SERIAL tristate +config USB_U_ETHER + tristate + config USB_F_MASS_STORAGE tristate @@ -650,6 +653,7 @@ config USB_ETH tristate "Ethernet Gadget (with CDC Ethernet support)" depends on NET select USB_LIBCOMPOSITE + select USB_U_ETHER select CRC32 help This driver implements Ethernet style communication, in one of @@ -722,6 +726,7 @@ config USB_G_NCM tristate "Network Control Model (NCM) support" depends on NET select USB_LIBCOMPOSITE + select USB_U_ETHER select CRC32 help This driver implements USB CDC NCM subclass standard. NCM is @@ -765,6 +770,7 @@ config USB_FUNCTIONFS config USB_FUNCTIONFS_ETH bool "Include configuration with CDC ECM (Ethernet)" depends on USB_FUNCTIONFS && NET + select USB_U_ETHER help Include a configuration with CDC ECM function (Ethernet) and the Function Filesystem. @@ -772,6 +778,7 @@ config USB_FUNCTIONFS_ETH config USB_FUNCTIONFS_RNDIS bool "Include configuration with RNDIS (Ethernet)" depends on USB_FUNCTIONFS && NET + select USB_U_ETHER help Include a configuration with RNDIS function (Ethernet) and the Filesystem. @@ -871,6 +878,7 @@ config USB_CDC_COMPOSITE depends on NET select USB_LIBCOMPOSITE select USB_U_SERIAL + select USB_U_ETHER select USB_F_ACM help This driver provides two functions in one configuration: @@ -888,6 +896,7 @@ config USB_G_NOKIA depends on PHONET select USB_LIBCOMPOSITE select USB_U_SERIAL + select USB_U_ETHER select USB_F_ACM help The Nokia composite gadget provides support for acm, obex @@ -916,6 +925,7 @@ config USB_G_MULTI select USB_G_MULTI_CDC if !USB_G_MULTI_RNDIS select USB_LIBCOMPOSITE select USB_U_SERIAL + select USB_U_ETHER select USB_F_ACM select USB_F_MASS_STORAGE help diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile index 1130e0e..987b515 100644 --- a/drivers/usb/gadget/Makefile +++ b/drivers/usb/gadget/Makefile @@ -84,3 +84,4 @@ obj-$(CONFIG_USB_F_SS_LB) += usb_f_ss_lb.o usb_f_mass_storage-y := f_mass_storage.o storage_common.o obj-$(CONFIG_USB_F_MASS_STORAGE)+= usb_f_mass_storage.o obj-$(CONFIG_USB_U_SERIAL) += u_serial.o +obj-$(CONFIG_USB_U_ETHER) += u_ether.o diff --git a/drivers/usb/gadget/cdc2.c b/drivers/usb/gadget/cdc2.c index c6ee6f1..7ccfa48 100644 --- a/drivers/usb/gadget/cdc2.c +++ b/drivers/usb/gadget/cdc2.c @@ -43,7 +43,6 @@ USB_GADGET_COMPOSITE_OPTIONS(); * a "gcc --combine ... part1.c part2.c part3.c ... " build would. */ #include "f_ecm.c" -#include "u_ether.c" /*-------------------------------------------------------------------------*/ diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index 56c8eca..b23b467 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -107,7 +107,6 @@ static inline bool has_rndis(void) #include "rndis.c" #endif #include "f_eem.c" -#include "u_ether.c" /*-------------------------------------------------------------------------*/ USB_GADGET_COMPOSITE_OPTIONS(); diff --git a/drivers/usb/gadget/g_ffs.c b/drivers/usb/gadget/g_ffs.c index 787a78e..0fe0376 100644 --- a/drivers/usb/gadget/g_ffs.c +++ b/drivers/usb/gadget/g_ffs.c @@ -34,7 +34,7 @@ # include "f_rndis.c" # include "rndis.c" # endif -# include "u_ether.c" +# include "u_ether.h" static u8 gfs_hostaddr[ETH_ALEN]; static struct eth_dev *the_dev; diff --git a/drivers/usb/gadget/multi.c b/drivers/usb/gadget/multi.c index c638564..e7722ea 100644 --- a/drivers/usb/gadget/multi.c +++ b/drivers/usb/gadget/multi.c @@ -49,7 +49,7 @@ MODULE_LICENSE("GPL"); # include "f_rndis.c" # include "rndis.c" #endif -#include "u_ether.c" +#include "u_ether.h" USB_GADGET_COMPOSITE_OPTIONS(); diff --git a/drivers/usb/gadget/ncm.c b/drivers/usb/gadget/ncm.c index 3b02fd4..4885227 100644 --- a/drivers/usb/gadget/ncm.c +++ b/drivers/usb/gadget/ncm.c @@ -37,7 +37,6 @@ * a "gcc --combine ... part1.c part2.c part3.c ... " build would. */ #include "f_ncm.c" -#include "u_ether.c" /*-------------------------------------------------------------------------*/ diff --git a/drivers/usb/gadget/nokia.c b/drivers/usb/gadget/nokia.c index b5fbf1a..1310bb8 100644 --- a/drivers/usb/gadget/nokia.c +++ b/drivers/usb/gadget/nokia.c @@ -41,7 +41,7 @@ #include "f_obex.c" #include "f_serial.c" #include "f_phonet.c" -#include "u_ether.c" +#include "u_ether.h" /*-------------------------------------------------------------------------*/ USB_GADGET_COMPOSITE_OPTIONS(); diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c index 4b76124..c42c19d 100644 --- a/drivers/usb/gadget/u_ether.c +++ b/drivers/usb/gadget/u_ether.c @@ -815,6 +815,7 @@ struct eth_dev *gether_setup_name(struct usb_gadget *g, u8 ethaddr[ETH_ALEN], return dev; } +EXPORT_SYMBOL(gether_setup_name); /** * gether_cleanup - remove Ethernet-over-USB device @@ -831,6 +832,7 @@ void gether_cleanup(struct eth_dev *dev) flush_work(&dev->work); free_netdev(dev->net); } +EXPORT_SYMBOL(gether_cleanup); /** * gether_connect - notify network layer that USB link is active @@ -910,6 +912,7 @@ fail0: return ERR_PTR(result); return dev->net; } +EXPORT_SYMBOL(gether_connect); /** * gether_disconnect - notify network layer that USB link is inactive @@ -980,3 +983,7 @@ void gether_disconnect(struct gether *link) dev->port_usb = NULL; spin_unlock(&dev->lock); } +EXPORT_SYMBOL(gether_disconnect); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("David Brownell"); -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html