Commit 6726212d authored by Daniel Ritz's avatar Daniel Ritz Committed by Jeff Garzik

[PATCH] netdev_priv for xirc2ps_cs, nmclan_cs

s/dev->priv/netdev_priv(dev)/ for xirc2ps_cs.c and nmclan_cs.c
xircom one is tested. against 2.6.4-bk
parent 75cf9891
......@@ -470,7 +470,7 @@ static dev_link_t *nmclan_attach(void)
dev = alloc_etherdev(sizeof(mace_private));
if (!dev)
return NULL;
lp = dev->priv;
lp = netdev_priv(dev);
link = &lp->link;
link->priv = dev;
......@@ -707,7 +707,7 @@ static void nmclan_config(dev_link_t *link)
{
client_handle_t handle = link->handle;
struct net_device *dev = link->priv;
mace_private *lp = dev->priv;
mace_private *lp = netdev_priv(dev);
tuple_t tuple;
cisparse_t parse;
u_char buf[64];
......@@ -875,7 +875,7 @@ nmclan_reset
---------------------------------------------------------------------------- */
static void nmclan_reset(struct net_device *dev)
{
mace_private *lp = dev->priv;
mace_private *lp = netdev_priv(dev);
#if RESET_XILINX
dev_link_t *link = &lp->link;
......@@ -944,7 +944,7 @@ mace_open
static int mace_open(struct net_device *dev)
{
ioaddr_t ioaddr = dev->base_addr;
mace_private *lp = dev->priv;
mace_private *lp = netdev_priv(dev);
dev_link_t *link = &lp->link;
if (!DEV_OK(link))
......@@ -967,7 +967,7 @@ mace_close
static int mace_close(struct net_device *dev)
{
ioaddr_t ioaddr = dev->base_addr;
mace_private *lp = dev->priv;
mace_private *lp = netdev_priv(dev);
dev_link_t *link = &lp->link;
DEBUG(2, "%s: shutting down ethercard.\n", dev->name);
......@@ -1022,7 +1022,7 @@ mace_start_xmit
static void mace_tx_timeout(struct net_device *dev)
{
mace_private *lp = (mace_private *)dev->priv;
mace_private *lp = netdev_priv(dev);
dev_link_t *link = &lp->link;
printk(KERN_NOTICE "%s: transmit timed out -- ", dev->name);
......@@ -1038,7 +1038,7 @@ static void mace_tx_timeout(struct net_device *dev)
static int mace_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
mace_private *lp = (mace_private *)dev->priv;
mace_private *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr;
netif_stop_queue(dev);
......@@ -1099,7 +1099,7 @@ mace_interrupt
static irqreturn_t mace_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
struct net_device *dev = (struct net_device *) dev_id;
mace_private *lp = dev->priv;
mace_private *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr;
int status;
int IntrCnt = MACE_MAX_IR_ITERATIONS;
......@@ -1241,7 +1241,7 @@ mace_rx
---------------------------------------------------------------------------- */
static int mace_rx(struct net_device *dev, unsigned char RxCnt)
{
mace_private *lp = (mace_private *)dev->priv;
mace_private *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr;
unsigned char rx_framecnt;
unsigned short rx_status;
......@@ -1408,7 +1408,7 @@ update_stats
---------------------------------------------------------------------------- */
static void update_stats(ioaddr_t ioaddr, struct net_device *dev)
{
mace_private *lp = (mace_private *)dev->priv;
mace_private *lp = netdev_priv(dev);
lp->mace_stats.rcvcc += mace_read(lp, ioaddr, MACE_RCVCC);
lp->mace_stats.rntpc += mace_read(lp, ioaddr, MACE_RNTPC);
......@@ -1454,7 +1454,7 @@ mace_get_stats
---------------------------------------------------------------------------- */
static struct net_device_stats *mace_get_stats(struct net_device *dev)
{
mace_private *lp = (mace_private *)dev->priv;
mace_private *lp = netdev_priv(dev);
update_stats(dev->base_addr, dev);
......@@ -1549,7 +1549,7 @@ Input
---------------------------------------------------------------------------- */
static void restore_multicast_list(struct net_device *dev)
{
mace_private *lp = (mace_private *)dev->priv;
mace_private *lp = netdev_priv(dev);
int num_addrs = lp->multicast_num_addrs;
int *ladrf = lp->multicast_ladrf;
ioaddr_t ioaddr = dev->base_addr;
......@@ -1606,7 +1606,7 @@ Output
static void set_multicast_list(struct net_device *dev)
{
mace_private *lp = (mace_private *)dev->priv;
mace_private *lp = netdev_priv(dev);
int adr[ETHER_ADDR_LEN] = {0}; /* Ethernet address */
int i;
struct dev_mc_list *dmi = dev->mc_list;
......@@ -1645,10 +1645,10 @@ static void set_multicast_list(struct net_device *dev)
static void restore_multicast_list(struct net_device *dev)
{
ioaddr_t ioaddr = dev->base_addr;
mace_private *lp = (mace_private *)dev->priv;
mace_private *lp = netdev_priv(dev);
DEBUG(2, "%s: restoring Rx mode to %d addresses.\n", dev->name,
((mace_private *)(dev->priv))->multicast_num_addrs);
lp->multicast_num_addrs);
if (dev->flags & IFF_PROMISC) {
/* Promiscuous mode: receive all packets */
......@@ -1665,7 +1665,7 @@ static void restore_multicast_list(struct net_device *dev)
static void set_multicast_list(struct net_device *dev)
{
mace_private *lp = (mace_private *)dev->priv;
mace_private *lp = netdev_priv(dev);
#ifdef PCMCIA_DEBUG
if (pc_debug > 1) {
......
......@@ -595,7 +595,7 @@ xirc2ps_attach(void)
dev = alloc_etherdev(sizeof(local_info_t));
if (!dev)
return NULL;
local = dev->priv;
local = netdev_priv(dev);
link = &local->link;
link->priv = dev;
......@@ -710,7 +710,7 @@ static int
set_card_type(dev_link_t *link, const void *s)
{
struct net_device *dev = link->priv;
local_info_t *local = dev->priv;
local_info_t *local = netdev_priv(dev);
#ifdef PCMCIA_DEBUG
unsigned cisrev = ((const unsigned char *)s)[2];
#endif
......@@ -805,7 +805,7 @@ xirc2ps_config(dev_link_t * link)
{
client_handle_t handle = link->handle;
struct net_device *dev = link->priv;
local_info_t *local = dev->priv;
local_info_t *local = netdev_priv(dev);
tuple_t tuple;
cisparse_t parse;
ioaddr_t ioaddr;
......@@ -1159,7 +1159,7 @@ xirc2ps_release(dev_link_t *link)
if (link->win) {
struct net_device *dev = link->priv;
local_info_t *local = dev->priv;
local_info_t *local = netdev_priv(dev);
if (local->dingo)
iounmap(local->dingo_ccr - 0x0800);
pcmcia_release_window(link->win);
......@@ -1246,7 +1246,7 @@ static irqreturn_t
xirc2ps_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
struct net_device *dev = (struct net_device *)dev_id;
local_info_t *lp = dev->priv;
local_info_t *lp = netdev_priv(dev);
ioaddr_t ioaddr;
u_char saved_page;
unsigned bytes_rcvd;
......@@ -1468,7 +1468,7 @@ xirc2ps_interrupt(int irq, void *dev_id, struct pt_regs *regs)
static void
do_tx_timeout(struct net_device *dev)
{
local_info_t *lp = dev->priv;
local_info_t *lp = netdev_priv(dev);
printk(KERN_NOTICE "%s: transmit timed out\n", dev->name);
lp->stats.tx_errors++;
/* reset the card */
......@@ -1480,7 +1480,7 @@ do_tx_timeout(struct net_device *dev)
static int
do_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
local_info_t *lp = dev->priv;
local_info_t *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr;
int okay;
unsigned freespace;
......@@ -1537,7 +1537,7 @@ do_start_xmit(struct sk_buff *skb, struct net_device *dev)
static struct net_device_stats *
do_get_stats(struct net_device *dev)
{
local_info_t *lp = dev->priv;
local_info_t *lp = netdev_priv(dev);
/* lp->stats.rx_missed_errors = GetByte(?) */
return &lp->stats;
......@@ -1552,7 +1552,7 @@ static void
set_addresses(struct net_device *dev)
{
ioaddr_t ioaddr = dev->base_addr;
local_info_t *lp = dev->priv;
local_info_t *lp = netdev_priv(dev);
struct dev_mc_list *dmi = dev->mc_list;
char *addr;
int i,j,k,n;
......@@ -1617,7 +1617,7 @@ set_multicast_list(struct net_device *dev)
static int
do_config(struct net_device *dev, struct ifmap *map)
{
local_info_t *local = dev->priv;
local_info_t *local = netdev_priv(dev);
DEBUG(0, "do_config(%p)\n", dev);
if (map->port != 255 && map->port != dev->if_port) {
......@@ -1643,7 +1643,7 @@ do_config(struct net_device *dev, struct ifmap *map)
static int
do_open(struct net_device *dev)
{
local_info_t *lp = dev->priv;
local_info_t *lp = netdev_priv(dev);
dev_link_t *link = &lp->link;
DEBUG(0, "do_open(%p)\n", dev);
......@@ -1676,7 +1676,7 @@ static struct ethtool_ops netdev_ethtool_ops = {
static int
do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
local_info_t *local = dev->priv;
local_info_t *local = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr;
u16 *data = (u16 *)&rq->ifr_data;
......@@ -1708,7 +1708,7 @@ do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
static void
hardreset(struct net_device *dev)
{
local_info_t *local = dev->priv;
local_info_t *local = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr;
SelectPage(4);
......@@ -1725,7 +1725,7 @@ hardreset(struct net_device *dev)
static void
do_reset(struct net_device *dev, int full)
{
local_info_t *local = dev->priv;
local_info_t *local = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr;
unsigned value;
......@@ -1886,7 +1886,7 @@ do_reset(struct net_device *dev, int full)
static int
init_mii(struct net_device *dev)
{
local_info_t *local = dev->priv;
local_info_t *local = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr;
unsigned control, status, linkpartner;
int i;
......@@ -1973,7 +1973,7 @@ static int
do_stop(struct net_device *dev)
{
ioaddr_t ioaddr = dev->base_addr;
local_info_t *lp = dev->priv;
local_info_t *lp = netdev_priv(dev);
dev_link_t *link = &lp->link;
DEBUG(0, "do_stop(%p)\n", dev);
......
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