diff options
author | Joe Hershberger <joe.hershberger@ni.com> | 2012-05-23 07:59:15 (GMT) |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2012-05-23 22:52:53 (GMT) |
commit | ece223b52ae9ab94f7ae83a9ac49b9f6319a94cb (patch) | |
tree | 1d2c3ec21e2802f52bb6d95b25ae16ad9d97cad8 /drivers/net | |
parent | 22f6e99d5b0c54758646334c1153737a5585bd57 (diff) | |
download | u-boot-fsl-qoriq-ece223b52ae9ab94f7ae83a9ac49b9f6319a94cb.tar.xz |
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/netconsole.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index 28bb955..744f4d1 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c @@ -63,12 +63,12 @@ void NcStart(void) { if (!output_packet_len || memcmp(nc_ether, NetEtherNullAddr, 6)) { /* going to check for input packet */ - NetSetHandler(nc_handler); + net_set_udp_handler(nc_handler); NetSetTimeout(net_timeout, nc_timeout); } else { /* send arp request */ uchar *pkt; - NetSetHandler(nc_wait_arp_handler); + net_set_arp_handler(nc_wait_arp_handler); pkt = (uchar *)NetTxPacket + NetEthHdrSize() + IP_UDP_HDR_SIZE; memcpy(pkt, output_packet, output_packet_len); NetSendUDPPacket(nc_ether, nc_ip, nc_port, nc_port, |