netdev
[Top] [All Lists]

[PATCH 1/1][ATM]: net/atm/ioctl.c: autoload pppoatm and br2684

To: netdev@xxxxxxxxxxx
Subject: [PATCH 1/1][ATM]: net/atm/ioctl.c: autoload pppoatm and br2684
From: "chas williams - CONTRACTOR" <chas@xxxxxxxxxxxxxxxx>
Date: Sat, 07 May 2005 13:15:54 -0400
Cc: davem@xxxxxxxxxx, Roman Kagan <rkagan@xxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
please apply to 2.6 -- thanks!

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2005/05/07 09:15:32-04:00 chas@xxxxxxxxxxxxxxxxxxxxxx 
#   [ATM]: net/atm/ioctl.c: autoload pppoatm and br2684
#   
#   Signed-off-by: Roman Kagan <rkagan@xxxxxxx>
#   Signed-off-by: Chas Williams <chas@xxxxxxxxxxxxxxxx>
# 
# net/atm/ioctl.c
#   2005/05/07 09:15:12-04:00 chas@xxxxxxxxxxxxxxxxxxxxxx +26 -8
#   [ATM]: net/atm/ioctl.c: autoload pppoatm and br2684
#   
#   Signed-off-by: Roman Kagan <rkagan@xxxxxxx>
#   Signed-off-by: Chas Williams <chas@xxxxxxxxxxxxxxxx>
# 
diff -Nru a/net/atm/ioctl.c b/net/atm/ioctl.c
--- a/net/atm/ioctl.c   2005-05-07 09:16:19 -04:00
+++ b/net/atm/ioctl.c   2005-05-07 09:16:19 -04:00
@@ -104,16 +104,34 @@
                        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;
 

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH 1/1][ATM]: net/atm/ioctl.c: autoload pppoatm and br2684, chas williams - CONTRACTOR <=