Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=65def812ab25d7565756e5748d91e22e302197ee Commit: 65def812ab25d7565756e5748d91e22e302197ee Parent: 46f8914e53c28d0716c586e08a7c819d8ebb9d54 Author: James Chapman <[EMAIL PROTECTED]> AuthorDate: Mon Apr 30 00:21:02 2007 -0700 Committer: David S. Miller <[EMAIL PROTECTED]> CommitDate: Mon Apr 30 00:21:02 2007 -0700
[L2TP]: Add the ability to autoload a pppox protocol module. This patch allows a name "pppox-proto-nnn" to be used in modprobe.conf to autoload a PPPoX protocol nnn. Signed-off-by: James Chapman <[EMAIL PROTECTED]> Signed-off-by: David S. Miller <[EMAIL PROTECTED]> --- drivers/net/pppox.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/net/pppox.c b/drivers/net/pppox.c index 3f8115d..f3e47d0 100644 --- a/drivers/net/pppox.c +++ b/drivers/net/pppox.c @@ -31,6 +31,7 @@ #include <linux/ppp_defs.h> #include <linux/if_ppp.h> #include <linux/ppp_channel.h> +#include <linux/kmod.h> #include <net/sock.h> @@ -114,6 +115,13 @@ static int pppox_create(struct socket *sock, int protocol) goto out; rc = -EPROTONOSUPPORT; +#ifdef CONFIG_KMOD + if (!pppox_protos[protocol]) { + char buffer[32]; + sprintf(buffer, "pppox-proto-%d", protocol); + request_module(buffer); + } +#endif if (!pppox_protos[protocol] || !try_module_get(pppox_protos[protocol]->owner)) goto out; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html