This patch adds a protocol/address family number, ARP hardware type,
ethernet packet type, and a line discipline number for the SocketCAN
implementation.

Signed-Off-By: Oliver Hartkopp <[EMAIL PROTECTED]>
Signed-Off-By: Urs Thuermann <[EMAIL PROTECTED]>

---
 include/linux/if_arp.h   |    1 +
 include/linux/if_ether.h |    1 +
 include/linux/socket.h   |    2 ++
 include/linux/tty.h      |    3 ++-
 net/core/sock.c          |    4 ++--
 5 files changed, 8 insertions(+), 3 deletions(-)

Index: linux-2.6.22-rc5/include/linux/if_arp.h
===================================================================
--- linux-2.6.22-rc5.orig/include/linux/if_arp.h        2007-06-20 
14:10:41.000000000 +0200
+++ linux-2.6.22-rc5/include/linux/if_arp.h     2007-06-20 14:11:00.000000000 
+0200
@@ -52,6 +52,7 @@
 #define ARPHRD_ROSE    270
 #define ARPHRD_X25     271             /* CCITT X.25                   */
 #define ARPHRD_HWX25   272             /* Boards with X.25 in firmware */
+#define ARPHRD_CAN     280             /* Controller Area Network      */
 #define ARPHRD_PPP     512
 #define ARPHRD_CISCO   513             /* Cisco HDLC                   */
 #define ARPHRD_HDLC    ARPHRD_CISCO
Index: linux-2.6.22-rc5/include/linux/if_ether.h
===================================================================
--- linux-2.6.22-rc5.orig/include/linux/if_ether.h      2007-06-20 
14:10:41.000000000 +0200
+++ linux-2.6.22-rc5/include/linux/if_ether.h   2007-06-20 14:11:00.000000000 
+0200
@@ -90,6 +90,7 @@
 #define ETH_P_WAN_PPP   0x0007          /* Dummy type for WAN PPP frames*/
 #define ETH_P_PPP_MP    0x0008          /* Dummy type for PPP MP frames */
 #define ETH_P_LOCALTALK 0x0009         /* Localtalk pseudo type        */
+#define ETH_P_CAN      0x000C          /* Controller Area Network      */
 #define ETH_P_PPPTALK  0x0010          /* Dummy type for Atalk over PPP*/
 #define ETH_P_TR_802_2 0x0011          /* 802.2 frames                 */
 #define ETH_P_MOBITEX  0x0015          /* Mobitex ([EMAIL PROTECTED])  */
Index: linux-2.6.22-rc5/include/linux/socket.h
===================================================================
--- linux-2.6.22-rc5.orig/include/linux/socket.h        2007-06-20 
14:10:41.000000000 +0200
+++ linux-2.6.22-rc5/include/linux/socket.h     2007-06-20 14:11:00.000000000 
+0200
@@ -185,6 +185,7 @@
 #define AF_PPPOX       24      /* PPPoX sockets                */
 #define AF_WANPIPE     25      /* Wanpipe API Sockets */
 #define AF_LLC         26      /* Linux LLC                    */
+#define AF_CAN         29      /* Controller Area Network      */
 #define AF_TIPC                30      /* TIPC sockets                 */
 #define AF_BLUETOOTH   31      /* Bluetooth sockets            */
 #define AF_IUCV                32      /* IUCV sockets                 */
@@ -220,6 +221,7 @@
 #define PF_PPPOX       AF_PPPOX
 #define PF_WANPIPE     AF_WANPIPE
 #define PF_LLC         AF_LLC
+#define PF_CAN         AF_CAN
 #define PF_TIPC                AF_TIPC
 #define PF_BLUETOOTH   AF_BLUETOOTH
 #define PF_IUCV                AF_IUCV
Index: linux-2.6.22-rc5/include/linux/tty.h
===================================================================
--- linux-2.6.22-rc5.orig/include/linux/tty.h   2007-06-20 14:10:41.000000000 
+0200
+++ linux-2.6.22-rc5/include/linux/tty.h        2007-06-20 14:11:00.000000000 
+0200
@@ -24,7 +24,7 @@
 #define NR_PTYS        CONFIG_LEGACY_PTY_COUNT   /* Number of legacy ptys */
 #define NR_UNIX98_PTY_DEFAULT  4096      /* Default maximum for Unix98 ptys */
 #define NR_UNIX98_PTY_MAX      (1 << MINORBITS) /* Absolute limit */
-#define NR_LDISCS              17
+#define NR_LDISCS              18
 
 /* line disciplines */
 #define N_TTY          0
@@ -45,6 +45,7 @@
 #define N_SYNC_PPP     14      /* synchronous PPP */
 #define N_HCI          15      /* Bluetooth HCI UART */
 #define N_GIGASET_M101 16      /* Siemens Gigaset M101 serial DECT adapter */
+#define N_SLCAN                17      /* Serial / USB serial CAN Adaptors */
 
 /*
  * This character is the same as _POSIX_VDISABLE: it cannot be used as
Index: linux-2.6.22-rc5/net/core/sock.c
===================================================================
--- linux-2.6.22-rc5.orig/net/core/sock.c       2007-06-20 14:10:41.000000000 
+0200
+++ linux-2.6.22-rc5/net/core/sock.c    2007-06-20 14:11:00.000000000 +0200
@@ -153,7 +153,7 @@
   "sk_lock-AF_ASH"   , "sk_lock-AF_ECONET"   , "sk_lock-AF_ATMSVC"   ,
   "sk_lock-21"       , "sk_lock-AF_SNA"      , "sk_lock-AF_IRDA"     ,
   "sk_lock-AF_PPPOX" , "sk_lock-AF_WANPIPE"  , "sk_lock-AF_LLC"      ,
-  "sk_lock-27"       , "sk_lock-28"          , "sk_lock-29"          ,
+  "sk_lock-27"       , "sk_lock-28"          , "sk_lock-AF_CAN"      ,
   "sk_lock-AF_TIPC"  , "sk_lock-AF_BLUETOOTH", "sk_lock-IUCV"        ,
   "sk_lock-AF_RXRPC" , "sk_lock-AF_MAX"
 };
@@ -167,7 +167,7 @@
   "slock-AF_ASH"   , "slock-AF_ECONET"   , "slock-AF_ATMSVC"   ,
   "slock-21"       , "slock-AF_SNA"      , "slock-AF_IRDA"     ,
   "slock-AF_PPPOX" , "slock-AF_WANPIPE"  , "slock-AF_LLC"      ,
-  "slock-27"       , "slock-28"          , "slock-29"          ,
+  "slock-27"       , "slock-28"          , "slock-AF_CAN"      ,
   "slock-AF_TIPC"  , "slock-AF_BLUETOOTH", "slock-AF_IUCV"     ,
   "slock-AF_RXRPC" , "slock-AF_MAX"
 };

--
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to