iwlwifi: remove the opmode's d0i3 handlers
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Thu, 6 Jun 2019 08:31:04 +0000 (11:31 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 6 Sep 2019 12:31:16 +0000 (15:31 +0300)
Remove the now unneeded functions that called those from the
transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h
drivers/net/wireless/intel/iwlwifi/pcie/drv.c
drivers/net/wireless/intel/iwlwifi/pcie/internal.h

index f37d6fe..3008a52 100644 (file)
@@ -140,9 +140,6 @@ struct iwl_cfg;
  * @nic_config: configure NIC, called before firmware is started.
  *     May sleep
  * @wimax_active: invoked when WiMax becomes active. May sleep
- * @enter_d0i3: configure the fw to enter d0i3. return 1 to indicate d0i3
- *     entrance is aborted (e.g. due to held reference). May sleep.
- * @exit_d0i3: configure the fw to exit d0i3. May sleep.
  */
 struct iwl_op_mode_ops {
        struct iwl_op_mode *(*start)(struct iwl_trans *trans,
@@ -164,8 +161,6 @@ struct iwl_op_mode_ops {
        void (*cmd_queue_full)(struct iwl_op_mode *op_mode);
        void (*nic_config)(struct iwl_op_mode *op_mode);
        void (*wimax_active)(struct iwl_op_mode *op_mode);
-       int (*enter_d0i3)(struct iwl_op_mode *op_mode);
-       int (*exit_d0i3)(struct iwl_op_mode *op_mode);
 };
 
 int iwl_opmode_register(const char *name, const struct iwl_op_mode_ops *ops);
@@ -258,22 +253,4 @@ static inline void iwl_op_mode_wimax_active(struct iwl_op_mode *op_mode)
        op_mode->ops->wimax_active(op_mode);
 }
 
-static inline int iwl_op_mode_enter_d0i3(struct iwl_op_mode *op_mode)
-{
-       might_sleep();
-
-       if (!op_mode->ops->enter_d0i3)
-               return 0;
-       return op_mode->ops->enter_d0i3(op_mode);
-}
-
-static inline int iwl_op_mode_exit_d0i3(struct iwl_op_mode *op_mode)
-{
-       might_sleep();
-
-       if (!op_mode->ops->exit_d0i3)
-               return 0;
-       return op_mode->ops->exit_d0i3(op_mode);
-}
-
 #endif /* __iwl_op_mode_h__ */
index c11f327..df722ed 100644 (file)
@@ -1171,76 +1171,6 @@ static int iwl_pci_resume(struct device *device)
        return 0;
 }
 
-int iwl_pci_fw_enter_d0i3(struct iwl_trans *trans)
-{
-       struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
-       int ret;
-
-       if (test_bit(STATUS_FW_ERROR, &trans->status))
-               return 0;
-
-       set_bit(STATUS_TRANS_GOING_IDLE, &trans->status);
-
-       /* config the fw */
-       ret = iwl_op_mode_enter_d0i3(trans->op_mode);
-       if (ret == 1) {
-               IWL_DEBUG_RPM(trans, "aborting d0i3 entrance\n");
-               clear_bit(STATUS_TRANS_GOING_IDLE, &trans->status);
-               return -EBUSY;
-       }
-       if (ret)
-               goto err;
-
-       ret = wait_event_timeout(trans_pcie->d0i3_waitq,
-                                test_bit(STATUS_TRANS_IDLE, &trans->status),
-                                msecs_to_jiffies(IWL_TRANS_IDLE_TIMEOUT));
-       if (!ret) {
-               IWL_ERR(trans, "Timeout entering D0i3\n");
-               ret = -ETIMEDOUT;
-               goto err;
-       }
-
-       clear_bit(STATUS_TRANS_GOING_IDLE, &trans->status);
-
-       return 0;
-err:
-       clear_bit(STATUS_TRANS_GOING_IDLE, &trans->status);
-       iwl_trans_fw_error(trans);
-       return ret;
-}
-
-int iwl_pci_fw_exit_d0i3(struct iwl_trans *trans)
-{
-       struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
-       int ret;
-
-       /* sometimes a D0i3 entry is not followed through */
-       if (!test_bit(STATUS_TRANS_IDLE, &trans->status))
-               return 0;
-
-       /* config the fw */
-       ret = iwl_op_mode_exit_d0i3(trans->op_mode);
-       if (ret)
-               goto err;
-
-       /* we clear STATUS_TRANS_IDLE only when D0I3_END command is completed */
-
-       ret = wait_event_timeout(trans_pcie->d0i3_waitq,
-                                !test_bit(STATUS_TRANS_IDLE, &trans->status),
-                                msecs_to_jiffies(IWL_TRANS_IDLE_TIMEOUT));
-       if (!ret) {
-               IWL_ERR(trans, "Timeout exiting D0i3\n");
-               ret = -ETIMEDOUT;
-               goto err;
-       }
-
-       return 0;
-err:
-       clear_bit(STATUS_TRANS_IDLE, &trans->status);
-       iwl_trans_fw_error(trans);
-       return ret;
-}
-
 static const struct dev_pm_ops iwl_dev_pm_ops = {
        SET_SYSTEM_SLEEP_PM_OPS(iwl_pci_suspend,
                                iwl_pci_resume)
index 6bf2a81..b5534fc 100644 (file)
@@ -1059,9 +1059,6 @@ void iwl_trans_pcie_dbgfs_register(struct iwl_trans *trans);
 static inline void iwl_trans_pcie_dbgfs_register(struct iwl_trans *trans) { }
 #endif
 
-int iwl_pci_fw_exit_d0i3(struct iwl_trans *trans);
-int iwl_pci_fw_enter_d0i3(struct iwl_trans *trans);
-
 void iwl_pcie_rx_allocator_work(struct work_struct *data);
 
 /* common functions that are used by gen2 transport */