Commit cce878a4 authored by Paul Mackerras's avatar Paul Mackerras Committed by Jeff Garzik

The patch below contains some minor updates to the bmac and mace

ethernet drivers used on powermacs.  The bmac.c change is just to
remove some compile warnings.  The mace.c change is to move an inline
function definition to before the point where it is used.
parent 54d96dd1
......@@ -25,10 +25,10 @@
#include <asm/pgtable.h>
#include <asm/machdep.h>
#include <asm/pmac_feature.h>
#include <asm/irq.h>
#ifdef CONFIG_PMAC_PBOOK
#include <linux/adb.h>
#include <linux/pmu.h>
#include <asm/irq.h>
#endif
#include "bmac.h"
......@@ -1053,7 +1053,7 @@ static void bmac_set_multicast(struct net_device *dev)
{
struct dev_mc_list *dmi = dev->mc_list;
char *addrs;
int i, j, bit, byte;
int i;
unsigned short rx_cfg;
u32 crc;
......
......@@ -362,6 +362,24 @@ static int mace_set_address(struct net_device *dev, void *addr)
return 0;
}
static inline void mace_clean_rings(struct mace_data *mp)
{
int i;
/* free some skb's */
for (i = 0; i < N_RX_RING; ++i) {
if (mp->rx_bufs[i] != 0) {
dev_kfree_skb(mp->rx_bufs[i]);
mp->rx_bufs[i] = 0;
}
}
for (i = mp->tx_empty; i != mp->tx_fill; ) {
dev_kfree_skb(mp->tx_bufs[i]);
if (++i >= N_TX_RING)
i = 0;
}
}
static int mace_open(struct net_device *dev)
{
struct mace_data *mp = (struct mace_data *) dev->priv;
......@@ -432,24 +450,6 @@ static int mace_open(struct net_device *dev)
return 0;
}
static inline void mace_clean_rings(struct mace_data *mp)
{
int i;
/* free some skb's */
for (i = 0; i < N_RX_RING; ++i) {
if (mp->rx_bufs[i] != 0) {
dev_kfree_skb(mp->rx_bufs[i]);
mp->rx_bufs[i] = 0;
}
}
for (i = mp->tx_empty; i != mp->tx_fill; ) {
dev_kfree_skb(mp->tx_bufs[i]);
if (++i >= N_TX_RING)
i = 0;
}
}
static int mace_close(struct net_device *dev)
{
struct mace_data *mp = (struct mace_data *) dev->priv;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment