if (eth->state != ETH_STATE_ACTIVE) {
if (eth_is_on_demand_init()) {
- if (eth_init(gd->bd) < 0)
+ if (eth_init() < 0)
return;
eth_set_last_protocol(NETCONS);
} else
- eth_init_state_only(gd->bd);
+ eth_init_state_only();
inited = 1;
}
}
}
-static int nc_start(void)
+static int nc_start(struct stdio_dev *dev)
{
int retval;
return 0;
}
-static void nc_putc(char c)
+static void nc_putc(struct stdio_dev *dev, char c)
{
if (output_recursion)
return;
output_recursion = 0;
}
-static void nc_puts(const char *s)
+static void nc_puts(struct stdio_dev *dev, const char *s)
{
int len;
len = strlen(s);
while (len) {
- int send_len = min(len, sizeof(input_buffer));
+ int send_len = min(len, (int)sizeof(input_buffer));
nc_send_packet(s, send_len);
len -= send_len;
s += send_len;
output_recursion = 0;
}
-static int nc_getc(void)
+static int nc_getc(struct stdio_dev *dev)
{
uchar c;
return c;
}
-static int nc_tstc(void)
+static int nc_tstc(struct stdio_dev *dev)
{
struct eth_device *eth;