From: James Chapman Date: Mon, 30 Apr 2007 07:21:02 +0000 (-0700) Subject: [L2TP]: Add the ability to autoload a pppox protocol module. X-Git-Tag: MMI-PSA29.97-13-9~44250^2~10 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=65def812ab25d7565756e5748d91e22e302197ee;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/pppox.c b/drivers/net/pppox.c index 3f8115db4d54..f3e47d0c2b3c 100644 --- a/drivers/net/pppox.c +++ b/drivers/net/pppox.c @@ -31,6 +31,7 @@ #include #include #include +#include #include @@ -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;