Commit b04d4c94 authored by Stephen Hemminger's avatar Stephen Hemminger

[IRDA]: Add alloc_irdadev() interface.

parent fb72ddb7
...@@ -223,6 +223,7 @@ int irda_device_set_raw_mode(struct net_device* self, int status); ...@@ -223,6 +223,7 @@ int irda_device_set_raw_mode(struct net_device* self, int status);
int irda_device_set_dtr_rts(struct net_device *dev, int dtr, int rts); int irda_device_set_dtr_rts(struct net_device *dev, int dtr, int rts);
int irda_device_change_speed(struct net_device *dev, __u32 speed); int irda_device_change_speed(struct net_device *dev, __u32 speed);
void irda_device_setup(struct net_device *dev); void irda_device_setup(struct net_device *dev);
struct net_device *alloc_irdadev(int sizeof_priv);
/* Dongle interface */ /* Dongle interface */
void irda_device_unregister_dongle(struct dongle_reg *dongle); void irda_device_unregister_dongle(struct dongle_reg *dongle);
......
...@@ -387,6 +387,17 @@ void irda_device_setup(struct net_device *dev) ...@@ -387,6 +387,17 @@ void irda_device_setup(struct net_device *dev)
dev->flags = IFF_NOARP; dev->flags = IFF_NOARP;
} }
/*
* Funciton alloc_irdadev
* Allocates and sets up an IRDA device in a manner similar to
* alloc_etherdev.
*/
struct net_device *alloc_irdadev(int sizeof_priv)
{
return alloc_netdev(sizeof_priv, "irda%d", irda_device_setup);
}
/* /*
* Function irda_device_txqueue_empty (dev) * Function irda_device_txqueue_empty (dev)
* *
......
...@@ -150,6 +150,7 @@ EXPORT_SYMBOL(irlap_close); ...@@ -150,6 +150,7 @@ EXPORT_SYMBOL(irlap_close);
EXPORT_SYMBOL(irda_init_max_qos_capabilies); EXPORT_SYMBOL(irda_init_max_qos_capabilies);
EXPORT_SYMBOL(irda_qos_bits_to_value); EXPORT_SYMBOL(irda_qos_bits_to_value);
EXPORT_SYMBOL(irda_device_setup); EXPORT_SYMBOL(irda_device_setup);
EXPORT_SYMBOL(alloc_irdadev);
EXPORT_SYMBOL(irda_device_set_media_busy); EXPORT_SYMBOL(irda_device_set_media_busy);
EXPORT_SYMBOL(irda_device_txqueue_empty); EXPORT_SYMBOL(irda_device_txqueue_empty);
......
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