diff options
Diffstat (limited to 'drivers/net/ppp_generic.c')
-rw-r--r-- | drivers/net/ppp_generic.c | 19 |
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 | */ | ||
2179 | char *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); | |||
2901 | EXPORT_SYMBOL(ppp_unregister_channel); | 2919 | EXPORT_SYMBOL(ppp_unregister_channel); |
2902 | EXPORT_SYMBOL(ppp_channel_index); | 2920 | EXPORT_SYMBOL(ppp_channel_index); |
2903 | EXPORT_SYMBOL(ppp_unit_number); | 2921 | EXPORT_SYMBOL(ppp_unit_number); |
2922 | EXPORT_SYMBOL(ppp_dev_name); | ||
2904 | EXPORT_SYMBOL(ppp_input); | 2923 | EXPORT_SYMBOL(ppp_input); |
2905 | EXPORT_SYMBOL(ppp_input_error); | 2924 | EXPORT_SYMBOL(ppp_input_error); |
2906 | EXPORT_SYMBOL(ppp_output_wakeup); | 2925 | EXPORT_SYMBOL(ppp_output_wakeup); |