aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2400pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2400pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2400pci.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index 9016c00f2946..80f4988adf80 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -1317,27 +1317,25 @@ static void rt2400pci_txdone(struct rt2x00_dev *rt2x00dev,
1317static void rt2400pci_enable_interrupt(struct rt2x00_dev *rt2x00dev, 1317static void rt2400pci_enable_interrupt(struct rt2x00_dev *rt2x00dev,
1318 struct rt2x00_field32 irq_field) 1318 struct rt2x00_field32 irq_field)
1319{ 1319{
1320 unsigned long flags;
1321 u32 reg; 1320 u32 reg;
1322 1321
1323 /* 1322 /*
1324 * Enable a single interrupt. The interrupt mask register 1323 * Enable a single interrupt. The interrupt mask register
1325 * access needs locking. 1324 * access needs locking.
1326 */ 1325 */
1327 spin_lock_irqsave(&rt2x00dev->irqmask_lock, flags); 1326 spin_lock_irq(&rt2x00dev->irqmask_lock);
1328 1327
1329 rt2x00pci_register_read(rt2x00dev, CSR8, &reg); 1328 rt2x00pci_register_read(rt2x00dev, CSR8, &reg);
1330 rt2x00_set_field32(&reg, irq_field, 0); 1329 rt2x00_set_field32(&reg, irq_field, 0);
1331 rt2x00pci_register_write(rt2x00dev, CSR8, reg); 1330 rt2x00pci_register_write(rt2x00dev, CSR8, reg);
1332 1331
1333 spin_unlock_irqrestore(&rt2x00dev->irqmask_lock, flags); 1332 spin_unlock_irq(&rt2x00dev->irqmask_lock);
1334} 1333}
1335 1334
1336static void rt2400pci_txstatus_tasklet(unsigned long data) 1335static void rt2400pci_txstatus_tasklet(unsigned long data)
1337{ 1336{
1338 struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data; 1337 struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data;
1339 u32 reg; 1338 u32 reg;
1340 unsigned long flags;
1341 1339
1342 /* 1340 /*
1343 * Handle all tx queues. 1341 * Handle all tx queues.
@@ -1349,7 +1347,7 @@ static void rt2400pci_txstatus_tasklet(unsigned long data)
1349 /* 1347 /*
1350 * Enable all TXDONE interrupts again. 1348 * Enable all TXDONE interrupts again.
1351 */ 1349 */
1352 spin_lock_irqsave(&rt2x00dev->irqmask_lock, flags); 1350 spin_lock_irq(&rt2x00dev->irqmask_lock);
1353 1351
1354 rt2x00pci_register_read(rt2x00dev, CSR8, &reg); 1352 rt2x00pci_register_read(rt2x00dev, CSR8, &reg);
1355 rt2x00_set_field32(&reg, CSR8_TXDONE_TXRING, 0); 1353 rt2x00_set_field32(&reg, CSR8_TXDONE_TXRING, 0);
@@ -1357,7 +1355,7 @@ static void rt2400pci_txstatus_tasklet(unsigned long data)
1357 rt2x00_set_field32(&reg, CSR8_TXDONE_PRIORING, 0); 1355 rt2x00_set_field32(&reg, CSR8_TXDONE_PRIORING, 0);
1358 rt2x00pci_register_write(rt2x00dev, CSR8, reg); 1356 rt2x00pci_register_write(rt2x00dev, CSR8, reg);
1359 1357
1360 spin_unlock_irqrestore(&rt2x00dev->irqmask_lock, flags); 1358 spin_unlock_irq(&rt2x00dev->irqmask_lock);
1361} 1359}
1362 1360
1363static void rt2400pci_tbtt_tasklet(unsigned long data) 1361static void rt2400pci_tbtt_tasklet(unsigned long data)
@@ -1378,7 +1376,6 @@ static irqreturn_t rt2400pci_interrupt(int irq, void *dev_instance)
1378{ 1376{
1379 struct rt2x00_dev *rt2x00dev = dev_instance; 1377 struct rt2x00_dev *rt2x00dev = dev_instance;
1380 u32 reg, mask; 1378 u32 reg, mask;
1381 unsigned long flags;
1382 1379
1383 /* 1380 /*
1384 * Get the interrupt sources & saved to local variable. 1381 * Get the interrupt sources & saved to local variable.
@@ -1420,13 +1417,13 @@ static irqreturn_t rt2400pci_interrupt(int irq, void *dev_instance)
1420 * Disable all interrupts for which a tasklet was scheduled right now, 1417 * Disable all interrupts for which a tasklet was scheduled right now,
1421 * the tasklet will reenable the appropriate interrupts. 1418 * the tasklet will reenable the appropriate interrupts.
1422 */ 1419 */
1423 spin_lock_irqsave(&rt2x00dev->irqmask_lock, flags); 1420 spin_lock(&rt2x00dev->irqmask_lock);
1424 1421
1425 rt2x00pci_register_read(rt2x00dev, CSR8, &reg); 1422 rt2x00pci_register_read(rt2x00dev, CSR8, &reg);
1426 reg |= mask; 1423 reg |= mask;
1427 rt2x00pci_register_write(rt2x00dev, CSR8, reg); 1424 rt2x00pci_register_write(rt2x00dev, CSR8, reg);
1428 1425
1429 spin_unlock_irqrestore(&rt2x00dev->irqmask_lock, flags); 1426 spin_unlock(&rt2x00dev->irqmask_lock);
1430 1427
1431 1428
1432 1429