Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351841
b: refs/heads/master
c: 659c478
h: refs/heads/master
i:
  351839: 773f441
v: v3
  • Loading branch information
Avinash Patil authored and John W. Linville committed Jan 7, 2013
1 parent 892317a commit 51aeb3b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6ba1eafed183c6e0886d3483c8acac4efe1e95db
refs/heads/master: 659c4788611f725ede2def6e4db5d8d4a59b93b5
25 changes: 12 additions & 13 deletions trunk/drivers/net/wireless/mwifiex/pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -1594,39 +1594,40 @@ static irqreturn_t mwifiex_pcie_interrupt(int irq, void *context)
static int mwifiex_process_int_status(struct mwifiex_adapter *adapter)
{
int ret;
u32 pcie_ireg = 0;
u32 pcie_ireg;
unsigned long flags;

spin_lock_irqsave(&adapter->int_lock, flags);
/* Clear out unused interrupts */
adapter->int_status &= HOST_INTR_MASK;
pcie_ireg = adapter->int_status;
adapter->int_status = 0;
spin_unlock_irqrestore(&adapter->int_lock, flags);

while (adapter->int_status & HOST_INTR_MASK) {
if (adapter->int_status & HOST_INTR_DNLD_DONE) {
adapter->int_status &= ~HOST_INTR_DNLD_DONE;
while (pcie_ireg & HOST_INTR_MASK) {
if (pcie_ireg & HOST_INTR_DNLD_DONE) {
pcie_ireg &= ~HOST_INTR_DNLD_DONE;
if (adapter->data_sent) {
dev_dbg(adapter->dev, "info: DATA sent intr\n");
adapter->data_sent = false;
}
}
if (adapter->int_status & HOST_INTR_UPLD_RDY) {
adapter->int_status &= ~HOST_INTR_UPLD_RDY;
if (pcie_ireg & HOST_INTR_UPLD_RDY) {
pcie_ireg &= ~HOST_INTR_UPLD_RDY;
dev_dbg(adapter->dev, "info: Rx DATA\n");
ret = mwifiex_pcie_process_recv_data(adapter);
if (ret)
return ret;
}
if (adapter->int_status & HOST_INTR_EVENT_RDY) {
adapter->int_status &= ~HOST_INTR_EVENT_RDY;
if (pcie_ireg & HOST_INTR_EVENT_RDY) {
pcie_ireg &= ~HOST_INTR_EVENT_RDY;
dev_dbg(adapter->dev, "info: Rx EVENT\n");
ret = mwifiex_pcie_process_event_ready(adapter);
if (ret)
return ret;
}

if (adapter->int_status & HOST_INTR_CMD_DONE) {
adapter->int_status &= ~HOST_INTR_CMD_DONE;
if (pcie_ireg & HOST_INTR_CMD_DONE) {
pcie_ireg &= ~HOST_INTR_CMD_DONE;
if (adapter->cmd_sent) {
dev_dbg(adapter->dev,
"info: CMD sent Interrupt\n");
Expand Down Expand Up @@ -1654,8 +1655,6 @@ static int mwifiex_process_int_status(struct mwifiex_adapter *adapter)
"Write register failed\n");
return -1;
}
adapter->int_status |= pcie_ireg;
adapter->int_status &= HOST_INTR_MASK;
}

}
Expand Down

0 comments on commit 51aeb3b

Please sign in to comment.