lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Hardware - level for netif_remove()


From: Martin Persich
Subject: Re: [lwip-users] Hardware - level for netif_remove()
Date: Fri, 7 May 2010 17:51:44 +0200

Hi Christian,
yes, there is missing low-level function called from "netif_remove" alike as
function parameter "netif_init_fn init" in function "netif_add". Perhaps in
LwIP 1.4.0 ...
I am consulting bugs in MACB driver with Atmel's tech.support in this
moment.
I can offer you my version of "ethernetif.c" and "macb.c" file if you want.
Best Regards
Martin Persich


----- Original Message ----- 
From: "Christian Steffen" <address@hidden>
To: "Mailing list for lwIP users" <address@hidden>
Sent: Friday, May 07, 2010 5:10 PM
Subject: Re: [lwip-users] Hardware - level for netif_remove()


Hi Martin,

your're right. I won't modify the "netif". And with the buggy Atmel MACB
driver you're right, too.

In my mind I will add an interface with netif_add() and give this
function the function to initialize the hardware. When I will remove
this interface in call the netif_remove() function and give them a
function to close the Hardware. In my eyes there should be a
low_level_init/add(), low_level_input(), low_level_output() and
consequently a low_level_remove(). Sure, I can call my own
low_level_remove() after a netif_remove(), but it's not the most
beautiful way.

Mit freundlichen Grüßen / Best Regards
Christian Steffen

Am 07.05.2010 16:29, schrieb Martin Persich
> you can't modify LwIP "netif" file for close of Ethernet hardware, I
think.
> It is sufficiet only to modify function "low_level_output" in
"ethernetif.c"
> file. You can add condition in the first line of this function - if
ethernet
> hardware is not running - then immediately return. LwIP dont't need any
> additional information about it. This is the same as problem on LAN, when
> data packet is not deliverer to target device, I think.
> And then you need to stop reading of incomming packet from MACB in
"ETHINT"
> task. But the main problem is in original "macb.c" file from Atmel
Software
> Framework (V 1.7.0), by my mind. If you disabling MACB hardware (function
> "vDisableMACBOperations" in "macb.c" file), there is a problem with next
> callig of "xMACBInit" function. Many functions of MACB driver ("macb.c")
> uses local variables and there is no way to clear this variables after new
> initialization. I have my own version of MACB driver in this moment which
> solve this problems and allows restart of autonegotiation process if
> ethernet cable is unplugged and then conected to switch with another
> parameters (speed, FDX/HDX, ...). I believe that version Atmel SF 1.8.0
will
> be OK !
> Best Regards
> Martin Persich
>
>
>
>
> ----- Original Message -----
> From: "Christian Steffen"<address@hidden>
> To: "Mailing list for lwIP users"<address@hidden>
> Sent: Friday, May 07, 2010 7:58 AM
> Subject: Re: [lwip-users] Hardware - level for netif_remove()
>
>
> I know this function. But this function don't call any hardware function
> stubs. When I add an Interface with netif_add() I refer a init routine
> and a input routine. For the AVR32 Port this are ethernetif_init() and
> ethernetif_input(). In the netif_remove() is no call to a similar
> ethernetif_remove().
>
> In the Context of lwIP, FreeRTOS and AVR32 starts a thread, that puts
> the incomming data from MAC to the lwIP. And this task running along
> when I remove this Interface.
>
> Mit freundlichen Grüßen
> Christian Steffen
>
> Am 06.05.2010 21:52, schrieb Martin Velek:
>
>> Hi,
>>
>> it should be. Check this link -
>> http://www.nongnu.org/lwip/netif_8c.html#9c6e541f0c184e1ea61a5cd8afe3e979
>>
>> On 6 May 2010 09:21, Christian Steffen
>> <address@hidden>   wrote:
>>
>>
>>> Hi,
>>>
>>> for my application it's necessary to close the Ethernet hardware.
>>> The initialisation routine is called by netif_add. Is there a responding
>>> routine in netif_remove, that I have overlook?
>>>
>>> I know, the ethernetif.c is a portable file of the AVR32 port and so my
>>> problem :) . But the netif.c is a core file and I want modify the core
>>>
> files
>
>>> as less as possible.
>>>
>>>
>>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>


_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users





reply via email to

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