diff options
Diffstat (limited to 'drivers/net/ppp_generic.c')
| -rw-r--r-- | drivers/net/ppp_generic.c | 20 | 
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index 6d61602208c..35f195329fd 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c @@ -46,6 +46,7 @@  #include <linux/stddef.h>  #include <linux/device.h>  #include <linux/mutex.h> +#include <linux/slab.h>  #include <net/slhc_vj.h>  #include <asm/atomic.h> @@ -2163,6 +2164,24 @@ int ppp_unit_number(struct ppp_channel *chan)  }  /* + * Return the PPP device interface name of a channel. + */ +char *ppp_dev_name(struct ppp_channel *chan) +{ +	struct channel *pch = chan->ppp; +	char *name = NULL; + +	if (pch) { +		read_lock_bh(&pch->upl); +		if (pch->ppp && pch->ppp->dev) +			name = pch->ppp->dev->name; +		read_unlock_bh(&pch->upl); +	} +	return name; +} + + +/*   * Disconnect a channel from the generic layer.   * This must be called in process context.   */ @@ -2890,6 +2909,7 @@ EXPORT_SYMBOL(ppp_register_channel);  EXPORT_SYMBOL(ppp_unregister_channel);  EXPORT_SYMBOL(ppp_channel_index);  EXPORT_SYMBOL(ppp_unit_number); +EXPORT_SYMBOL(ppp_dev_name);  EXPORT_SYMBOL(ppp_input);  EXPORT_SYMBOL(ppp_input_error);  EXPORT_SYMBOL(ppp_output_wakeup);  |