Skip to content

Commit

Permalink
[ATM]: net/atm/ioctl.c: autoload pppoatm and br2684
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Kagan <[email protected]>
Signed-off-by: Chas Williams <[email protected]>
  • Loading branch information
rvka authored and davem330 committed Sep 28, 2005
1 parent 6b25185 commit e2c4b72
Showing 1 changed file with 26 additions and 8 deletions.
34 changes: 26 additions & 8 deletions net/atm/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e2c4b72

Please sign in to comment.