|
@@ -266,7 +266,7 @@ static void xirc2ps_detach(struct pcmcia_device *p_dev);
|
|
|
|
|
|
static irqreturn_t xirc2ps_interrupt(int irq, void *dev_id);
|
|
static irqreturn_t xirc2ps_interrupt(int irq, void *dev_id);
|
|
|
|
|
|
-typedef struct local_info_t {
|
|
|
|
|
|
+struct local_info {
|
|
struct net_device *dev;
|
|
struct net_device *dev;
|
|
struct pcmcia_device *p_dev;
|
|
struct pcmcia_device *p_dev;
|
|
|
|
|
|
@@ -281,7 +281,7 @@ typedef struct local_info_t {
|
|
unsigned last_ptr_value; /* last packets transmitted value */
|
|
unsigned last_ptr_value; /* last packets transmitted value */
|
|
const char *manf_str;
|
|
const char *manf_str;
|
|
struct work_struct tx_timeout_task;
|
|
struct work_struct tx_timeout_task;
|
|
-} local_info_t;
|
|
|
|
|
|
+};
|
|
|
|
|
|
/****************
|
|
/****************
|
|
* Some more prototypes
|
|
* Some more prototypes
|
|
@@ -475,12 +475,12 @@ static int
|
|
xirc2ps_probe(struct pcmcia_device *link)
|
|
xirc2ps_probe(struct pcmcia_device *link)
|
|
{
|
|
{
|
|
struct net_device *dev;
|
|
struct net_device *dev;
|
|
- local_info_t *local;
|
|
|
|
|
|
+ struct local_info *local;
|
|
|
|
|
|
dev_dbg(&link->dev, "attach()\n");
|
|
dev_dbg(&link->dev, "attach()\n");
|
|
|
|
|
|
/* Allocate the device structure */
|
|
/* Allocate the device structure */
|
|
- dev = alloc_etherdev(sizeof(local_info_t));
|
|
|
|
|
|
+ dev = alloc_etherdev(sizeof(struct local_info));
|
|
if (!dev)
|
|
if (!dev)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
local = netdev_priv(dev);
|
|
local = netdev_priv(dev);
|
|
@@ -536,7 +536,7 @@ static int
|
|
set_card_type(struct pcmcia_device *link)
|
|
set_card_type(struct pcmcia_device *link)
|
|
{
|
|
{
|
|
struct net_device *dev = link->priv;
|
|
struct net_device *dev = link->priv;
|
|
- local_info_t *local = netdev_priv(dev);
|
|
|
|
|
|
+ struct local_info *local = netdev_priv(dev);
|
|
u8 *buf;
|
|
u8 *buf;
|
|
unsigned int cisrev, mediaid, prodid;
|
|
unsigned int cisrev, mediaid, prodid;
|
|
size_t len;
|
|
size_t len;
|
|
@@ -690,7 +690,7 @@ static int
|
|
xirc2ps_config(struct pcmcia_device * link)
|
|
xirc2ps_config(struct pcmcia_device * link)
|
|
{
|
|
{
|
|
struct net_device *dev = link->priv;
|
|
struct net_device *dev = link->priv;
|
|
- local_info_t *local = netdev_priv(dev);
|
|
|
|
|
|
+ struct local_info *local = netdev_priv(dev);
|
|
unsigned int ioaddr;
|
|
unsigned int ioaddr;
|
|
int err;
|
|
int err;
|
|
u8 *buf;
|
|
u8 *buf;
|
|
@@ -931,7 +931,7 @@ xirc2ps_release(struct pcmcia_device *link)
|
|
|
|
|
|
if (link->resource[2]->end) {
|
|
if (link->resource[2]->end) {
|
|
struct net_device *dev = link->priv;
|
|
struct net_device *dev = link->priv;
|
|
- local_info_t *local = netdev_priv(dev);
|
|
|
|
|
|
+ struct local_info *local = netdev_priv(dev);
|
|
if (local->dingo)
|
|
if (local->dingo)
|
|
iounmap(local->dingo_ccr - 0x0800);
|
|
iounmap(local->dingo_ccr - 0x0800);
|
|
}
|
|
}
|
|
@@ -975,7 +975,7 @@ static irqreturn_t
|
|
xirc2ps_interrupt(int irq, void *dev_id)
|
|
xirc2ps_interrupt(int irq, void *dev_id)
|
|
{
|
|
{
|
|
struct net_device *dev = (struct net_device *)dev_id;
|
|
struct net_device *dev = (struct net_device *)dev_id;
|
|
- local_info_t *lp = netdev_priv(dev);
|
|
|
|
|
|
+ struct local_info *lp = netdev_priv(dev);
|
|
unsigned int ioaddr;
|
|
unsigned int ioaddr;
|
|
u_char saved_page;
|
|
u_char saved_page;
|
|
unsigned bytes_rcvd;
|
|
unsigned bytes_rcvd;
|
|
@@ -1194,8 +1194,8 @@ xirc2ps_interrupt(int irq, void *dev_id)
|
|
static void
|
|
static void
|
|
xirc2ps_tx_timeout_task(struct work_struct *work)
|
|
xirc2ps_tx_timeout_task(struct work_struct *work)
|
|
{
|
|
{
|
|
- local_info_t *local =
|
|
|
|
- container_of(work, local_info_t, tx_timeout_task);
|
|
|
|
|
|
+ struct local_info *local =
|
|
|
|
+ container_of(work, struct local_info, tx_timeout_task);
|
|
struct net_device *dev = local->dev;
|
|
struct net_device *dev = local->dev;
|
|
/* reset the card */
|
|
/* reset the card */
|
|
do_reset(dev,1);
|
|
do_reset(dev,1);
|
|
@@ -1206,7 +1206,7 @@ xirc2ps_tx_timeout_task(struct work_struct *work)
|
|
static void
|
|
static void
|
|
xirc_tx_timeout(struct net_device *dev)
|
|
xirc_tx_timeout(struct net_device *dev)
|
|
{
|
|
{
|
|
- local_info_t *lp = netdev_priv(dev);
|
|
|
|
|
|
+ struct local_info *lp = netdev_priv(dev);
|
|
dev->stats.tx_errors++;
|
|
dev->stats.tx_errors++;
|
|
netdev_notice(dev, "transmit timed out\n");
|
|
netdev_notice(dev, "transmit timed out\n");
|
|
schedule_work(&lp->tx_timeout_task);
|
|
schedule_work(&lp->tx_timeout_task);
|
|
@@ -1215,7 +1215,7 @@ xirc_tx_timeout(struct net_device *dev)
|
|
static netdev_tx_t
|
|
static netdev_tx_t
|
|
do_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|
do_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|
{
|
|
{
|
|
- local_info_t *lp = netdev_priv(dev);
|
|
|
|
|
|
+ struct local_info *lp = netdev_priv(dev);
|
|
unsigned int ioaddr = dev->base_addr;
|
|
unsigned int ioaddr = dev->base_addr;
|
|
int okay;
|
|
int okay;
|
|
unsigned freespace;
|
|
unsigned freespace;
|
|
@@ -1300,7 +1300,7 @@ static void set_address(struct set_address_info *sa_info, char *addr)
|
|
static void set_addresses(struct net_device *dev)
|
|
static void set_addresses(struct net_device *dev)
|
|
{
|
|
{
|
|
unsigned int ioaddr = dev->base_addr;
|
|
unsigned int ioaddr = dev->base_addr;
|
|
- local_info_t *lp = netdev_priv(dev);
|
|
|
|
|
|
+ struct local_info *lp = netdev_priv(dev);
|
|
struct netdev_hw_addr *ha;
|
|
struct netdev_hw_addr *ha;
|
|
struct set_address_info sa_info;
|
|
struct set_address_info sa_info;
|
|
int i;
|
|
int i;
|
|
@@ -1362,7 +1362,7 @@ set_multicast_list(struct net_device *dev)
|
|
static int
|
|
static int
|
|
do_config(struct net_device *dev, struct ifmap *map)
|
|
do_config(struct net_device *dev, struct ifmap *map)
|
|
{
|
|
{
|
|
- local_info_t *local = netdev_priv(dev);
|
|
|
|
|
|
+ struct local_info *local = netdev_priv(dev);
|
|
|
|
|
|
pr_debug("do_config(%p)\n", dev);
|
|
pr_debug("do_config(%p)\n", dev);
|
|
if (map->port != 255 && map->port != dev->if_port) {
|
|
if (map->port != 255 && map->port != dev->if_port) {
|
|
@@ -1387,7 +1387,7 @@ do_config(struct net_device *dev, struct ifmap *map)
|
|
static int
|
|
static int
|
|
do_open(struct net_device *dev)
|
|
do_open(struct net_device *dev)
|
|
{
|
|
{
|
|
- local_info_t *lp = netdev_priv(dev);
|
|
|
|
|
|
+ struct local_info *lp = netdev_priv(dev);
|
|
struct pcmcia_device *link = lp->p_dev;
|
|
struct pcmcia_device *link = lp->p_dev;
|
|
|
|
|
|
dev_dbg(&link->dev, "do_open(%p)\n", dev);
|
|
dev_dbg(&link->dev, "do_open(%p)\n", dev);
|
|
@@ -1421,7 +1421,7 @@ static const struct ethtool_ops netdev_ethtool_ops = {
|
|
static int
|
|
static int
|
|
do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|
do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|
{
|
|
{
|
|
- local_info_t *local = netdev_priv(dev);
|
|
|
|
|
|
+ struct local_info *local = netdev_priv(dev);
|
|
unsigned int ioaddr = dev->base_addr;
|
|
unsigned int ioaddr = dev->base_addr;
|
|
struct mii_ioctl_data *data = if_mii(rq);
|
|
struct mii_ioctl_data *data = if_mii(rq);
|
|
|
|
|
|
@@ -1453,7 +1453,7 @@ do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|
static void
|
|
static void
|
|
hardreset(struct net_device *dev)
|
|
hardreset(struct net_device *dev)
|
|
{
|
|
{
|
|
- local_info_t *local = netdev_priv(dev);
|
|
|
|
|
|
+ struct local_info *local = netdev_priv(dev);
|
|
unsigned int ioaddr = dev->base_addr;
|
|
unsigned int ioaddr = dev->base_addr;
|
|
|
|
|
|
SelectPage(4);
|
|
SelectPage(4);
|
|
@@ -1470,7 +1470,7 @@ hardreset(struct net_device *dev)
|
|
static void
|
|
static void
|
|
do_reset(struct net_device *dev, int full)
|
|
do_reset(struct net_device *dev, int full)
|
|
{
|
|
{
|
|
- local_info_t *local = netdev_priv(dev);
|
|
|
|
|
|
+ struct local_info *local = netdev_priv(dev);
|
|
unsigned int ioaddr = dev->base_addr;
|
|
unsigned int ioaddr = dev->base_addr;
|
|
unsigned value;
|
|
unsigned value;
|
|
|
|
|
|
@@ -1631,7 +1631,7 @@ do_reset(struct net_device *dev, int full)
|
|
static int
|
|
static int
|
|
init_mii(struct net_device *dev)
|
|
init_mii(struct net_device *dev)
|
|
{
|
|
{
|
|
- local_info_t *local = netdev_priv(dev);
|
|
|
|
|
|
+ struct local_info *local = netdev_priv(dev);
|
|
unsigned int ioaddr = dev->base_addr;
|
|
unsigned int ioaddr = dev->base_addr;
|
|
unsigned control, status, linkpartner;
|
|
unsigned control, status, linkpartner;
|
|
int i;
|
|
int i;
|
|
@@ -1715,7 +1715,7 @@ static int
|
|
do_stop(struct net_device *dev)
|
|
do_stop(struct net_device *dev)
|
|
{
|
|
{
|
|
unsigned int ioaddr = dev->base_addr;
|
|
unsigned int ioaddr = dev->base_addr;
|
|
- local_info_t *lp = netdev_priv(dev);
|
|
|
|
|
|
+ struct local_info *lp = netdev_priv(dev);
|
|
struct pcmcia_device *link = lp->p_dev;
|
|
struct pcmcia_device *link = lp->p_dev;
|
|
|
|
|
|
dev_dbg(&link->dev, "do_stop(%p)\n", dev);
|
|
dev_dbg(&link->dev, "do_stop(%p)\n", dev);
|