Commit 2022e705 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

[NET]: Expose alloc_netdev() for use by drivers.

parent dae0e204
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
*/ */
static struct net_device *alloc_netdev(int sizeof_priv, const char *mask, struct net_device *alloc_netdev(int sizeof_priv, const char *mask,
void (*setup)(struct net_device *)) void (*setup)(struct net_device *))
{ {
struct net_device *dev; struct net_device *dev;
...@@ -96,6 +96,7 @@ static struct net_device *alloc_netdev(int sizeof_priv, const char *mask, ...@@ -96,6 +96,7 @@ static struct net_device *alloc_netdev(int sizeof_priv, const char *mask,
return dev; return dev;
} }
EXPORT_SYMBOL(alloc_netdev);
static struct net_device *init_alloc_dev(int sizeof_priv) static struct net_device *init_alloc_dev(int sizeof_priv)
{ {
......
...@@ -40,7 +40,6 @@ extern int eth_header_parse(struct sk_buff *skb, ...@@ -40,7 +40,6 @@ extern int eth_header_parse(struct sk_buff *skb,
unsigned char *haddr); unsigned char *haddr);
extern struct net_device *init_etherdev(struct net_device *dev, int sizeof_priv); extern struct net_device *init_etherdev(struct net_device *dev, int sizeof_priv);
extern struct net_device *alloc_etherdev(int sizeof_priv); extern struct net_device *alloc_etherdev(int sizeof_priv);
static inline void eth_copy_and_sum (struct sk_buff *dest, unsigned char *src, int len, int base) static inline void eth_copy_and_sum (struct sk_buff *dest, unsigned char *src, int len, int base)
{ {
memcpy (dest->data, src, len); memcpy (dest->data, src, len);
......
...@@ -816,6 +816,8 @@ extern void tr_setup(struct net_device *dev); ...@@ -816,6 +816,8 @@ extern void tr_setup(struct net_device *dev);
extern void fc_setup(struct net_device *dev); extern void fc_setup(struct net_device *dev);
extern void fc_freedev(struct net_device *dev); extern void fc_freedev(struct net_device *dev);
/* Support for loadable net-drivers */ /* Support for loadable net-drivers */
extern struct net_device *alloc_netdev(int sizeof_priv, const char *name,
void (*setup)(struct net_device *));
extern int register_netdev(struct net_device *dev); extern int register_netdev(struct net_device *dev);
extern void unregister_netdev(struct net_device *dev); extern void unregister_netdev(struct net_device *dev);
/* Functions used for multicast support */ /* Functions used for multicast support */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment