net: add a sock_init()
authorAlan Cox <alan@linux.intel.com>
Sun, 21 Feb 2016 20:26:33 +0000 (20:26 +0000)
committerAlan Cox <alan@linux.intel.com>
Sun, 21 Feb 2016 20:26:33 +0000 (20:26 +0000)
We need to intialize both core and driver layer stuff so have a standard call
which calls into the driver init

Kernel/include/netdev.h
Kernel/platform-z80pack/devices.c
Kernel/syscall_net.c

index df3d264..f867f5a 100644 (file)
@@ -121,6 +121,6 @@ extern arg_t net_write(struct socket *s, uint8_t flag);
 extern arg_t net_ioctl(uint8_t op, void *p);
 extern void netdev_init(void);
 extern struct socket *sock_find(uint8_t type, uint8_t sv, struct sockaddrs *sa);
-
+extern void sock_init(void);
 
 extern struct netdevice net_dev;
index e145828..fb8b563 100644 (file)
@@ -43,5 +43,5 @@ void device_init(void)
   /* Add 64 swaps (4MB) to use the entire J drive */
   for (i = 0; i < MAX_SWAPS; i++)
     swapmap_add(i);
-  netdev_init();
+  sock_init();
 }
index 948de67..4d6f21e 100644 (file)
@@ -613,4 +613,5 @@ void sock_init(void)
        uint8_t n = 0;
        while (s < sockets + NSOCKET)
                s++->s_num = n;
+       netdev_init();
 }