diff options
author | Mugunthan V N <mugunthanvnm@ti.com> | 2016-11-18 11:09:15 +0530 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-01-09 11:14:54 -0700 |
commit | d4a3755368ca3d99f0a2b58ced8f8ddd42a80822 (patch) | |
tree | 8822983f9b1069bb128839b61e10b74e0df62627 /drivers/usb/gadget/rndis.h | |
parent | a705ebc81b7f91bbd0ef7c634284208342901149 (diff) | |
download | u-boot-imx-d4a3755368ca3d99f0a2b58ced8f8ddd42a80822.zip u-boot-imx-d4a3755368ca3d99f0a2b58ced8f8ddd42a80822.tar.gz u-boot-imx-d4a3755368ca3d99f0a2b58ced8f8ddd42a80822.tar.bz2 |
drivers: usb: gadget: ether/rndis: convert driver to adopt device driver model
Adopt usb ether gadget and rndis driver to adopt driver model
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Diffstat (limited to 'drivers/usb/gadget/rndis.h')
-rw-r--r-- | drivers/usb/gadget/rndis.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/usb/gadget/rndis.h b/drivers/usb/gadget/rndis.h index 7a389a5..084af85 100644 --- a/drivers/usb/gadget/rndis.h +++ b/drivers/usb/gadget/rndis.h @@ -222,23 +222,34 @@ typedef struct rndis_params { const u8 *host_mac; u16 *filter; - struct eth_device *dev; struct net_device_stats *stats; int mtu; u32 vendorID; const char *vendorDescr; - int (*ack)(struct eth_device *); +#ifndef CONFIG_DM_ETH + struct eth_device *dev; + int (*ack)(struct eth_device *); +#else + struct udevice *dev; + int (*ack)(struct udevice *); +#endif struct list_head resp_queue; } rndis_params; /* RNDIS Message parser and other useless functions */ int rndis_msg_parser(u8 configNr, u8 *buf); enum rndis_state rndis_get_state(int configNr); -int rndis_register(int (*rndis_control_ack)(struct eth_device *)); void rndis_deregister(int configNr); +#ifndef CONFIG_DM_ETH +int rndis_register(int (*rndis_control_ack)(struct eth_device *)); int rndis_set_param_dev(u8 configNr, struct eth_device *dev, int mtu, - struct net_device_stats *stats, u16 *cdc_filter); + struct net_device_stats *stats, u16 *cdc_filter); +#else +int rndis_register(int (*rndis_control_ack)(struct udevice *)); +int rndis_set_param_dev(u8 configNr, struct udevice *dev, int mtu, + struct net_device_stats *stats, u16 *cdc_filter); +#endif int rndis_set_param_vendor(u8 configNr, u32 vendorID, const char *vendorDescr); int rndis_set_param_medium(u8 configNr, u32 medium, u32 speed); |