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 6d61602208c1..8a0dd8a843a9 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -2163,6 +2163,24 @@ int ppp_unit_number(struct ppp_channel *chan)
2163} 2163}
2164 2164
2165/* 2165/*
2166 * Return the PPP device interface name of a channel.
2167 */
2168char *ppp_dev_name(struct ppp_channel *chan)
2169{
2170 struct channel *pch = chan->ppp;
2171 char *name = NULL;
2172
2173 if (pch) {
2174 read_lock_bh(&pch->upl);
2175 if (pch->ppp && pch->ppp->dev)
2176 name = pch->ppp->dev->name;
2177 read_unlock_bh(&pch->upl);
2178 }
2179 return name;
2180}
2181
2182
2183/*
2166 * Disconnect a channel from the generic layer. 2184 * Disconnect a channel from the generic layer.
2167 * This must be called in process context. 2185 * This must be called in process context.
2168 */ 2186 */
@@ -2890,6 +2908,7 @@ EXPORT_SYMBOL(ppp_register_channel);
2890EXPORT_SYMBOL(ppp_unregister_channel); 2908EXPORT_SYMBOL(ppp_unregister_channel);
2891EXPORT_SYMBOL(ppp_channel_index); 2909EXPORT_SYMBOL(ppp_channel_index);
2892EXPORT_SYMBOL(ppp_unit_number); 2910EXPORT_SYMBOL(ppp_unit_number);
2911EXPORT_SYMBOL(ppp_dev_name);
2893EXPORT_SYMBOL(ppp_input); 2912EXPORT_SYMBOL(ppp_input);
2894EXPORT_SYMBOL(ppp_input_error); 2913EXPORT_SYMBOL(ppp_input_error);
2895EXPORT_SYMBOL(ppp_output_wakeup); 2914EXPORT_SYMBOL(ppp_output_wakeup);