aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ppp_generic.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2010-04-20 10:02:01 -0400
committerPatrick McHardy <kaber@trash.net>2010-04-20 10:02:01 -0400
commit62910554656cdcd6b6f84a5154c4155aae4ca231 (patch)
treedcf14004f6fd2ef7154362ff948bfeba0f3ea92d /drivers/net/ppp_generic.c
parent22265a5c3c103cf8c50be62e6c90d045eb649e6d (diff)
parentab9304717f7624c41927f442e6b6d418b2d8b3e4 (diff)
Merge branch 'master' of /repos/git/net-next-2.6
Conflicts: Documentation/feature-removal-schedule.txt net/ipv6/netfilter/ip6t_REJECT.c net/netfilter/xt_limit.c Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'drivers/net/ppp_generic.c')
-rw-r--r--drivers/net/ppp_generic.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index 6d61602208c1..35f195329fdd 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -46,6 +46,7 @@
46#include <linux/stddef.h> 46#include <linux/stddef.h>
47#include <linux/device.h> 47#include <linux/device.h>
48#include <linux/mutex.h> 48#include <linux/mutex.h>
49#include <linux/slab.h>
49#include <net/slhc_vj.h> 50#include <net/slhc_vj.h>
50#include <asm/atomic.h> 51#include <asm/atomic.h>
51 52
@@ -2163,6 +2164,24 @@ int ppp_unit_number(struct ppp_channel *chan)
2163} 2164}
2164 2165
2165/* 2166/*
2167 * Return the PPP device interface name of a channel.
2168 */
2169char *ppp_dev_name(struct ppp_channel *chan)
2170{
2171 struct channel *pch = chan->ppp;
2172 char *name = NULL;
2173
2174 if (pch) {
2175 read_lock_bh(&pch->upl);
2176 if (pch->ppp && pch->ppp->dev)
2177 name = pch->ppp->dev->name;
2178 read_unlock_bh(&pch->upl);
2179 }
2180 return name;
2181}
2182
2183
2184/*
2166 * Disconnect a channel from the generic layer. 2185 * Disconnect a channel from the generic layer.
2167 * This must be called in process context. 2186 * This must be called in process context.
2168 */ 2187 */
@@ -2890,6 +2909,7 @@ EXPORT_SYMBOL(ppp_register_channel);
2890EXPORT_SYMBOL(ppp_unregister_channel); 2909EXPORT_SYMBOL(ppp_unregister_channel);
2891EXPORT_SYMBOL(ppp_channel_index); 2910EXPORT_SYMBOL(ppp_channel_index);
2892EXPORT_SYMBOL(ppp_unit_number); 2911EXPORT_SYMBOL(ppp_unit_number);
2912EXPORT_SYMBOL(ppp_dev_name);
2893EXPORT_SYMBOL(ppp_input); 2913EXPORT_SYMBOL(ppp_input);
2894EXPORT_SYMBOL(ppp_input_error); 2914EXPORT_SYMBOL(ppp_input_error);
2895EXPORT_SYMBOL(ppp_output_wakeup); 2915EXPORT_SYMBOL(ppp_output_wakeup);