mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-04-15 23:42:33 +00:00
Updated low_level_output() to match prototype for netif->linkoutput
and changed low_level_input() similarly for consistency.
This commit is contained in:
parent
d7699ca81d
commit
4d30218eb2
@ -64,9 +64,7 @@ static err_t ethernetif_output(struct netif *netif, struct pbuf *p,
|
|||||||
static void
|
static void
|
||||||
low_level_init(struct netif *netif)
|
low_level_init(struct netif *netif)
|
||||||
{
|
{
|
||||||
struct ethernetif *ethernetif;
|
struct ethernetif *ethernetif = netif->state;
|
||||||
|
|
||||||
ethernetif = netif->state;
|
|
||||||
|
|
||||||
/* set MAC hardware address length */
|
/* set MAC hardware address length */
|
||||||
netif->hwaddr_len = 6;
|
netif->hwaddr_len = 6;
|
||||||
@ -95,8 +93,9 @@ low_level_init(struct netif *netif)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static err_t
|
static err_t
|
||||||
low_level_output(struct ethernetif *ethernetif, struct pbuf *p)
|
low_level_output(struct netif *netif, struct pbuf *p)
|
||||||
{
|
{
|
||||||
|
struct ethernetif *ethernetif = netif->state;
|
||||||
struct pbuf *q;
|
struct pbuf *q;
|
||||||
|
|
||||||
initiate transfer();
|
initiate transfer();
|
||||||
@ -134,8 +133,9 @@ low_level_output(struct ethernetif *ethernetif, struct pbuf *p)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static struct pbuf *
|
static struct pbuf *
|
||||||
low_level_input(struct ethernetif *ethernetif)
|
low_level_input(struct netif *netif)
|
||||||
{
|
{
|
||||||
|
struct ethernetif *ethernetif = netif->state;
|
||||||
struct pbuf *p, *q;
|
struct pbuf *p, *q;
|
||||||
u16_t len;
|
u16_t len;
|
||||||
|
|
||||||
@ -223,7 +223,7 @@ ethernetif_input(struct netif *netif)
|
|||||||
ethernetif = netif->state;
|
ethernetif = netif->state;
|
||||||
|
|
||||||
/* move received packet into a new pbuf */
|
/* move received packet into a new pbuf */
|
||||||
p = low_level_input(ethernetif);
|
p = low_level_input(netif);
|
||||||
/* no packet could be read, silently ignore this */
|
/* no packet could be read, silently ignore this */
|
||||||
if (p == NULL) return;
|
if (p == NULL) return;
|
||||||
/* points to packet payload, which starts with an Ethernet header */
|
/* points to packet payload, which starts with an Ethernet header */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user