X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fnet%2Fpppox.c;h=f3e47d0c2b3ce2cb253d96844e33ffb8b03b2552;hb=49c13b51a15f1ba9f6d47e26e4a3886c4f3931e2;hp=9315046b3f5509eebea0b0207f9b36a4a4326c89;hpb=52347f4e810ba323d02cd2c26b5d738f4a2c3d5e;p=linux-2.6-omap-h63xx.git diff --git a/drivers/net/pppox.c b/drivers/net/pppox.c index 9315046b3f5..f3e47d0c2b3 100644 --- a/drivers/net/pppox.c +++ b/drivers/net/pppox.c @@ -31,6 +31,7 @@ #include #include #include +#include #include @@ -58,7 +59,7 @@ void pppox_unbind_sock(struct sock *sk) { /* Clear connection to ppp device, if attached. */ - if (sk->sk_state & (PPPOX_BOUND | PPPOX_ZOMBIE)) { + if (sk->sk_state & (PPPOX_BOUND | PPPOX_CONNECTED | PPPOX_ZOMBIE)) { ppp_unregister_channel(&pppox_sk(sk)->chan); sk->sk_state = PPPOX_DEAD; } @@ -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;