mirror of
https://github.com/ep00ch/lwip-contrib-mac.git
synced 2024-10-03 20:55:18 +00:00
cs8900if_output() now returns error codes.
This commit is contained in:
parent
85a773067b
commit
ca68dbbbae
@ -611,6 +611,9 @@ void cs8900if_service(struct netif *netif)
|
||||
* @param p pbuf to be transmitted (or the first pbuf of a chained list of pbufs).
|
||||
* @param ipaddr destination IP address.
|
||||
*
|
||||
* @return ERR_OK if the packet was sent or queued. There is no way to
|
||||
* find out if a packet really makes it onto the network link.
|
||||
*
|
||||
* @internal It uses the function cs8900_input() that should handle the actual
|
||||
* reception of bytes from the network interface.
|
||||
*
|
||||
@ -618,23 +621,25 @@ void cs8900if_service(struct netif *netif)
|
||||
err_t cs8900if_output(struct netif *netif, struct pbuf *p, struct ip_addr *ipaddr)
|
||||
{
|
||||
struct cs8900if *cs8900if = netif->state;
|
||||
err_t result;
|
||||
/* resolve the link destination hardware address */
|
||||
p = etharp_output(netif, ipaddr, p);
|
||||
/* network hardware address obtained? */
|
||||
if (p != NULL)
|
||||
{
|
||||
/* send out the packet */
|
||||
cs8900_output(netif, p);
|
||||
result = cs8900_output(netif, p);
|
||||
p = NULL;
|
||||
}
|
||||
// { p == NULL }
|
||||
/* { p == NULL } */
|
||||
else
|
||||
{
|
||||
/* we cannot tell if the packet was sent, the packet could have been queued */
|
||||
/* on an ARP entry that was already pending. */
|
||||
}
|
||||
return ERR_OK;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* Read a received packet from the CS8900.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user