diff options
author | Roman Kagan <rkagan@mail.ru> | 2005-09-28 16:34:24 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-09-28 16:34:24 -0700 |
commit | e2c4b72158a9f1286df41dee478e774f1b94e93a (patch) | |
tree | f524c94f1bbee68d094362271ce44ebd6ac3e3e7 /net | |
parent | 6b251858d377196b8cea20e65cae60f584a42735 (diff) |
[ATM]: net/atm/ioctl.c: autoload pppoatm and br2684
Signed-off-by: Roman Kagan <rkagan@mail.ru>
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Diffstat (limited to 'net')
-rw-r--r-- | net/atm/ioctl.c | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/net/atm/ioctl.c b/net/atm/ioctl.c index d89056ec44d4..a150198b05a3 100644 --- a/net/atm/ioctl.c +++ b/net/atm/ioctl.c @@ -105,17 +105,35 @@ int vcc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) if (!error) sock->state = SS_CONNECTED; goto done; - default: + case ATM_SETBACKEND: + case ATM_NEWBACKENDIF: + { + atm_backend_t backend; + error = get_user(backend, (atm_backend_t __user *) argp); + if (error) + goto done; + switch (backend) { + case ATM_BACKEND_PPP: + request_module("pppoatm"); + break; + case ATM_BACKEND_BR2684: + request_module("br2684"); + break; + } + } + break; + case ATMMPC_CTRL: + case ATMMPC_DATA: + request_module("mpoa"); + break; + case ATMARPD_CTRL: + request_module("clip"); + break; + case ATMLEC_CTRL: + request_module("lec"); break; } - if (cmd == ATMMPC_CTRL || cmd == ATMMPC_DATA) - request_module("mpoa"); - if (cmd == ATMARPD_CTRL) - request_module("clip"); - if (cmd == ATMLEC_CTRL) - request_module("lec"); - error = -ENOIOCTLCMD; down(&ioctl_mutex); |