net: Remove the bd* parameter from net stack functions
This value is not used by the network stack and is available in the global data, so stop passing it around. For the one legacy function that still expects it (init op on old Ethernet drivers) pass in the global pointer version directly to avoid changing that interface. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reported-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> (Trival fix to remove an unneeded variable declaration in 4xx_enet.c)
This commit is contained in:
committed by
Simon Glass
parent
fce6900b49
commit
d2eaec6006
@@ -1719,8 +1719,6 @@ static void mal_err (struct eth_device *dev, unsigned long isr,
|
||||
unsigned long uic, unsigned long maldef,
|
||||
unsigned long mal_errr)
|
||||
{
|
||||
EMAC_4XX_HW_PST hw_p = dev->priv;
|
||||
|
||||
mtdcr (MAL0_ESR, isr); /* clear interrupt */
|
||||
|
||||
/* clear DE interrupt */
|
||||
@@ -1728,10 +1726,11 @@ static void mal_err (struct eth_device *dev, unsigned long isr,
|
||||
mtdcr (MAL0_RXDEIR, 0x80000000);
|
||||
|
||||
#ifdef INFO_4XX_ENET
|
||||
printf ("\nMAL error occured.... ISR = %lx UIC = = %lx MAL_DEF = %lx MAL_ERR= %lx \n", isr, uic, maldef, mal_errr);
|
||||
printf("\nMAL error occured.... ISR = %lx UIC = = %lx MAL_DEF = %lx MAL_ERR= %lx\n",
|
||||
isr, uic, maldef, mal_errr);
|
||||
#endif
|
||||
|
||||
eth_init (hw_p->bis); /* start again... */
|
||||
eth_init(); /* start again... */
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------+
|
||||
|
||||
@@ -193,11 +193,11 @@ static void nc_send_packet(const char *buf, int len)
|
||||
|
||||
if (eth->state != ETH_STATE_ACTIVE) {
|
||||
if (eth_is_on_demand_init()) {
|
||||
if (eth_init(gd->bd) < 0)
|
||||
if (eth_init() < 0)
|
||||
return;
|
||||
eth_set_last_protocol(NETCONS);
|
||||
} else
|
||||
eth_init_state_only(gd->bd);
|
||||
eth_init_state_only();
|
||||
|
||||
inited = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user