enable mmnif and some cosmetic changes

This commit is contained in:
Stefan Lankes 2011-08-06 08:52:07 -07:00
parent 7d63b27105
commit 6c13cc7584
3 changed files with 16 additions and 29 deletions

View file

@ -298,7 +298,7 @@ __inline int mmnif_trigger_irq(dest_ip)
/* mmnif_get_device_stats(): Returns a copy of the
* current device
*/
mmnif_device_stats_t mmnif_get_device_stats()
mmnif_device_stats_t mmnif_get_device_stats(void)
{
mmnif_device_stats_t stats = {0};
@ -313,7 +313,7 @@ mmnif_device_stats_t mmnif_get_device_stats()
/* mmnif_print_stats(): Print the devices stats of the
* current device
*/
void mmnif_print_stats()
void mmnif_print_stats(void)
{
mmnif_t* mmnif;
@ -506,7 +506,7 @@ int mmnif_commit_packet(uint8_t dest,uint32_t addr)
/* mmnif_rxbuff_free() : the opposite to mmnif_rxbuff_alloc() a from the receiver
* already processed chunk of memory is freed so that it can be allocated again
*/
void mmnif_rxbuff_free()
void mmnif_rxbuff_free(void)
{
mmnif_t* mmnif = mmnif_dev->state;
mm_rx_buffer_t* b = mmnif->rx_buff;
@ -947,7 +947,7 @@ drop_packet:
/* mmnif_irqhandler():
* handles the incomint interrupts
*/
void mmnif_irqhandler()
void mmnif_irqhandler(void)
{
mmnif_t* mmnif;
@ -1025,7 +1025,7 @@ int mmnif_poll(void* e)
/*
* Open the interface should be called by kernel to use this network interface
*/
int mmnif_open()
int mmnif_open(void)
{
struct ip_addr ipaddr;
struct ip_addr netmask;
@ -1100,7 +1100,7 @@ int mmnif_open()
* close the interface should be called by kernel to close this interface and release resources
* Note: it's temporarly empty. Support will be added.
*/
int mmnif_close()
int mmnif_close(void)
{
mmnif_t* mmnif;

View file

@ -152,7 +152,7 @@ int network_init(void)
}
}
#else
//mmnif_open();
mmnif_open();
#endif
// start echo and ping server
@ -167,7 +167,7 @@ int network_shutdown(void)
{
#ifdef CONFIG_LWIP
#ifdef CONFIG_ROCKCREEK
//mmnif_close();
mmnif_close();
#elif defined(CONFIG_PCI)
dhcp_release(default_netif);
dhcp_stop(default_netif);

View file

@ -132,7 +132,6 @@ static int join_test(void* arg)
#if defined(CONFIG_LWIP) && defined(CONFIG_ROCKCREEK)
#define SHELLDEBUGPRINTF(x,...) kprintf(x,##__VA_ARGS__);
static int srv_cnt = 0;
@ -247,19 +246,10 @@ void* client_task(void* e)
while(1)
sleep(2);
return NULL;
return NULL;
}
#endif
void* alive(void*e)
{
while (1)
{
kprintf("IM ALIVE");
sleep(2);
}
}
int test_init(void)
{
char* argv[] = {"/bin/tests", NULL};
@ -275,22 +265,19 @@ int test_init(void)
// sleep(10);
// SHELLDEBUGPRINTF("hello World! I AM CORE NO. %d =) \n",RCCE_ue());
create_kernel_task(NULL,alive,NULL);
if (!RCCE_ue())
create_kernel_task(NULL,server_task,NULL);
else
create_kernel_task(NULL,client_task,NULL);
// if (!RCCE_ue())
// create_kernel_task(NULL,server_task,NULL);
// else
// create_kernel_task(NULL,client_task,NULL);
#endif
// create_kernel_task(NULL, foo, "Hello from foo1");
// create_kernel_task(NULL, join_test, NULL);
create_kernel_task(NULL, foo, "Hello from foo1");
create_kernel_task(NULL, join_test, NULL);
//create_kernel_task(NULL, producer, NULL);
//create_kernel_task(NULL, consumer, NULL);
//create_kernel_task(NULL, mail_ping, NULL);
//create_user_task(NULL, "/bin/hello", argv);
// create_user_task(NULL, "/bin/tests", argv);
create_user_task(NULL, "/bin/tests", argv);
//create_user_task(NULL, "/bin/jacobi", argv);
//create_user_task(NULL, "/bin/jacobi", argv);