mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-21 14:11:36 +00:00
net: Refactor to separate the UDP handler from the ARP handler
Call a built-in dummy if none is registered... don't require protocols to register a handler (eliminating dummies) NetConsole now uses the ARP handler when waiting on arp (instead of needing a #define hack in arp.c) Clear handlers at the end of net loop Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
22f6e99d5b
commit
ece223b52a
10 changed files with 80 additions and 56 deletions
|
@ -238,13 +238,6 @@ CDPTimeout(void)
|
|||
net_set_state(NETLOOP_SUCCESS);
|
||||
}
|
||||
|
||||
static void
|
||||
CDPDummyHandler(uchar *pkt, unsigned dest, IPaddr_t sip, unsigned src,
|
||||
unsigned len)
|
||||
{
|
||||
/* nothing */
|
||||
}
|
||||
|
||||
void cdp_receive(const uchar *pkt, unsigned len)
|
||||
{
|
||||
const uchar *t;
|
||||
|
@ -368,7 +361,6 @@ CDPStart(void)
|
|||
CDPApplianceVLAN = htons(-1);
|
||||
|
||||
NetSetTimeout(CDP_TIMEOUT, CDPTimeout);
|
||||
NetSetHandler(CDPDummyHandler);
|
||||
|
||||
CDPSendTrigger();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue