]> git.karo-electronics.de Git - linux-beck.git/commitdiff
iwlwifi: pcie: re-enable interrupts on resume
authorEliad Peller <eliad@wizery.com>
Thu, 28 May 2015 13:50:12 +0000 (16:50 +0300)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Wed, 3 Jun 2015 06:41:42 +0000 (09:41 +0300)
On resume, all the interrupts are masked (CSR_INT_MASK is 0),
and ict is disabled.

Re-configure them both.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/iwl-trans.h
drivers/net/wireless/iwlwifi/mvm/d3.c
drivers/net/wireless/iwlwifi/pcie/drv.c

index eb34b94faf03b86e685f2623ea83185f8bb62f6c..87a230a7f4b605b8b6db80b69b3db7bc95b59e2f 100644 (file)
@@ -641,6 +641,8 @@ struct iwl_trans {
 
        enum iwl_d0i3_mode d0i3_mode;
 
+       bool wowlan_d0i3;
+
        /* pointer to trans specific struct */
        /*Ensure that this pointer will always be aligned to sizeof pointer */
        char trans_specific[0] __aligned(sizeof(void *));
index 423c519f06bcb19e62cd73b62292dae0c2fae57e..4165d104e4c379dde727f01d585904dec6030deb 100644 (file)
@@ -1170,7 +1170,8 @@ int iwl_mvm_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
        struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
 
        iwl_trans_suspend(mvm->trans);
-       if (wowlan->any) {
+       mvm->trans->wowlan_d0i3 = wowlan->any;
+       if (mvm->trans->wowlan_d0i3) {
                /* 'any' trigger means d0i3 usage */
                if (mvm->trans->d0i3_mode == IWL_D0I3_MODE_ON_SUSPEND) {
                        int ret = iwl_mvm_enter_d0i3_sync(mvm);
index b1856973492237dcbee2ebf640ebeb0bf593fecb..2ed1e4d2774da83f1cd609983c8383c48d37a128 100644 (file)
@@ -6,7 +6,7 @@
  * GPL LICENSE SUMMARY
  *
  * Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved.
- * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
+ * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of version 2 of the GNU General Public License as
@@ -32,7 +32,7 @@
  * BSD LICENSE
  *
  * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
- * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
+ * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -629,7 +629,18 @@ static int iwl_pci_resume(struct device *device)
        if (!trans->op_mode)
                return 0;
 
-       iwl_enable_rfkill_int(trans);
+       /*
+        * On suspend, ict is disabled, and the interrupt mask
+        * gets cleared. Reconfigure them both in case of d0i3
+        * image. Otherwise, only enable rfkill interrupt (in
+        * order to keep track of the rfkill status)
+        */
+       if (trans->wowlan_d0i3) {
+               iwl_pcie_reset_ict(trans);
+               iwl_enable_interrupts(trans);
+       } else {
+               iwl_enable_rfkill_int(trans);
+       }
 
        hw_rfkill = iwl_is_rfkill_set(trans);
        iwl_trans_pcie_rf_kill(trans, hw_rfkill);