Commit 4fd9fa2e authored by Jeff Garzik's avatar Jeff Garzik

Update wireless net drivers wavelan and wavelan_cs to directly

use spin_[un]lock_irq{save,restore}, instead of defining static
inline functions to do the same thing (but possibly in a non-portable
way).
parent a5220ff4
...@@ -22,28 +22,6 @@ ...@@ -22,28 +22,6 @@
* (WaveLAN modem or i82586) * (WaveLAN modem or i82586)
*/ */
/*------------------------------------------------------------------*/
/*
* Wrapper for disabling interrupts and locking the driver.
* (note : inline, so optimised away)
*/
static inline void wv_splhi(net_local * lp,
unsigned long * pflags)
{
spin_lock_irqsave(&lp->spinlock, *pflags);
/* Note : above does the cli(); itself */
}
/*------------------------------------------------------------------*/
/*
* Wrapper for re-enabling interrupts and un-locking the driver.
*/
static inline void wv_splx(net_local * lp,
unsigned long * pflags)
{
spin_unlock_irqrestore(&lp->spinlock, *pflags);
}
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
/* /*
* Translate irq number to PSA irq parameter * Translate irq number to PSA irq parameter
...@@ -870,10 +848,10 @@ static inline void wv_82586_reconfig(device * dev) ...@@ -870,10 +848,10 @@ static inline void wv_82586_reconfig(device * dev)
/* Check if we can do it now ! */ /* Check if we can do it now ! */
if((netif_running(dev)) && !(netif_queue_stopped(dev))) { if((netif_running(dev)) && !(netif_queue_stopped(dev))) {
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* May fail */ /* May fail */
wv_82586_config(dev); wv_82586_config(dev);
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
} }
else { else {
#ifdef DEBUG_CONFIG_INFO #ifdef DEBUG_CONFIG_INFO
...@@ -1814,7 +1792,7 @@ static int wavelan_set_nwid(struct net_device *dev, ...@@ -1814,7 +1792,7 @@ static int wavelan_set_nwid(struct net_device *dev,
int ret = 0; int ret = 0;
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Set NWID in WaveLAN. */ /* Set NWID in WaveLAN. */
if (!wrqu->nwid.disabled) { if (!wrqu->nwid.disabled) {
...@@ -1851,7 +1829,7 @@ static int wavelan_set_nwid(struct net_device *dev, ...@@ -1851,7 +1829,7 @@ static int wavelan_set_nwid(struct net_device *dev,
update_psa_checksum(dev, ioaddr, lp->hacr); update_psa_checksum(dev, ioaddr, lp->hacr);
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return ret; return ret;
} }
...@@ -1872,7 +1850,7 @@ static int wavelan_get_nwid(struct net_device *dev, ...@@ -1872,7 +1850,7 @@ static int wavelan_get_nwid(struct net_device *dev,
int ret = 0; int ret = 0;
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Read the NWID. */ /* Read the NWID. */
psa_read(ioaddr, lp->hacr, psa_read(ioaddr, lp->hacr,
...@@ -1883,7 +1861,7 @@ static int wavelan_get_nwid(struct net_device *dev, ...@@ -1883,7 +1861,7 @@ static int wavelan_get_nwid(struct net_device *dev,
wrqu->nwid.fixed = 1; /* Superfluous */ wrqu->nwid.fixed = 1; /* Superfluous */
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return ret; return ret;
} }
...@@ -1903,7 +1881,7 @@ static int wavelan_set_freq(struct net_device *dev, ...@@ -1903,7 +1881,7 @@ static int wavelan_set_freq(struct net_device *dev,
int ret; int ret;
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Attempt to recognise 2.00 cards (2.4 GHz frequency selectable). */ /* Attempt to recognise 2.00 cards (2.4 GHz frequency selectable). */
if (!(mmc_in(ioaddr, mmroff(0, mmr_fee_status)) & if (!(mmc_in(ioaddr, mmroff(0, mmr_fee_status)) &
...@@ -1913,7 +1891,7 @@ static int wavelan_set_freq(struct net_device *dev, ...@@ -1913,7 +1891,7 @@ static int wavelan_set_freq(struct net_device *dev,
ret = -EOPNOTSUPP; ret = -EOPNOTSUPP;
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return ret; return ret;
} }
...@@ -1934,7 +1912,7 @@ static int wavelan_get_freq(struct net_device *dev, ...@@ -1934,7 +1912,7 @@ static int wavelan_get_freq(struct net_device *dev,
int ret = 0; int ret = 0;
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Attempt to recognise 2.00 cards (2.4 GHz frequency selectable). /* Attempt to recognise 2.00 cards (2.4 GHz frequency selectable).
* Does it work for everybody, especially old cards? */ * Does it work for everybody, especially old cards? */
...@@ -1959,7 +1937,7 @@ static int wavelan_get_freq(struct net_device *dev, ...@@ -1959,7 +1937,7 @@ static int wavelan_get_freq(struct net_device *dev,
} }
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return ret; return ret;
} }
...@@ -1980,7 +1958,7 @@ static int wavelan_set_sens(struct net_device *dev, ...@@ -1980,7 +1958,7 @@ static int wavelan_set_sens(struct net_device *dev,
int ret = 0; int ret = 0;
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Set the level threshold. */ /* Set the level threshold. */
/* We should complain loudly if wrqu->sens.fixed = 0, because we /* We should complain loudly if wrqu->sens.fixed = 0, because we
...@@ -1995,7 +1973,7 @@ static int wavelan_set_sens(struct net_device *dev, ...@@ -1995,7 +1973,7 @@ static int wavelan_set_sens(struct net_device *dev,
psa.psa_thr_pre_set); psa.psa_thr_pre_set);
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return ret; return ret;
} }
...@@ -2016,7 +1994,7 @@ static int wavelan_get_sens(struct net_device *dev, ...@@ -2016,7 +1994,7 @@ static int wavelan_get_sens(struct net_device *dev,
int ret = 0; int ret = 0;
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Read the level threshold. */ /* Read the level threshold. */
psa_read(ioaddr, lp->hacr, psa_read(ioaddr, lp->hacr,
...@@ -2026,7 +2004,7 @@ static int wavelan_get_sens(struct net_device *dev, ...@@ -2026,7 +2004,7 @@ static int wavelan_get_sens(struct net_device *dev,
wrqu->sens.fixed = 1; wrqu->sens.fixed = 1;
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return ret; return ret;
} }
...@@ -2047,7 +2025,7 @@ static int wavelan_set_encode(struct net_device *dev, ...@@ -2047,7 +2025,7 @@ static int wavelan_set_encode(struct net_device *dev,
int ret = 0; int ret = 0;
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Check if capable of encryption */ /* Check if capable of encryption */
if (!mmc_encr(ioaddr)) { if (!mmc_encr(ioaddr)) {
...@@ -2096,7 +2074,7 @@ static int wavelan_set_encode(struct net_device *dev, ...@@ -2096,7 +2074,7 @@ static int wavelan_set_encode(struct net_device *dev,
} }
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return ret; return ret;
} }
...@@ -2117,7 +2095,7 @@ static int wavelan_get_encode(struct net_device *dev, ...@@ -2117,7 +2095,7 @@ static int wavelan_get_encode(struct net_device *dev,
int ret = 0; int ret = 0;
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Check if encryption is available */ /* Check if encryption is available */
if (!mmc_encr(ioaddr)) { if (!mmc_encr(ioaddr)) {
...@@ -2143,7 +2121,7 @@ static int wavelan_get_encode(struct net_device *dev, ...@@ -2143,7 +2121,7 @@ static int wavelan_get_encode(struct net_device *dev,
} }
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return ret; return ret;
} }
...@@ -2191,7 +2169,7 @@ static int wavelan_get_range(struct net_device *dev, ...@@ -2191,7 +2169,7 @@ static int wavelan_get_range(struct net_device *dev,
range->bitrate[0] = 2000000; /* 2 Mb/s */ range->bitrate[0] = 2000000; /* 2 Mb/s */
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Attempt to recognise 2.00 cards (2.4 GHz frequency selectable). */ /* Attempt to recognise 2.00 cards (2.4 GHz frequency selectable). */
if (!(mmc_in(ioaddr, mmroff(0, mmr_fee_status)) & if (!(mmc_in(ioaddr, mmroff(0, mmr_fee_status)) &
...@@ -2213,7 +2191,7 @@ static int wavelan_get_range(struct net_device *dev, ...@@ -2213,7 +2191,7 @@ static int wavelan_get_range(struct net_device *dev,
} }
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return ret; return ret;
} }
...@@ -2320,7 +2298,7 @@ static int wavelan_set_qthr(struct net_device *dev, ...@@ -2320,7 +2298,7 @@ static int wavelan_set_qthr(struct net_device *dev,
unsigned long flags; unsigned long flags;
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
psa.psa_quality_thr = *(extra) & 0x0F; psa.psa_quality_thr = *(extra) & 0x0F;
psa_write(ioaddr, lp->hacr, psa_write(ioaddr, lp->hacr,
...@@ -2332,7 +2310,7 @@ static int wavelan_set_qthr(struct net_device *dev, ...@@ -2332,7 +2310,7 @@ static int wavelan_set_qthr(struct net_device *dev,
psa.psa_quality_thr); psa.psa_quality_thr);
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return 0; return 0;
} }
...@@ -2352,7 +2330,7 @@ static int wavelan_get_qthr(struct net_device *dev, ...@@ -2352,7 +2330,7 @@ static int wavelan_get_qthr(struct net_device *dev,
unsigned long flags; unsigned long flags;
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
psa_read(ioaddr, lp->hacr, psa_read(ioaddr, lp->hacr,
(char *) &psa.psa_quality_thr - (char *) &psa, (char *) &psa.psa_quality_thr - (char *) &psa,
...@@ -2360,7 +2338,7 @@ static int wavelan_get_qthr(struct net_device *dev, ...@@ -2360,7 +2338,7 @@ static int wavelan_get_qthr(struct net_device *dev,
*(extra) = psa.psa_quality_thr & 0x0F; *(extra) = psa.psa_quality_thr & 0x0F;
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return 0; return 0;
} }
...@@ -2541,7 +2519,7 @@ static iw_stats *wavelan_get_wireless_stats(device * dev) ...@@ -2541,7 +2519,7 @@ static iw_stats *wavelan_get_wireless_stats(device * dev)
return (iw_stats *) NULL; return (iw_stats *) NULL;
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
wstats = &lp->wstats; wstats = &lp->wstats;
...@@ -2569,7 +2547,7 @@ static iw_stats *wavelan_get_wireless_stats(device * dev) ...@@ -2569,7 +2547,7 @@ static iw_stats *wavelan_get_wireless_stats(device * dev)
wstats->discard.misc = 0L; wstats->discard.misc = 0L;
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
#ifdef DEBUG_IOCTL_TRACE #ifdef DEBUG_IOCTL_TRACE
printk(KERN_DEBUG "%s: <-wavelan_get_wireless_stats()\n", printk(KERN_DEBUG "%s: <-wavelan_get_wireless_stats()\n",
...@@ -2903,7 +2881,7 @@ static inline int wv_packet_write(device * dev, void *buf, short length) ...@@ -2903,7 +2881,7 @@ static inline int wv_packet_write(device * dev, void *buf, short length)
if (clen < ETH_ZLEN) if (clen < ETH_ZLEN)
clen = ETH_ZLEN; clen = ETH_ZLEN;
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Check nothing bad has happened */ /* Check nothing bad has happened */
if (lp->tx_n_in_use == (NTXBLOCKS - 1)) { if (lp->tx_n_in_use == (NTXBLOCKS - 1)) {
...@@ -2911,7 +2889,7 @@ static inline int wv_packet_write(device * dev, void *buf, short length) ...@@ -2911,7 +2889,7 @@ static inline int wv_packet_write(device * dev, void *buf, short length)
printk(KERN_INFO "%s: wv_packet_write(): Tx queue full.\n", printk(KERN_INFO "%s: wv_packet_write(): Tx queue full.\n",
dev->name); dev->name);
#endif #endif
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return 1; return 1;
} }
...@@ -2989,7 +2967,7 @@ static inline int wv_packet_write(device * dev, void *buf, short length) ...@@ -2989,7 +2967,7 @@ static inline int wv_packet_write(device * dev, void *buf, short length)
if (lp->tx_n_in_use < NTXBLOCKS - 1) if (lp->tx_n_in_use < NTXBLOCKS - 1)
netif_wake_queue(dev); netif_wake_queue(dev);
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
#ifdef DEBUG_TX_INFO #ifdef DEBUG_TX_INFO
wv_packet_info((u8 *) buf, length, dev->name, wv_packet_info((u8 *) buf, length, dev->name,
...@@ -3030,9 +3008,9 @@ static int wavelan_packet_xmit(struct sk_buff *skb, device * dev) ...@@ -3030,9 +3008,9 @@ static int wavelan_packet_xmit(struct sk_buff *skb, device * dev)
* we can do it now. * we can do it now.
*/ */
if (lp->reconfig_82586) { if (lp->reconfig_82586) {
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
wv_82586_config(dev); wv_82586_config(dev);
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
/* Check that we can continue */ /* Check that we can continue */
if (lp->tx_n_in_use == (NTXBLOCKS - 1)) if (lp->tx_n_in_use == (NTXBLOCKS - 1))
return 1; return 1;
...@@ -3892,7 +3870,7 @@ static void wavelan_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -3892,7 +3870,7 @@ static void wavelan_interrupt(int irq, void *dev_id, struct pt_regs *regs)
/* Prevent reentrancy. We need to do that because we may have /* Prevent reentrancy. We need to do that because we may have
* multiple interrupt handler running concurrently. * multiple interrupt handler running concurrently.
* It is safe because wv_splhi() disables interrupts before acquiring * It is safe because interrupts are disabled before acquiring
* the spinlock. */ * the spinlock. */
spin_lock(&lp->spinlock); spin_lock(&lp->spinlock);
...@@ -4020,7 +3998,7 @@ static void wavelan_watchdog(device * dev) ...@@ -4020,7 +3998,7 @@ static void wavelan_watchdog(device * dev)
return; return;
} }
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Try to see if some buffers are not free (in case we missed /* Try to see if some buffers are not free (in case we missed
* an interrupt */ * an interrupt */
...@@ -4060,7 +4038,7 @@ static void wavelan_watchdog(device * dev) ...@@ -4060,7 +4038,7 @@ static void wavelan_watchdog(device * dev)
if (lp->tx_n_in_use < NTXBLOCKS - 1) if (lp->tx_n_in_use < NTXBLOCKS - 1)
netif_wake_queue(dev); netif_wake_queue(dev);
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
#ifdef DEBUG_INTERRUPT_TRACE #ifdef DEBUG_INTERRUPT_TRACE
printk(KERN_DEBUG "%s: <-wavelan_watchdog()\n", dev->name); printk(KERN_DEBUG "%s: <-wavelan_watchdog()\n", dev->name);
...@@ -4107,7 +4085,7 @@ static int wavelan_open(device * dev) ...@@ -4107,7 +4085,7 @@ static int wavelan_open(device * dev)
return -EAGAIN; return -EAGAIN;
} }
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
if (wv_hw_reset(dev) != -1) { if (wv_hw_reset(dev) != -1) {
netif_start_queue(dev); netif_start_queue(dev);
...@@ -4118,10 +4096,10 @@ static int wavelan_open(device * dev) ...@@ -4118,10 +4096,10 @@ static int wavelan_open(device * dev)
"%s: wavelan_open(): impossible to start the card\n", "%s: wavelan_open(): impossible to start the card\n",
dev->name); dev->name);
#endif #endif
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return -EAGAIN; return -EAGAIN;
} }
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
#ifdef DEBUG_CALLBACK_TRACE #ifdef DEBUG_CALLBACK_TRACE
printk(KERN_DEBUG "%s: <-wavelan_open()\n", dev->name); printk(KERN_DEBUG "%s: <-wavelan_open()\n", dev->name);
...@@ -4149,9 +4127,9 @@ static int wavelan_close(device * dev) ...@@ -4149,9 +4127,9 @@ static int wavelan_close(device * dev)
/* /*
* Flush the Tx and disable Rx. * Flush the Tx and disable Rx.
*/ */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
wv_82586_stop(dev); wv_82586_stop(dev);
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
free_irq(dev->irq, dev); free_irq(dev->irq, dev);
......
...@@ -521,12 +521,6 @@ struct net_local ...@@ -521,12 +521,6 @@ struct net_local
/**************************** PROTOTYPES ****************************/ /**************************** PROTOTYPES ****************************/
/* ----------------------- MISC. SUBROUTINES ------------------------ */ /* ----------------------- MISC. SUBROUTINES ------------------------ */
static inline void
wv_splhi(net_local *, /* Disable interrupts, lock driver */
unsigned long *); /* flags */
static inline void
wv_splx(net_local *, /* Enable interrupts, unlock driver */
unsigned long *); /* flags */
static u_char static u_char
wv_irq_to_psa(int); wv_irq_to_psa(int);
static int static int
......
...@@ -64,34 +64,6 @@ ...@@ -64,34 +64,6 @@
* (wavelan modem or i82593) * (wavelan modem or i82593)
*/ */
/*------------------------------------------------------------------*/
/*
* Wrapper for disabling interrupts.
* (note : inline, so optimised away)
*/
static inline void
wv_splhi(net_local * lp,
unsigned long * pflags)
{
spin_lock_irqsave(&lp->spinlock, *pflags);
/* Note : above does the cli(); itself */
}
/*------------------------------------------------------------------*/
/*
* Wrapper for re-enabling interrupts.
*/
static inline void
wv_splx(net_local * lp,
unsigned long * pflags)
{
spin_unlock_irqrestore(&lp->spinlock, *pflags);
/* Note : enabling interrupts on the hardware is done in wv_ru_start()
* via : outb(OP1_INT_ENABLE, LCCR(base));
*/
}
/*------------------------------------------------------------------*/ /*------------------------------------------------------------------*/
/* /*
* Wrapper for reporting error to cardservices * Wrapper for reporting error to cardservices
...@@ -591,7 +563,7 @@ void wv_nwid_filter(unsigned char mode, net_local *lp) ...@@ -591,7 +563,7 @@ void wv_nwid_filter(unsigned char mode, net_local *lp)
#endif #endif
/* Disable interrupts & save flags */ /* Disable interrupts & save flags */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
m.w.mmw_loopt_sel = (mode==NWID_PROMISC) ? MMW_LOOPT_SEL_DIS_NWID : 0x00; m.w.mmw_loopt_sel = (mode==NWID_PROMISC) ? MMW_LOOPT_SEL_DIS_NWID : 0x00;
mmc_write(lp->dev->base_addr, (char *)&m.w.mmw_loopt_sel - (char *)&m, (unsigned char *)&m.w.mmw_loopt_sel, 1); mmc_write(lp->dev->base_addr, (char *)&m.w.mmw_loopt_sel - (char *)&m, (unsigned char *)&m.w.mmw_loopt_sel, 1);
...@@ -602,7 +574,7 @@ void wv_nwid_filter(unsigned char mode, net_local *lp) ...@@ -602,7 +574,7 @@ void wv_nwid_filter(unsigned char mode, net_local *lp)
lp->cell_search=0; lp->cell_search=0;
/* ReEnable interrupts & restore flags */ /* ReEnable interrupts & restore flags */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
} }
/* Find a record in the WavePoint table matching a given NWID */ /* Find a record in the WavePoint table matching a given NWID */
...@@ -771,7 +743,7 @@ void wv_roam_handover(wavepoint_history *wavepoint, net_local *lp) ...@@ -771,7 +743,7 @@ void wv_roam_handover(wavepoint_history *wavepoint, net_local *lp)
#endif #endif
/* Disable interrupts & save flags */ /* Disable interrupts & save flags */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
m.w.mmw_netw_id_l = wavepoint->nwid & 0xFF; m.w.mmw_netw_id_l = wavepoint->nwid & 0xFF;
m.w.mmw_netw_id_h = (wavepoint->nwid & 0xFF00) >> 8; m.w.mmw_netw_id_h = (wavepoint->nwid & 0xFF00) >> 8;
...@@ -779,7 +751,7 @@ void wv_roam_handover(wavepoint_history *wavepoint, net_local *lp) ...@@ -779,7 +751,7 @@ void wv_roam_handover(wavepoint_history *wavepoint, net_local *lp)
mmc_write(base, (char *)&m.w.mmw_netw_id_l - (char *)&m, (unsigned char *)&m.w.mmw_netw_id_l, 2); mmc_write(base, (char *)&m.w.mmw_netw_id_l - (char *)&m, (unsigned char *)&m.w.mmw_netw_id_l, 2);
/* ReEnable interrupts & restore flags */ /* ReEnable interrupts & restore flags */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
wv_nwid_filter(!NWID_PROMISC,lp); wv_nwid_filter(!NWID_PROMISC,lp);
lp->curr_point=wavepoint; lp->curr_point=wavepoint;
...@@ -1049,9 +1021,9 @@ wv_82593_reconfig(device * dev) ...@@ -1049,9 +1021,9 @@ wv_82593_reconfig(device * dev)
/* Check if we can do it now ! */ /* Check if we can do it now ! */
if((link->open) && (netif_running(dev)) && !(netif_queue_stopped(dev))) if((link->open) && (netif_running(dev)) && !(netif_queue_stopped(dev)))
{ {
wv_splhi(lp, &flags); /* Disable interrupts */ spin_lock_irqsave(&lp->spinlock, flags); /* Disable interrupts */
wv_82593_config(dev); wv_82593_config(dev);
wv_splx(lp, &flags); /* Re-enable interrupts */ spin_unlock_irqrestore(&lp->spinlock, flags); /* Re-enable interrupts */
} }
else else
{ {
...@@ -1179,7 +1151,7 @@ wv_mmc_show(device * dev) ...@@ -1179,7 +1151,7 @@ wv_mmc_show(device * dev)
return; return;
} }
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Read the mmc */ /* Read the mmc */
mmc_out(base, mmwoff(0, mmw_freeze), 1); mmc_out(base, mmwoff(0, mmw_freeze), 1);
...@@ -1191,7 +1163,7 @@ wv_mmc_show(device * dev) ...@@ -1191,7 +1163,7 @@ wv_mmc_show(device * dev)
lp->wstats.discard.nwid += (m.mmr_wrong_nwid_h << 8) | m.mmr_wrong_nwid_l; lp->wstats.discard.nwid += (m.mmr_wrong_nwid_h << 8) | m.mmr_wrong_nwid_l;
#endif /* WIRELESS_EXT */ #endif /* WIRELESS_EXT */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
printk(KERN_DEBUG "##### wavelan modem status registers: #####\n"); printk(KERN_DEBUG "##### wavelan modem status registers: #####\n");
#ifdef DEBUG_SHOW_UNUSED #ifdef DEBUG_SHOW_UNUSED
...@@ -1912,7 +1884,7 @@ static int wavelan_set_nwid(struct net_device *dev, ...@@ -1912,7 +1884,7 @@ static int wavelan_set_nwid(struct net_device *dev,
int ret = 0; int ret = 0;
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Set NWID in WaveLAN. */ /* Set NWID in WaveLAN. */
#if WIRELESS_EXT > 8 #if WIRELESS_EXT > 8
...@@ -1956,7 +1928,7 @@ static int wavelan_set_nwid(struct net_device *dev, ...@@ -1956,7 +1928,7 @@ static int wavelan_set_nwid(struct net_device *dev,
update_psa_checksum(dev); update_psa_checksum(dev);
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return ret; return ret;
} }
...@@ -1976,7 +1948,7 @@ static int wavelan_get_nwid(struct net_device *dev, ...@@ -1976,7 +1948,7 @@ static int wavelan_get_nwid(struct net_device *dev,
int ret = 0; int ret = 0;
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Read the NWID. */ /* Read the NWID. */
psa_read(dev, psa_read(dev,
...@@ -1992,7 +1964,7 @@ static int wavelan_get_nwid(struct net_device *dev, ...@@ -1992,7 +1964,7 @@ static int wavelan_get_nwid(struct net_device *dev,
#endif /* WIRELESS_EXT > 8 */ #endif /* WIRELESS_EXT > 8 */
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return ret; return ret;
} }
...@@ -2012,7 +1984,7 @@ static int wavelan_set_freq(struct net_device *dev, ...@@ -2012,7 +1984,7 @@ static int wavelan_set_freq(struct net_device *dev,
int ret; int ret;
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Attempt to recognise 2.00 cards (2.4 GHz frequency selectable). */ /* Attempt to recognise 2.00 cards (2.4 GHz frequency selectable). */
if (!(mmc_in(base, mmroff(0, mmr_fee_status)) & if (!(mmc_in(base, mmroff(0, mmr_fee_status)) &
...@@ -2022,7 +1994,7 @@ static int wavelan_set_freq(struct net_device *dev, ...@@ -2022,7 +1994,7 @@ static int wavelan_set_freq(struct net_device *dev,
ret = -EOPNOTSUPP; ret = -EOPNOTSUPP;
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return ret; return ret;
} }
...@@ -2043,7 +2015,7 @@ static int wavelan_get_freq(struct net_device *dev, ...@@ -2043,7 +2015,7 @@ static int wavelan_get_freq(struct net_device *dev,
int ret = 0; int ret = 0;
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Attempt to recognise 2.00 cards (2.4 GHz frequency selectable). /* Attempt to recognise 2.00 cards (2.4 GHz frequency selectable).
* Does it work for everybody, especially old cards? */ * Does it work for everybody, especially old cards? */
...@@ -2068,7 +2040,7 @@ static int wavelan_get_freq(struct net_device *dev, ...@@ -2068,7 +2040,7 @@ static int wavelan_get_freq(struct net_device *dev,
} }
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return ret; return ret;
} }
...@@ -2089,7 +2061,7 @@ static int wavelan_set_sens(struct net_device *dev, ...@@ -2089,7 +2061,7 @@ static int wavelan_set_sens(struct net_device *dev,
int ret = 0; int ret = 0;
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Set the level threshold. */ /* Set the level threshold. */
#if WIRELESS_EXT > 7 #if WIRELESS_EXT > 7
...@@ -2108,7 +2080,7 @@ static int wavelan_set_sens(struct net_device *dev, ...@@ -2108,7 +2080,7 @@ static int wavelan_set_sens(struct net_device *dev,
psa.psa_thr_pre_set); psa.psa_thr_pre_set);
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return ret; return ret;
} }
...@@ -2128,7 +2100,7 @@ static int wavelan_get_sens(struct net_device *dev, ...@@ -2128,7 +2100,7 @@ static int wavelan_get_sens(struct net_device *dev,
int ret = 0; int ret = 0;
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Read the level threshold. */ /* Read the level threshold. */
psa_read(dev, psa_read(dev,
...@@ -2142,7 +2114,7 @@ static int wavelan_get_sens(struct net_device *dev, ...@@ -2142,7 +2114,7 @@ static int wavelan_get_sens(struct net_device *dev,
#endif /* WIRELESS_EXT > 7 */ #endif /* WIRELESS_EXT > 7 */
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return ret; return ret;
} }
...@@ -2164,7 +2136,7 @@ static int wavelan_set_encode(struct net_device *dev, ...@@ -2164,7 +2136,7 @@ static int wavelan_set_encode(struct net_device *dev,
int ret = 0; int ret = 0;
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Check if capable of encryption */ /* Check if capable of encryption */
if (!mmc_encr(base)) { if (!mmc_encr(base)) {
...@@ -2213,7 +2185,7 @@ static int wavelan_set_encode(struct net_device *dev, ...@@ -2213,7 +2185,7 @@ static int wavelan_set_encode(struct net_device *dev,
} }
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return ret; return ret;
} }
...@@ -2234,7 +2206,7 @@ static int wavelan_get_encode(struct net_device *dev, ...@@ -2234,7 +2206,7 @@ static int wavelan_get_encode(struct net_device *dev,
int ret = 0; int ret = 0;
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Check if encryption is available */ /* Check if encryption is available */
if (!mmc_encr(base)) { if (!mmc_encr(base)) {
...@@ -2260,7 +2232,7 @@ static int wavelan_get_encode(struct net_device *dev, ...@@ -2260,7 +2232,7 @@ static int wavelan_get_encode(struct net_device *dev,
} }
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return ret; return ret;
} }
...@@ -2282,7 +2254,7 @@ static int wavelan_set_essid(struct net_device *dev, ...@@ -2282,7 +2254,7 @@ static int wavelan_set_essid(struct net_device *dev,
int ret = 0; int ret = 0;
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Check if disable */ /* Check if disable */
if(wrqu->data.flags == 0) if(wrqu->data.flags == 0)
...@@ -2311,7 +2283,7 @@ static int wavelan_set_essid(struct net_device *dev, ...@@ -2311,7 +2283,7 @@ static int wavelan_set_essid(struct net_device *dev,
} }
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return ret; return ret;
} }
...@@ -2397,7 +2369,7 @@ static int wavelan_set_mode(struct net_device *dev, ...@@ -2397,7 +2369,7 @@ static int wavelan_set_mode(struct net_device *dev,
int ret = 0; int ret = 0;
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Check mode */ /* Check mode */
switch(wrqu->mode) { switch(wrqu->mode) {
...@@ -2418,7 +2390,7 @@ static int wavelan_set_mode(struct net_device *dev, ...@@ -2418,7 +2390,7 @@ static int wavelan_set_mode(struct net_device *dev,
} }
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return ret; return ret;
} }
...@@ -2491,7 +2463,7 @@ static int wavelan_get_range(struct net_device *dev, ...@@ -2491,7 +2463,7 @@ static int wavelan_get_range(struct net_device *dev,
#endif /* WIRELESS_EXT > 7 */ #endif /* WIRELESS_EXT > 7 */
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Attempt to recognise 2.00 cards (2.4 GHz frequency selectable). */ /* Attempt to recognise 2.00 cards (2.4 GHz frequency selectable). */
if (!(mmc_in(base, mmroff(0, mmr_fee_status)) & if (!(mmc_in(base, mmroff(0, mmr_fee_status)) &
...@@ -2515,7 +2487,7 @@ static int wavelan_get_range(struct net_device *dev, ...@@ -2515,7 +2487,7 @@ static int wavelan_get_range(struct net_device *dev,
#endif /* WIRELESS_EXT > 8 */ #endif /* WIRELESS_EXT > 8 */
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return ret; return ret;
} }
...@@ -2622,7 +2594,7 @@ static int wavelan_set_qthr(struct net_device *dev, ...@@ -2622,7 +2594,7 @@ static int wavelan_set_qthr(struct net_device *dev,
unsigned long flags; unsigned long flags;
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
psa.psa_quality_thr = *(extra) & 0x0F; psa.psa_quality_thr = *(extra) & 0x0F;
psa_write(dev, psa_write(dev,
...@@ -2634,7 +2606,7 @@ static int wavelan_set_qthr(struct net_device *dev, ...@@ -2634,7 +2606,7 @@ static int wavelan_set_qthr(struct net_device *dev,
psa.psa_quality_thr); psa.psa_quality_thr);
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return 0; return 0;
} }
...@@ -2653,7 +2625,7 @@ static int wavelan_get_qthr(struct net_device *dev, ...@@ -2653,7 +2625,7 @@ static int wavelan_get_qthr(struct net_device *dev,
unsigned long flags; unsigned long flags;
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
psa_read(dev, psa_read(dev,
(char *) &psa.psa_quality_thr - (char *) &psa, (char *) &psa.psa_quality_thr - (char *) &psa,
...@@ -2661,7 +2633,7 @@ static int wavelan_get_qthr(struct net_device *dev, ...@@ -2661,7 +2633,7 @@ static int wavelan_get_qthr(struct net_device *dev,
*(extra) = psa.psa_quality_thr & 0x0F; *(extra) = psa.psa_quality_thr & 0x0F;
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return 0; return 0;
} }
...@@ -2680,7 +2652,7 @@ static int wavelan_set_roam(struct net_device *dev, ...@@ -2680,7 +2652,7 @@ static int wavelan_set_roam(struct net_device *dev,
unsigned long flags; unsigned long flags;
/* Disable interrupts and save flags. */ /* Disable interrupts and save flags. */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Note : should check if user == root */ /* Note : should check if user == root */
if(do_roaming && (*extra)==0) if(do_roaming && (*extra)==0)
...@@ -2691,7 +2663,7 @@ static int wavelan_set_roam(struct net_device *dev, ...@@ -2691,7 +2663,7 @@ static int wavelan_set_roam(struct net_device *dev,
do_roaming = (*extra); do_roaming = (*extra);
/* Enable interrupts and restore flags. */ /* Enable interrupts and restore flags. */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
return 0; return 0;
} }
...@@ -3221,7 +3193,7 @@ wavelan_get_wireless_stats(device * dev) ...@@ -3221,7 +3193,7 @@ wavelan_get_wireless_stats(device * dev)
#endif #endif
/* Disable interrupts & save flags */ /* Disable interrupts & save flags */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
wstats = &lp->wstats; wstats = &lp->wstats;
...@@ -3247,7 +3219,7 @@ wavelan_get_wireless_stats(device * dev) ...@@ -3247,7 +3219,7 @@ wavelan_get_wireless_stats(device * dev)
wstats->discard.misc = 0L; wstats->discard.misc = 0L;
/* ReEnable interrupts & restore flags */ /* ReEnable interrupts & restore flags */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
#ifdef DEBUG_IOCTL_TRACE #ifdef DEBUG_IOCTL_TRACE
printk(KERN_DEBUG "%s: <-wavelan_get_wireless_stats()\n", dev->name); printk(KERN_DEBUG "%s: <-wavelan_get_wireless_stats()\n", dev->name);
...@@ -3583,7 +3555,7 @@ wv_packet_write(device * dev, ...@@ -3583,7 +3555,7 @@ wv_packet_write(device * dev,
printk(KERN_DEBUG "%s: ->wv_packet_write(%d)\n", dev->name, length); printk(KERN_DEBUG "%s: ->wv_packet_write(%d)\n", dev->name, length);
#endif #endif
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Check if we need some padding */ /* Check if we need some padding */
if(clen < ETH_ZLEN) if(clen < ETH_ZLEN)
...@@ -3613,7 +3585,7 @@ wv_packet_write(device * dev, ...@@ -3613,7 +3585,7 @@ wv_packet_write(device * dev,
/* Keep stats up to date */ /* Keep stats up to date */
lp->stats.tx_bytes += length; lp->stats.tx_bytes += length;
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
#ifdef DEBUG_TX_INFO #ifdef DEBUG_TX_INFO
wv_packet_info((u_char *) buf, length, dev->name, "wv_packet_write"); wv_packet_info((u_char *) buf, length, dev->name, "wv_packet_write");
...@@ -3653,9 +3625,9 @@ wavelan_packet_xmit(struct sk_buff * skb, ...@@ -3653,9 +3625,9 @@ wavelan_packet_xmit(struct sk_buff * skb,
* we can do it now */ * we can do it now */
if(lp->reconfig_82593) if(lp->reconfig_82593)
{ {
wv_splhi(lp, &flags); /* Disable interrupts */ spin_lock_irqsave(&lp->spinlock, flags); /* Disable interrupts */
wv_82593_config(dev); wv_82593_config(dev);
wv_splx(lp, &flags); /* Re-enable interrupts */ spin_unlock_irqrestore(&lp->spinlock, flags); /* Re-enable interrupts */
/* Note : the configure procedure was totally synchronous, /* Note : the configure procedure was totally synchronous,
* so the Tx buffer is now free */ * so the Tx buffer is now free */
} }
...@@ -3892,7 +3864,7 @@ wv_ru_stop(device * dev) ...@@ -3892,7 +3864,7 @@ wv_ru_stop(device * dev)
printk(KERN_DEBUG "%s: ->wv_ru_stop()\n", dev->name); printk(KERN_DEBUG "%s: ->wv_ru_stop()\n", dev->name);
#endif #endif
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* First, send the LAN controller a stop receive command */ /* First, send the LAN controller a stop receive command */
wv_82593_cmd(dev, "wv_graceful_shutdown(): stop-rcv", wv_82593_cmd(dev, "wv_graceful_shutdown(): stop-rcv",
...@@ -3917,7 +3889,7 @@ wv_ru_stop(device * dev) ...@@ -3917,7 +3889,7 @@ wv_ru_stop(device * dev)
} }
while(((status & SR3_EXEC_STATE_MASK) != SR3_EXEC_IDLE) && (spin-- > 0)); while(((status & SR3_EXEC_STATE_MASK) != SR3_EXEC_IDLE) && (spin-- > 0));
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
/* If there was a problem */ /* If there was a problem */
if(spin <= 0) if(spin <= 0)
...@@ -3961,7 +3933,7 @@ wv_ru_start(device * dev) ...@@ -3961,7 +3933,7 @@ wv_ru_start(device * dev)
if(!wv_ru_stop(dev)) if(!wv_ru_stop(dev))
return FALSE; return FALSE;
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Now we know that no command is being executed. */ /* Now we know that no command is being executed. */
...@@ -4016,7 +3988,7 @@ wv_ru_start(device * dev) ...@@ -4016,7 +3988,7 @@ wv_ru_start(device * dev)
} }
#endif #endif
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
#ifdef DEBUG_CONFIG_TRACE #ifdef DEBUG_CONFIG_TRACE
printk(KERN_DEBUG "%s: <-wv_ru_start()\n", dev->name); printk(KERN_DEBUG "%s: <-wv_ru_start()\n", dev->name);
...@@ -4292,7 +4264,7 @@ wv_hw_config(device * dev) ...@@ -4292,7 +4264,7 @@ wv_hw_config(device * dev)
return FALSE; return FALSE;
/* Disable interrupts */ /* Disable interrupts */
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Disguised goto ;-) */ /* Disguised goto ;-) */
do do
...@@ -4357,7 +4329,7 @@ wv_hw_config(device * dev) ...@@ -4357,7 +4329,7 @@ wv_hw_config(device * dev)
while(0); while(0);
/* Re-enable interrupts */ /* Re-enable interrupts */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
#ifdef DEBUG_CONFIG_TRACE #ifdef DEBUG_CONFIG_TRACE
printk(KERN_DEBUG "%s: <-wv_hw_config()\n", dev->name); printk(KERN_DEBUG "%s: <-wv_hw_config()\n", dev->name);
...@@ -4683,7 +4655,7 @@ wavelan_interrupt(int irq, ...@@ -4683,7 +4655,7 @@ wavelan_interrupt(int irq,
/* Prevent reentrancy. We need to do that because we may have /* Prevent reentrancy. We need to do that because we may have
* multiple interrupt handler running concurently. * multiple interrupt handler running concurently.
* It is safe because wv_splhi() disable interrupts before aquiring * It is safe because interrupts are disabled before aquiring
* the spinlock. */ * the spinlock. */
spin_lock(&lp->spinlock); spin_lock(&lp->spinlock);
...@@ -4916,7 +4888,7 @@ wavelan_watchdog(device * dev) ...@@ -4916,7 +4888,7 @@ wavelan_watchdog(device * dev)
dev->name); dev->name);
#endif #endif
wv_splhi(lp, &flags); spin_lock_irqsave(&lp->spinlock, flags);
/* Ask to abort the current command */ /* Ask to abort the current command */
outb(OP0_ABORT, LCCR(base)); outb(OP0_ABORT, LCCR(base));
...@@ -4927,7 +4899,7 @@ wavelan_watchdog(device * dev) ...@@ -4927,7 +4899,7 @@ wavelan_watchdog(device * dev)
aborted = TRUE; aborted = TRUE;
/* Release spinlock here so that wv_hw_reset() can grab it */ /* Release spinlock here so that wv_hw_reset() can grab it */
wv_splx(lp, &flags); spin_unlock_irqrestore(&lp->spinlock, flags);
/* Check if we were successful in aborting it */ /* Check if we were successful in aborting it */
if(!aborted) if(!aborted)
......
...@@ -680,12 +680,6 @@ void wv_roam_cleanup(struct net_device *dev); ...@@ -680,12 +680,6 @@ void wv_roam_cleanup(struct net_device *dev);
#endif /* WAVELAN_ROAMING */ #endif /* WAVELAN_ROAMING */
/* ----------------------- MISC SUBROUTINES ------------------------ */ /* ----------------------- MISC SUBROUTINES ------------------------ */
static inline void
wv_splhi(net_local *, /* Disable interrupts */
unsigned long *); /* flags */
static inline void
wv_splx(net_local *, /* ReEnable interrupts */
unsigned long *); /* flags */
static void static void
cs_error(client_handle_t, /* Report error to cardmgr */ cs_error(client_handle_t, /* Report error to cardmgr */
int, int,
......
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