diff options
| -rw-r--r-- | drivers/net/wireless/mwifiex/pcie.c | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c index 28029b7522c2..7fe7b53fb17a 100644 --- a/drivers/net/wireless/mwifiex/pcie.c +++ b/drivers/net/wireless/mwifiex/pcie.c | |||
| @@ -1531,6 +1531,14 @@ static int mwifiex_pcie_process_cmd_complete(struct mwifiex_adapter *adapter) | |||
| 1531 | if (adapter->ps_state == PS_STATE_SLEEP_CFM) { | 1531 | if (adapter->ps_state == PS_STATE_SLEEP_CFM) { |
| 1532 | mwifiex_process_sleep_confirm_resp(adapter, skb->data, | 1532 | mwifiex_process_sleep_confirm_resp(adapter, skb->data, |
| 1533 | skb->len); | 1533 | skb->len); |
| 1534 | mwifiex_pcie_enable_host_int(adapter); | ||
| 1535 | if (mwifiex_write_reg(adapter, | ||
| 1536 | PCIE_CPU_INT_EVENT, | ||
| 1537 | CPU_INTR_SLEEP_CFM_DONE)) { | ||
| 1538 | dev_warn(adapter->dev, | ||
| 1539 | "Write register failed\n"); | ||
| 1540 | return -1; | ||
| 1541 | } | ||
| 1534 | while (reg->sleep_cookie && (count++ < 10) && | 1542 | while (reg->sleep_cookie && (count++ < 10) && |
| 1535 | mwifiex_pcie_ok_to_access_hw(adapter)) | 1543 | mwifiex_pcie_ok_to_access_hw(adapter)) |
| 1536 | usleep_range(50, 60); | 1544 | usleep_range(50, 60); |
| @@ -1999,23 +2007,9 @@ static void mwifiex_interrupt_status(struct mwifiex_adapter *adapter) | |||
| 1999 | adapter->int_status |= pcie_ireg; | 2007 | adapter->int_status |= pcie_ireg; |
| 2000 | spin_unlock_irqrestore(&adapter->int_lock, flags); | 2008 | spin_unlock_irqrestore(&adapter->int_lock, flags); |
| 2001 | 2009 | ||
| 2002 | if (pcie_ireg & HOST_INTR_CMD_DONE) { | 2010 | if (!adapter->pps_uapsd_mode && |
| 2003 | if ((adapter->ps_state == PS_STATE_SLEEP_CFM) || | 2011 | adapter->ps_state == PS_STATE_SLEEP && |
| 2004 | (adapter->ps_state == PS_STATE_SLEEP)) { | 2012 | mwifiex_pcie_ok_to_access_hw(adapter)) { |
| 2005 | mwifiex_pcie_enable_host_int(adapter); | ||
| 2006 | if (mwifiex_write_reg(adapter, | ||
| 2007 | PCIE_CPU_INT_EVENT, | ||
| 2008 | CPU_INTR_SLEEP_CFM_DONE) | ||
| 2009 | ) { | ||
| 2010 | dev_warn(adapter->dev, | ||
| 2011 | "Write register failed\n"); | ||
| 2012 | return; | ||
| 2013 | |||
| 2014 | } | ||
| 2015 | } | ||
| 2016 | } else if (!adapter->pps_uapsd_mode && | ||
| 2017 | adapter->ps_state == PS_STATE_SLEEP && | ||
| 2018 | mwifiex_pcie_ok_to_access_hw(adapter)) { | ||
| 2019 | /* Potentially for PCIe we could get other | 2013 | /* Potentially for PCIe we could get other |
| 2020 | * interrupts like shared. Don't change power | 2014 | * interrupts like shared. Don't change power |
| 2021 | * state until cookie is set */ | 2015 | * state until cookie is set */ |
