aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ppp_generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ppp_generic.c')
-rw-r--r--drivers/net/ppp_generic.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index 8518a2e58e53..5441688daba7 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -2174,6 +2174,24 @@ int ppp_unit_number(struct ppp_channel *chan)
2174} 2174}
2175 2175
2176/* 2176/*
2177 * Return the PPP device interface name of a channel.
2178 */
2179char *ppp_dev_name(struct ppp_channel *chan)
2180{
2181 struct channel *pch = chan->ppp;
2182 char *name = NULL;
2183
2184 if (pch) {
2185 read_lock_bh(&pch->upl);
2186 if (pch->ppp && pch->ppp->dev)
2187 name = pch->ppp->dev->name;
2188 read_unlock_bh(&pch->upl);
2189 }
2190 return name;
2191}
2192
2193
2194/*
2177 * Disconnect a channel from the generic layer. 2195 * Disconnect a channel from the generic layer.
2178 * This must be called in process context. 2196 * This must be called in process context.
2179 */ 2197 */
@@ -2901,6 +2919,7 @@ EXPORT_SYMBOL(ppp_register_channel);
2901EXPORT_SYMBOL(ppp_unregister_channel); 2919EXPORT_SYMBOL(ppp_unregister_channel);
2902EXPORT_SYMBOL(ppp_channel_index); 2920EXPORT_SYMBOL(ppp_channel_index);
2903EXPORT_SYMBOL(ppp_unit_number); 2921EXPORT_SYMBOL(ppp_unit_number);
2922EXPORT_SYMBOL(ppp_dev_name);
2904EXPORT_SYMBOL(ppp_input); 2923EXPORT_SYMBOL(ppp_input);
2905EXPORT_SYMBOL(ppp_input_error); 2924EXPORT_SYMBOL(ppp_input_error);
2906EXPORT_SYMBOL(ppp_output_wakeup); 2925EXPORT_SYMBOL(ppp_output_wakeup);