aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
diff options
context:
space:
mode:
authorAbhijeet Kolekar <abhijeet.kolekar@intel.com>2009-02-18 18:54:31 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-27 14:52:46 -0500
commitf17d08a657ee0713390ccf9a0b0ebf4f80495161 (patch)
treee9df76c9c5705826af69c287a4289bc804477ae0 /drivers/net/wireless/iwlwifi/iwl3945-base.c
parented3b932e014eb54e8d9b0d7b9d8861f653185d04 (diff)
iwl3945: use iwl_isr
iwl3945 uses iwl_isr and deletes duplicated iwl3945_isr. Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Acked-by: Samuel Ortiz <samuel.ortiz@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c59
1 files changed, 1 insertions, 58 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 0de768755f91..68cd2e7b6a7c 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -2325,63 +2325,6 @@ static void iwl3945_irq_tasklet(struct iwl_priv *priv)
2325 spin_unlock_irqrestore(&priv->lock, flags); 2325 spin_unlock_irqrestore(&priv->lock, flags);
2326} 2326}
2327 2327
2328static irqreturn_t iwl3945_isr(int irq, void *data)
2329{
2330 struct iwl_priv *priv = data;
2331 u32 inta, inta_mask;
2332 u32 inta_fh;
2333 if (!priv)
2334 return IRQ_NONE;
2335
2336 spin_lock(&priv->lock);
2337
2338 /* Disable (but don't clear!) interrupts here to avoid
2339 * back-to-back ISRs and sporadic interrupts from our NIC.
2340 * If we have something to service, the tasklet will re-enable ints.
2341 * If we *don't* have something, we'll re-enable before leaving here. */
2342 inta_mask = iwl_read32(priv, CSR_INT_MASK); /* just for debug */
2343 iwl_write32(priv, CSR_INT_MASK, 0x00000000);
2344
2345 /* Discover which interrupts are active/pending */
2346 inta = iwl_read32(priv, CSR_INT);
2347 inta_fh = iwl_read32(priv, CSR_FH_INT_STATUS);
2348
2349 /* Ignore interrupt if there's nothing in NIC to service.
2350 * This may be due to IRQ shared with another device,
2351 * or due to sporadic interrupts thrown from our NIC. */
2352 if (!inta && !inta_fh) {
2353 IWL_DEBUG_ISR(priv, "Ignore interrupt, inta == 0, inta_fh == 0\n");
2354 goto none;
2355 }
2356
2357 if ((inta == 0xFFFFFFFF) || ((inta & 0xFFFFFFF0) == 0xa5a5a5a0)) {
2358 /* Hardware disappeared */
2359 IWL_WARN(priv, "HARDWARE GONE?? INTA == 0x%08x\n", inta);
2360 goto unplugged;
2361 }
2362
2363 IWL_DEBUG_ISR(priv, "ISR inta 0x%08x, enabled 0x%08x, fh 0x%08x\n",
2364 inta, inta_mask, inta_fh);
2365
2366 inta &= ~CSR_INT_BIT_SCD;
2367
2368 /* iwl3945_irq_tasklet() will service interrupts and re-enable them */
2369 if (likely(inta || inta_fh))
2370 tasklet_schedule(&priv->irq_tasklet);
2371unplugged:
2372 spin_unlock(&priv->lock);
2373
2374 return IRQ_HANDLED;
2375
2376 none:
2377 /* re-enable interrupts here since we don't have anything to service. */
2378 /* only Re-enable if disabled by irq */
2379 if (test_bit(STATUS_INT_ENABLED, &priv->status))
2380 iwl_enable_interrupts(priv);
2381 spin_unlock(&priv->lock);
2382 return IRQ_NONE;
2383}
2384
2385static int iwl3945_get_channels_for_scan(struct iwl_priv *priv, 2328static int iwl3945_get_channels_for_scan(struct iwl_priv *priv,
2386 enum ieee80211_band band, 2329 enum ieee80211_band band,
2387 u8 is_active, u8 n_probes, 2330 u8 is_active, u8 n_probes,
@@ -5235,7 +5178,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
5235 5178
5236 pci_enable_msi(priv->pci_dev); 5179 pci_enable_msi(priv->pci_dev);
5237 5180
5238 err = request_irq(priv->pci_dev->irq, iwl3945_isr, IRQF_SHARED, 5181 err = request_irq(priv->pci_dev->irq, iwl_isr, IRQF_SHARED,
5239 DRV_NAME, priv); 5182 DRV_NAME, priv);
5240 if (err) { 5183 if (err) {
5241 IWL_ERR(priv, "Error allocating IRQ %d\n", priv->pci_dev->irq); 5184 IWL_ERR(priv, "Error allocating IRQ %d\n", priv->pci_dev->irq);