lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Problem with do_writemore() + LWIP for AVR32


From: patelbaroda
Subject: Re: [lwip-users] Problem with do_writemore() + LWIP for AVR32
Date: Fri, 11 Dec 2009 10:07:07 -0800 (PST)

Yes it is written by ATMEL.


Simon Goldschmidt wrote:
> 
> That file is written by ATMEL? I would have expected them to be able to 
> read our example driver file... However, it seems like they have done it 
> as they thought it has to be without really checking it :-( See below.
> 
> patelbaroda wrote:
>> This is the netif driver from lwip port to AVR32
>>
>> [..]
>> static void ethernetif_input(void * pvParameters)
>> {
>>    struct netif      *netif = (struct netif *)pvParameters;
>>    struct pbuf       *p;
>>
>>
>>    for( ;; )
>>    {
>>      do
>>      {
>>        /* move received packet into a new pbuf */
>>        p = low_level_input( netif );
>>        if( p == NULL )
>>        {
>>          /* No packet could be read.  Wait a for an interrupt to tell us
>>          there is more data available. */
>>          vMACBWaitForInput(100);
>>        }
>>      }while( p == NULL );
>>
>>      if( ERR_OK != ethernet_input( p, netif ) )
>>    
> The above line is where your problems come from. It should read:
> 
> if(ERR_OK != netif->input(p, netif))
> 
> With that, tcpip_input (which is what netif->input points to, since it 
> was passed to netif_add()) is called instead of ethernet_input, which 
> makes sure that packets are first passed into the correct thread before 
> being processed.
> 
> Simon
>>      {
>>        pbuf_free(p);
>>        p = NULL;
>>      }
>>    }
>> }
>>    
> 
> 
> 
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Problem-with-do_writemore%28%29-%2B-LWIP-for-AVR32-tp26681732p26748898.html
Sent from the lwip-users mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]