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;
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;
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;
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 */
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
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;
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;
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. */
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;
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));
}
ioaddr = dev->base_addr;
- lp = netdev_priv(dev);
+ lp = dev->priv;
spin_lock (&lp->lock);
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);
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;
}
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",
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;
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;
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;
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;
}
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;
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;
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;
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;
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 */
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 */
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;
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));
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;
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",
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;
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));
return IRQ_NONE;
}
- lp = netdev_priv(dev);
+ lp = dev->priv;
spin_lock (&lp->lock);
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);
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;
}
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"));
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);
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);
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;
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 */
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;
}
}
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;
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;
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);
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);
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;
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;
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;
}
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);
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;
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);
char *msg)
{
int pos = 0;
- struct comx_channel *ch = netdev_priv(dev);
+ struct comx_channel *ch = dev->priv;
if (!ch->debug_area) return 0;
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] =
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) {
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;
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;
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)) {
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) {
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));
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));
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");
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;
}
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);
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;
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));
{
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) {
{
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;
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;
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();
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;
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);
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++;
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);
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;
}
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);