Commit 612ae4eb authored by Alessandro Rubini's avatar Alessandro Rubini Committed by Aurelio Colosimo

arch-spec: make it compile (but not link yet)

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent fe3ed177
...@@ -9,8 +9,10 @@ ...@@ -9,8 +9,10 @@
typedef unsigned char uint8_t; typedef unsigned char uint8_t;
typedef unsigned short uint16_t; typedef unsigned short uint16_t;
typedef unsigned long uint32_t; typedef unsigned long uint32_t;
typedef unsigned long long uint64_t;
typedef signed char int8_t; typedef signed char int8_t;
typedef signed short int16_t; typedef signed short int16_t;
typedef signed long int32_t; typedef signed long int32_t;
typedef signed long long int64_t;
#endif /* __ARCH_SPEC_STDINT_H__ */ #endif /* __ARCH_SPEC_STDINT_H__ */
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
* This is the main loop for the Spec board * This is the main loop for the Spec board
*/ */
#include <pptp/pptp.h> #include <pptp/pptp.h>
#include <pptp/diag.h>
#include "spec.h" #include "spec.h"
void spec_main_loop(struct pp_instance *ppi) void spec_main_loop(struct pp_instance *ppi)
...@@ -42,8 +43,6 @@ void spec_main_loop(struct pp_instance *ppi) ...@@ -42,8 +43,6 @@ void spec_main_loop(struct pp_instance *ppi)
pp_printf(" %02x", packet[j]); pp_printf(" %02x", packet[j]);
pp_printf("\n"); pp_printf("\n");
} }
if (i < sizeof(struct pp_packet) /* or minimum of all pckts */)
continue;
/* Warning: PP_PROTO_NR is endian-agnostic by design */ /* Warning: PP_PROTO_NR is endian-agnostic by design */
if (((struct spec_ethhdr *)packet)->h_proto != if (((struct spec_ethhdr *)packet)->h_proto !=
htons(PP_PROTO_NR)) htons(PP_PROTO_NR))
......
...@@ -16,7 +16,8 @@ int spec_open_ch(struct pp_instance *ppi) ...@@ -16,7 +16,8 @@ int spec_open_ch(struct pp_instance *ppi)
ep_enable(1, 1); ep_enable(1, 1);
minic_init(); minic_init();
memcpy(ppi->ch.addr, fake_addr, 6); memcpy(ppi->net_path->gen_ch.addr, fake_addr, 6);
memcpy(ppi->net_path->evt_ch.addr, fake_addr, 6);
return 0; return 0;
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* Alessandro Rubini for CERN, 2011 -- GNU LGPL v2.1 or later * Alessandro Rubini for CERN, 2011 -- GNU LGPL v2.1 or later
*/ */
#include <pptp/pptp.h> #include <pptp/pptp.h>
#include <pptp/diag.h>
#include "spec.h" #include "spec.h"
#include "include/gpio.h" #include "include/gpio.h"
...@@ -27,7 +28,7 @@ void pptp_main(void) ...@@ -27,7 +28,7 @@ void pptp_main(void)
pp_diag_error(ppi, spec_errno); pp_diag_error(ppi, spec_errno);
pp_diag_fatal(ppi, "open_ch", ""); pp_diag_fatal(ppi, "open_ch", "");
} }
pp_open_instance(ppi); pp_open_instance(ppi, 0 /* no opts */);
spec_main_loop(ppi); spec_main_loop(ppi);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment