diff options
Diffstat (limited to 'drivers/net/wireless/mwl8k.c')
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 5aa80420c0d1..cc0aa80ca877 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -411,7 +411,6 @@ mwl8k_send_fw_load_cmd(struct mwl8k_priv *priv, void *data, int length) | |||
411 | { | 411 | { |
412 | void __iomem *regs = priv->regs; | 412 | void __iomem *regs = priv->regs; |
413 | dma_addr_t dma_addr; | 413 | dma_addr_t dma_addr; |
414 | int rc; | ||
415 | int loops; | 414 | int loops; |
416 | 415 | ||
417 | dma_addr = pci_map_single(priv->pdev, data, length, PCI_DMA_TODEVICE); | 416 | dma_addr = pci_map_single(priv->pdev, data, length, PCI_DMA_TODEVICE); |
@@ -425,7 +424,6 @@ mwl8k_send_fw_load_cmd(struct mwl8k_priv *priv, void *data, int length) | |||
425 | iowrite32(MWL8K_H2A_INT_DUMMY, | 424 | iowrite32(MWL8K_H2A_INT_DUMMY, |
426 | regs + MWL8K_HIU_H2A_INTERRUPT_EVENTS); | 425 | regs + MWL8K_HIU_H2A_INTERRUPT_EVENTS); |
427 | 426 | ||
428 | rc = -ETIMEDOUT; | ||
429 | loops = 1000; | 427 | loops = 1000; |
430 | do { | 428 | do { |
431 | u32 int_code; | 429 | u32 int_code; |
@@ -433,7 +431,6 @@ mwl8k_send_fw_load_cmd(struct mwl8k_priv *priv, void *data, int length) | |||
433 | int_code = ioread32(regs + MWL8K_HIU_INT_CODE); | 431 | int_code = ioread32(regs + MWL8K_HIU_INT_CODE); |
434 | if (int_code == MWL8K_INT_CODE_CMD_FINISHED) { | 432 | if (int_code == MWL8K_INT_CODE_CMD_FINISHED) { |
435 | iowrite32(0, regs + MWL8K_HIU_INT_CODE); | 433 | iowrite32(0, regs + MWL8K_HIU_INT_CODE); |
436 | rc = 0; | ||
437 | break; | 434 | break; |
438 | } | 435 | } |
439 | 436 | ||
@@ -442,26 +439,7 @@ mwl8k_send_fw_load_cmd(struct mwl8k_priv *priv, void *data, int length) | |||
442 | 439 | ||
443 | pci_unmap_single(priv->pdev, dma_addr, length, PCI_DMA_TODEVICE); | 440 | pci_unmap_single(priv->pdev, dma_addr, length, PCI_DMA_TODEVICE); |
444 | 441 | ||
445 | /* | 442 | return loops ? 0 : -ETIMEDOUT; |
446 | * Clear 'command done' interrupt bit. | ||
447 | */ | ||
448 | loops = 1000; | ||
449 | do { | ||
450 | u32 status; | ||
451 | |||
452 | status = ioread32(priv->regs + | ||
453 | MWL8K_HIU_A2H_INTERRUPT_STATUS); | ||
454 | if (status & MWL8K_A2H_INT_OPC_DONE) { | ||
455 | iowrite32(~MWL8K_A2H_INT_OPC_DONE, | ||
456 | priv->regs + MWL8K_HIU_A2H_INTERRUPT_STATUS); | ||
457 | ioread32(priv->regs + MWL8K_HIU_A2H_INTERRUPT_STATUS); | ||
458 | break; | ||
459 | } | ||
460 | |||
461 | udelay(1); | ||
462 | } while (--loops); | ||
463 | |||
464 | return rc; | ||
465 | } | 443 | } |
466 | 444 | ||
467 | static int mwl8k_load_fw_image(struct mwl8k_priv *priv, | 445 | static int mwl8k_load_fw_image(struct mwl8k_priv *priv, |