summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-03-18 17:47:45 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-03-18 17:47:45 -0800
commitc4620fd637bc33f0c2efabd43586de03675336cd (patch)
tree46b4f41d84a60e8819ea46452968af9526c9c071
parentc5d4003314e38ef940af169984f07b945465adb9 (diff)
parentdeefad781beb64389a9b984223ed9c374a5129cc (diff)
Merge bk://gkernel.bkbits.net/net-drivers-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux
-rw-r--r--drivers/net/82596.c28
-rw-r--r--drivers/net/fc/iph5526.c8
-rw-r--r--drivers/net/lasi_82596.c36
-rw-r--r--drivers/net/pcmcia/com20020_cs.c6
-rw-r--r--drivers/net/pcmcia/pcnet_cs.c4
-rw-r--r--drivers/net/sgiseeq.c16
-rw-r--r--drivers/net/wan/comx.c40
-rw-r--r--drivers/net/wan/cosa.c12
-rw-r--r--drivers/net/wireless/prism54/islpci_dev.c3
9 files changed, 79 insertions, 74 deletions
diff --git a/drivers/net/82596.c b/drivers/net/82596.c
index 5bd4f45ef954..92cf5e0d756f 100644
--- a/drivers/net/82596.c
+++ b/drivers/net/82596.c
@@ -458,7 +458,7 @@ static inline int wait_cfg(struct net_device *dev, struct i596_cmd *cmd, int del
static void i596_display_data(struct net_device *dev)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
struct i596_cmd *cmd;
struct i596_rfd *rfd;
struct i596_rbd *rbd;
@@ -528,7 +528,7 @@ static irqreturn_t i596_error(int irq, void *dev_id, struct pt_regs *regs)
static inline void init_rx_bufs(struct net_device *dev)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
int i;
struct i596_rfd *rfd;
struct i596_rbd *rbd;
@@ -579,7 +579,7 @@ static inline void init_rx_bufs(struct net_device *dev)
static inline void remove_rx_bufs(struct net_device *dev)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
struct i596_rbd *rbd;
int i;
@@ -593,7 +593,7 @@ static inline void remove_rx_bufs(struct net_device *dev)
static void rebuild_rx_bufs(struct net_device *dev)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
int i;
/* Ensure rx frame/buffer descriptors are tidy */
@@ -612,7 +612,7 @@ static void rebuild_rx_bufs(struct net_device *dev)
static int init_i596_mem(struct net_device *dev)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
#if !defined(ENABLE_MVME16x_NET) && !defined(ENABLE_BVME6000_NET)
short ioaddr = dev->base_addr;
#endif
@@ -765,7 +765,7 @@ failed:
static inline int i596_rx(struct net_device *dev)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
struct i596_rfd *rfd;
struct i596_rbd *rbd;
int frames = 0;
@@ -960,7 +960,7 @@ static inline void i596_reset(struct net_device *dev, struct i596_private *lp, i
static void i596_add_cmd(struct net_device *dev, struct i596_cmd *cmd)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
int ioaddr = dev->base_addr;
unsigned long flags;
@@ -1030,7 +1030,7 @@ static int i596_open(struct net_device *dev)
static void i596_tx_timeout (struct net_device *dev)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
int ioaddr = dev->base_addr;
/* Transmitter timeout, serious problems. */
@@ -1059,7 +1059,7 @@ static void i596_tx_timeout (struct net_device *dev)
static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
struct tx_cmd *tx_cmd;
struct i596_tbd *tbd;
short length = skb->len;
@@ -1245,7 +1245,7 @@ struct net_device * __init i82596_probe(int unit)
dev->priv = (void *)(dev->mem_start);
- lp = netdev_priv(dev);
+ lp = dev->priv;
DEB(DEB_INIT,printk(KERN_DEBUG "%s: lp at 0x%08lx (%d bytes), lp->scb at 0x%08lx\n",
dev->name, (unsigned long)lp,
sizeof(struct i596_private), (unsigned long)&lp->scb));
@@ -1305,7 +1305,7 @@ static irqreturn_t i596_interrupt(int irq, void *dev_id, struct pt_regs *regs)
}
ioaddr = dev->base_addr;
- lp = netdev_priv(dev);
+ lp = dev->priv;
spin_lock (&lp->lock);
@@ -1448,7 +1448,7 @@ static irqreturn_t i596_interrupt(int irq, void *dev_id, struct pt_regs *regs)
static int i596_close(struct net_device *dev)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
unsigned long flags;
netif_stop_queue(dev);
@@ -1495,7 +1495,7 @@ static int i596_close(struct net_device *dev)
static struct net_device_stats *
i596_get_stats(struct net_device *dev)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
return &lp->stats;
}
@@ -1506,7 +1506,7 @@ static struct net_device_stats *
static void set_multicast_list(struct net_device *dev)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
int config = 0, cnt;
DEB(DEB_MULTI,printk(KERN_DEBUG "%s: set multicast list, %d entries, promisc %s, allmulti %s\n",
diff --git a/drivers/net/fc/iph5526.c b/drivers/net/fc/iph5526.c
index 67c9d1498291..f69d0c18d572 100644
--- a/drivers/net/fc/iph5526.c
+++ b/drivers/net/fc/iph5526.c
@@ -238,7 +238,7 @@ int __init iph5526_probe(struct net_device *dev)
static int __init iph5526_probe_pci(struct net_device *dev)
{
- struct fc_info *fi = netdev_priv(dev);
+ struct fc_info *fi = dev->priv;
fi->dev = dev;
dev->base_addr = fi->base_addr;
dev->irq = fi->irq;
@@ -2908,7 +2908,7 @@ static int iph5526_close(struct net_device *dev)
static void iph5526_timeout(struct net_device *dev)
{
- struct fc_info *fi = netdev_priv(dev);
+ struct fc_info *fi = dev->priv;
printk(KERN_WARNING "%s: timed out on send.\n", dev->name);
fi->fc_stats.rx_dropped++;
dev->trans_start = jiffies;
@@ -2917,7 +2917,7 @@ static void iph5526_timeout(struct net_device *dev)
static int iph5526_send_packet(struct sk_buff *skb, struct net_device *dev)
{
- struct fc_info *fi = netdev_priv(dev);
+ struct fc_info *fi = dev->priv;
int status = 0;
short type = 0;
u_long flags;
@@ -3688,7 +3688,7 @@ int count = 0, j;
static struct net_device_stats * iph5526_get_stats(struct net_device *dev)
{
-struct fc_info *fi = netdev_priv(dev);
+struct fc_info *fi = dev->priv;
return (struct net_device_stats *) &fi->fc_stats;
}
diff --git a/drivers/net/lasi_82596.c b/drivers/net/lasi_82596.c
index 2273df041619..46483262f526 100644
--- a/drivers/net/lasi_82596.c
+++ b/drivers/net/lasi_82596.c
@@ -426,7 +426,7 @@ static inline void CA(struct net_device *dev)
static inline void MPU_PORT(struct net_device *dev, int c, dma_addr_t x)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
u32 v = (u32) (c) | (u32) (x);
u16 a, b;
@@ -481,7 +481,7 @@ static inline int wait_cmd(struct net_device *dev, struct i596_private *lp, int
static void i596_display_data(struct net_device *dev)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
struct i596_cmd *cmd;
struct i596_rfd *rfd;
struct i596_rbd *rbd;
@@ -541,7 +541,7 @@ static void i596_error(int irq, void *dev_id, struct pt_regs *regs)
static inline void init_rx_bufs(struct net_device *dev)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
int i;
struct i596_rfd *rfd;
struct i596_rbd *rbd;
@@ -595,7 +595,7 @@ static inline void init_rx_bufs(struct net_device *dev)
static inline void remove_rx_bufs(struct net_device *dev)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
struct i596_rbd *rbd;
int i;
@@ -612,7 +612,7 @@ static inline void remove_rx_bufs(struct net_device *dev)
static void rebuild_rx_bufs(struct net_device *dev)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
int i;
/* Ensure rx frame/buffer descriptors are tidy */
@@ -633,7 +633,7 @@ static void rebuild_rx_bufs(struct net_device *dev)
static int init_i596_mem(struct net_device *dev)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
unsigned long flags;
disable_irq(dev->irq); /* disable IRQs from LAN */
@@ -727,7 +727,7 @@ failed:
static inline int i596_rx(struct net_device *dev)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
struct i596_rfd *rfd;
struct i596_rbd *rbd;
int frames = 0;
@@ -940,7 +940,7 @@ static inline void i596_reset(struct net_device *dev, struct i596_private *lp)
static void i596_add_cmd(struct net_device *dev, struct i596_cmd *cmd)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
unsigned long flags;
DEB(DEB_ADDCMD,printk("i596_add_cmd cmd_head %p\n", lp->cmd_head));
@@ -988,7 +988,7 @@ static void i596_add_cmd(struct net_device *dev, struct i596_cmd *cmd)
device list */
static int i596_test(struct net_device *dev)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
volatile int *tint;
u32 data;
@@ -1042,7 +1042,7 @@ out:
static void i596_tx_timeout (struct net_device *dev)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
/* Transmitter timeout, serious problems. */
DEB(DEB_ERRORS,printk("%s: transmit timed out, status resetting.\n",
@@ -1071,7 +1071,7 @@ static void i596_tx_timeout (struct net_device *dev)
static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
struct tx_cmd *tx_cmd;
struct i596_tbd *tbd;
short length = skb->len;
@@ -1220,7 +1220,7 @@ static int __devinit i82596_probe(struct net_device *dev,
dev->priv = (void *)(dev->mem_start);
- lp = netdev_priv(dev);
+ lp = dev->priv;
DEB(DEB_INIT,printk ("%s: lp at 0x%08lx (%d bytes), lp->scb at 0x%08lx\n",
dev->name, (unsigned long)lp,
sizeof(struct i596_private), (unsigned long)&lp->scb));
@@ -1250,7 +1250,7 @@ static irqreturn_t i596_interrupt(int irq, void *dev_id, struct pt_regs *regs)
return IRQ_NONE;
}
- lp = netdev_priv(dev);
+ lp = dev->priv;
spin_lock (&lp->lock);
@@ -1396,7 +1396,7 @@ static irqreturn_t i596_interrupt(int irq, void *dev_id, struct pt_regs *regs)
static int i596_close(struct net_device *dev)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
unsigned long flags;
netif_stop_queue(dev);
@@ -1430,7 +1430,7 @@ static int i596_close(struct net_device *dev)
static struct net_device_stats *
i596_get_stats(struct net_device *dev)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
return &lp->stats;
}
@@ -1441,7 +1441,7 @@ static struct net_device_stats *
static void set_multicast_list(struct net_device *dev)
{
- struct i596_private *lp = netdev_priv(dev);
+ struct i596_private *lp = dev->priv;
int config = 0, cnt;
DEB(DEB_MULTI,printk("%s: set multicast list, %d entries, promisc %s, allmulti %s\n", dev->name, dev->mc_count, dev->flags & IFF_PROMISC ? "ON" : "OFF", dev->flags & IFF_ALLMULTI ? "ON" : "OFF"));
@@ -1541,7 +1541,7 @@ lan_init_chip(struct parisc_device *dev)
retval = register_netdev(netdevice);
if (retval) {
- struct i596_private *lp = netdev_priv(netdevice);
+ struct i596_private *lp = netdevice->priv;
printk(KERN_WARNING __FILE__ ": register_netdevice ret'd %d\n", retval);
dma_free_noncoherent(lp->dev, sizeof(struct i596_private),
(void *)netdevice->mem_start, lp->dma_addr);
@@ -1595,7 +1595,7 @@ static void __exit lasi_82596_exit(void)
unregister_netdev(netdevice);
- lp = netdev_priv(netdevice);
+ lp = netdevice->priv;
dma_free_noncoherent(lp->dev, sizeof(struct i596_private),
(void *)netdevice->mem_start, lp->dma_addr);
free_netdev(netdevice);
diff --git a/drivers/net/pcmcia/com20020_cs.c b/drivers/net/pcmcia/com20020_cs.c
index d15a49ac9564..d5037cd18def 100644
--- a/drivers/net/pcmcia/com20020_cs.c
+++ b/drivers/net/pcmcia/com20020_cs.c
@@ -179,7 +179,7 @@ static dev_link_t *com20020_attach(void)
memset(info, 0, sizeof(struct com20020_dev_t));
memset(link, 0, sizeof(struct dev_link_t));
- lp = netdev_priv(dev);
+ lp = dev->priv;
lp->timeout = timeout;
lp->backplane = backplane;
lp->clockp = clockp;
@@ -394,7 +394,7 @@ static void com20020_config(dev_link_t *link)
goto failed;
}
- lp = netdev_priv(dev);
+ lp = dev->priv;
lp->card_name = "PCMCIA COM20020";
lp->card_flags = ARC_CAN_10MBIT; /* pretend all of them can 10Mbit */
@@ -492,7 +492,7 @@ static int com20020_event(event_t event, int priority,
pcmcia_request_configuration(link->handle, &link->conf);
if (link->open) {
int ioaddr = dev->base_addr;
- struct arcnet_local *lp = netdev_priv(dev);
+ struct arcnet_local *lp = dev->priv;
ARCRESET;
}
}
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index 86c87eb73202..d073093dd644 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -722,6 +722,10 @@ static void pcnet_config(dev_link_t *link)
link->dev = &info->node;
link->state &= ~DEV_CONFIG_PENDING;
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ dev->poll_controller = ei_poll;
+#endif
+
if (register_netdev(dev) != 0) {
printk(KERN_NOTICE "pcnet_cs: register_netdev() failed\n");
link->dev = NULL;
diff --git a/drivers/net/sgiseeq.c b/drivers/net/sgiseeq.c
index df83b66bf462..91229a5c978a 100644
--- a/drivers/net/sgiseeq.c
+++ b/drivers/net/sgiseeq.c
@@ -151,7 +151,7 @@ static inline void seeq_load_eaddr(struct net_device *dev,
static int seeq_init_ring(struct net_device *dev)
{
- struct sgiseeq_private *sp = netdev_priv(dev);
+ struct sgiseeq_private *sp = dev->priv;
volatile struct sgiseeq_init_block *ib = &sp->srings;
int i;
@@ -423,7 +423,7 @@ static inline void sgiseeq_tx(struct net_device *dev, struct sgiseeq_private *sp
static irqreturn_t sgiseeq_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
struct net_device *dev = (struct net_device *) dev_id;
- struct sgiseeq_private *sp = netdev_priv(dev);
+ struct sgiseeq_private *sp = dev->priv;
struct hpc3_ethregs *hregs = sp->hregs;
struct sgiseeq_regs *sregs = sp->sregs;
@@ -445,7 +445,7 @@ static irqreturn_t sgiseeq_interrupt(int irq, void *dev_id, struct pt_regs *regs
static int sgiseeq_open(struct net_device *dev)
{
- struct sgiseeq_private *sp = netdev_priv(dev);
+ struct sgiseeq_private *sp = dev->priv;
struct sgiseeq_regs *sregs = sp->sregs;
int err = init_seeq(dev, sp, sregs);
@@ -459,7 +459,7 @@ static int sgiseeq_open(struct net_device *dev)
static int sgiseeq_close(struct net_device *dev)
{
- struct sgiseeq_private *sp = netdev_priv(dev);
+ struct sgiseeq_private *sp = dev->priv;
struct sgiseeq_regs *sregs = sp->sregs;
netif_stop_queue(dev);
@@ -472,7 +472,7 @@ static int sgiseeq_close(struct net_device *dev)
static inline int sgiseeq_reset(struct net_device *dev)
{
- struct sgiseeq_private *sp = netdev_priv(dev);
+ struct sgiseeq_private *sp = dev->priv;
struct sgiseeq_regs *sregs = sp->sregs;
int err;
@@ -494,7 +494,7 @@ void sgiseeq_my_reset(void)
static int sgiseeq_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
- struct sgiseeq_private *sp = netdev_priv(dev);
+ struct sgiseeq_private *sp = dev->priv;
struct hpc3_ethregs *hregs = sp->hregs;
unsigned long flags;
struct sgiseeq_tx_desc *td;
@@ -560,7 +560,7 @@ static void timeout(struct net_device *dev)
static struct net_device_stats *sgiseeq_get_stats(struct net_device *dev)
{
- struct sgiseeq_private *sp = netdev_priv(dev);
+ struct sgiseeq_private *sp = dev->priv;
return &sp->stats;
}
@@ -710,7 +710,7 @@ static void __exit sgiseeq_exit(void)
struct net_device *next, *dev = root_sgiseeq_dev;
while (dev) {
- sp = netdev_priv(dev);
+ sp = dev->priv;
next = sp->next_module;
unregister_netdev(dev);
free_irq(dev->irq, dev);
diff --git a/drivers/net/wan/comx.c b/drivers/net/wan/comx.c
index 5251b5e97314..6c0e3fcd2172 100644
--- a/drivers/net/wan/comx.c
+++ b/drivers/net/wan/comx.c
@@ -119,7 +119,7 @@ struct comx_debugflags_struct comx_debugflags[] = {
int comx_debug(struct net_device *dev, char *fmt, ...)
{
- struct comx_channel *ch = netdev_priv(dev);
+ struct comx_channel *ch = dev->priv;
char *page,*str;
va_list args;
int len;
@@ -162,7 +162,7 @@ int comx_debug(struct net_device *dev, char *fmt, ...)
int comx_debug_skb(struct net_device *dev, struct sk_buff *skb, char *msg)
{
- struct comx_channel *ch = netdev_priv(dev);
+ struct comx_channel *ch = dev->priv;
if (!ch->debug_area) return 0;
if (!skb) comx_debug(dev, "%s: %s NULL skb\n\n", dev->name, msg);
@@ -175,7 +175,7 @@ int comx_debug_bytes(struct net_device *dev, unsigned char *bytes, int len,
char *msg)
{
int pos = 0;
- struct comx_channel *ch = netdev_priv(dev);
+ struct comx_channel *ch = dev->priv;
if (!ch->debug_area) return 0;
@@ -207,7 +207,7 @@ int comx_debug_bytes(struct net_device *dev, unsigned char *bytes, int len,
static void comx_loadavg_timerfun(unsigned long d)
{
struct net_device *dev = (struct net_device *)d;
- struct comx_channel *ch = netdev_priv(dev);
+ struct comx_channel *ch = dev->priv;
ch->avg_bytes[ch->loadavg_counter] = ch->current_stats->rx_bytes;
ch->avg_bytes[ch->loadavg_counter + ch->loadavg_size] =
@@ -222,7 +222,7 @@ static void comx_loadavg_timerfun(unsigned long d)
static void comx_reset_timerfun(unsigned long d)
{
struct net_device *dev = (struct net_device *)d;
- struct comx_channel *ch = netdev_priv(dev);
+ struct comx_channel *ch = dev->priv;
if(!(ch->line_status & (PROTO_LOOP | PROTO_UP))) {
if(test_and_set_bit(0,&ch->reset_pending) && ch->HW_reset) {
@@ -236,7 +236,7 @@ static void comx_reset_timerfun(unsigned long d)
static int comx_open(struct net_device *dev)
{
- struct comx_channel *ch = netdev_priv(dev);
+ struct comx_channel *ch = dev->priv;
struct proc_dir_entry *comxdir = ch->procdir->subdir;
int ret=0;
@@ -268,7 +268,7 @@ static int comx_open(struct net_device *dev)
static int comx_close(struct net_device *dev)
{
- struct comx_channel *ch = netdev_priv(dev);
+ struct comx_channel *ch = dev->priv;
struct proc_dir_entry *comxdir = ch->procdir->subdir;
int ret = -ENODEV;
@@ -303,7 +303,7 @@ static int comx_close(struct net_device *dev)
void comx_status(struct net_device *dev, int status)
{
- struct comx_channel *ch = netdev_priv(dev);
+ struct comx_channel *ch = dev->priv;
#if 0
if(status & (PROTO_UP | PROTO_LOOP)) {
@@ -321,7 +321,7 @@ void comx_status(struct net_device *dev, int status)
static int comx_xmit(struct sk_buff *skb, struct net_device *dev)
{
- struct comx_channel *ch = netdev_priv(dev);
+ struct comx_channel *ch = dev->priv;
int rc;
if (skb->len > dev->mtu + dev->hard_header_len) {
@@ -342,7 +342,7 @@ static int comx_xmit(struct sk_buff *skb, struct net_device *dev)
static int comx_header(struct sk_buff *skb, struct net_device *dev,
unsigned short type, void *daddr, void *saddr, unsigned len)
{
- struct comx_channel *ch = netdev_priv(dev);
+ struct comx_channel *ch = dev->priv;
if (ch->LINE_header) {
return (ch->LINE_header(skb, dev, type, daddr, saddr, len));
@@ -354,7 +354,7 @@ static int comx_header(struct sk_buff *skb, struct net_device *dev,
static int comx_rebuild_header(struct sk_buff *skb)
{
struct net_device *dev = skb->dev;
- struct comx_channel *ch = netdev_priv(dev);
+ struct comx_channel *ch = dev->priv;
if (ch->LINE_rebuild_header) {
return(ch->LINE_rebuild_header(skb));
@@ -365,7 +365,7 @@ static int comx_rebuild_header(struct sk_buff *skb)
int comx_rx(struct net_device *dev, struct sk_buff *skb)
{
- struct comx_channel *ch = netdev_priv(dev);
+ struct comx_channel *ch = dev->priv;
if (ch->debug_flags & DEBUG_COMX_RX) {
comx_debug_skb(dev, skb, "comx_rx skb");
@@ -379,7 +379,7 @@ int comx_rx(struct net_device *dev, struct sk_buff *skb)
static struct net_device_stats *comx_stats(struct net_device *dev)
{
- struct comx_channel *ch = netdev_priv(dev);
+ struct comx_channel *ch = dev->priv;
return ch->current_stats;
}
@@ -387,7 +387,7 @@ static struct net_device_stats *comx_stats(struct net_device *dev)
void comx_lineup_func(unsigned long d)
{
struct net_device *dev = (struct net_device *)d;
- struct comx_channel *ch = netdev_priv(dev);
+ struct comx_channel *ch = dev->priv;
del_timer(&ch->lineup_timer);
clear_bit(0, &ch->lineup_pending);
@@ -405,7 +405,7 @@ void comx_lineup_func(unsigned long d)
static int comx_statistics(struct net_device *dev, char *page)
{
- struct comx_channel *ch = netdev_priv(dev);
+ struct comx_channel *ch = dev->priv;
int len = 0;
int tmp;
int i = 0;
@@ -472,7 +472,7 @@ static int comx_statistics(struct net_device *dev, char *page)
static int comx_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
- struct comx_channel *ch = netdev_priv(dev);
+ struct comx_channel *ch = dev->priv;
if (ch->LINE_ioctl) {
return(ch->LINE_ioctl(dev, ifr, cmd));
@@ -535,7 +535,7 @@ static int comx_read_proc(char *page, char **start, off_t off, int count,
{
struct proc_dir_entry *file = (struct proc_dir_entry *)data;
struct net_device *dev = file->parent->data;
- struct comx_channel *ch = netdev_priv(dev);
+ struct comx_channel *ch = dev->priv;
int len = 0;
if (strcmp(file->name, FILENAME_STATUS) == 0) {
@@ -599,7 +599,7 @@ static int comx_write_proc(struct file *file, const char *buffer, u_long count,
{
struct proc_dir_entry *entry = (struct proc_dir_entry *)data;
struct net_device *dev = (struct net_device *)entry->parent->data;
- struct comx_channel *ch = netdev_priv(dev);
+ struct comx_channel *ch = dev->priv;
char *page;
struct comx_hardware *hw = comx_channels;
struct comx_protocol *line = comx_lines;
@@ -821,7 +821,7 @@ static int comx_mkdir(struct inode *dir, struct dentry *dentry, int mode)
if (register_netdevice(dev)) {
goto cleanup_filename_debug;
}
- ch = netdev_priv(dev);
+ ch = dev->priv;
if((ch->if_ptr = (void *)kmalloc(sizeof(struct ppp_device),
GFP_KERNEL)) == NULL) {
goto cleanup_register;
@@ -874,7 +874,7 @@ static int comx_rmdir(struct inode *dir, struct dentry *dentry)
lock_kernel();
dev = entry->data;
- ch = netdev_priv(dev);
+ ch = dev->priv;
if (dev->flags & IFF_UP) {
printk(KERN_ERR "%s: down interface before removing it\n", dev->name);
unlock_kernel();
diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c
index 8137a40f8767..00d0b751e827 100644
--- a/drivers/net/wan/cosa.c
+++ b/drivers/net/wan/cosa.c
@@ -639,7 +639,7 @@ static void sppp_channel_delete(struct channel_data *chan)
static int cosa_sppp_open(struct net_device *d)
{
- struct channel_data *chan = netdev_priv(d);
+ struct channel_data *chan = d->priv;
int err;
unsigned long flags;
@@ -679,7 +679,7 @@ static int cosa_sppp_open(struct net_device *d)
static int cosa_sppp_tx(struct sk_buff *skb, struct net_device *dev)
{
- struct channel_data *chan = netdev_priv(dev);
+ struct channel_data *chan = dev->priv;
netif_stop_queue(dev);
@@ -690,7 +690,7 @@ static int cosa_sppp_tx(struct sk_buff *skb, struct net_device *dev)
static void cosa_sppp_timeout(struct net_device *dev)
{
- struct channel_data *chan = netdev_priv(dev);
+ struct channel_data *chan = dev->priv;
if (test_bit(RXBIT, &chan->cosa->rxtx)) {
chan->stats.rx_errors++;
@@ -709,7 +709,7 @@ static void cosa_sppp_timeout(struct net_device *dev)
static int cosa_sppp_close(struct net_device *d)
{
- struct channel_data *chan = netdev_priv(d);
+ struct channel_data *chan = d->priv;
unsigned long flags;
netif_stop_queue(d);
@@ -789,7 +789,7 @@ static int sppp_tx_done(struct channel_data *chan, int size)
static struct net_device_stats *cosa_net_stats(struct net_device *dev)
{
- struct channel_data *chan = netdev_priv(dev);
+ struct channel_data *chan = dev->priv;
return &chan->stats;
}
@@ -1205,7 +1205,7 @@ static int cosa_sppp_ioctl(struct net_device *dev, struct ifreq *ifr,
int cmd)
{
int rv;
- struct channel_data *chan = netdev_priv(dev);
+ struct channel_data *chan = dev->priv;
rv = cosa_ioctl_common(chan->cosa, chan, cmd, (unsigned long)ifr->ifr_data);
if (rv == -ENOIOCTLCMD) {
return sppp_do_ioctl(dev, ifr, cmd);
diff --git a/drivers/net/wireless/prism54/islpci_dev.c b/drivers/net/wireless/prism54/islpci_dev.c
index 4a246e7f725d..e1545f646427 100644
--- a/drivers/net/wireless/prism54/islpci_dev.c
+++ b/drivers/net/wireless/prism54/islpci_dev.c
@@ -577,6 +577,7 @@ islpci_alloc_memory(islpci_private *priv)
if (!(skb = dev_alloc_skb(MAX_FRAGMENT_SIZE_RX + 2))) {
/* error allocating an sk_buff structure elements */
printk(KERN_ERR "Error allocating skb.\n");
+ skb = NULL;
goto out_free;
}
/* add the new allocated sk_buff to the buffer array */
@@ -711,7 +712,7 @@ islpci_setup(struct pci_dev *pdev)
#endif
/* allocate a private device structure to the network device */
- priv = ndev->priv;
+ priv = netdev_priv(ndev);
priv->ndev = ndev;
priv->pdev = pdev;