File tree Expand file tree Collapse file tree 5 files changed +19
-5
lines changed
drivers/net/wireless/intel/iwlwifi Expand file tree Collapse file tree 5 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -816,3 +816,9 @@ bool iwl_trans_is_pm_supported(struct iwl_trans *trans)
816816 return iwl_pcie_gen1_is_pm_supported (trans );
817817}
818818IWL_EXPORT_SYMBOL (iwl_trans_is_pm_supported );
819+
820+ bool iwl_trans_is_ltr_enabled (struct iwl_trans * trans )
821+ {
822+ return iwl_pcie_gen1_2_is_ltr_enabled (trans );
823+ }
824+ IWL_EXPORT_SYMBOL (iwl_trans_is_ltr_enabled );
Original file line number Diff line number Diff line change @@ -844,7 +844,6 @@ struct iwl_trans_info {
844844 * @dev: pointer to struct device * that represents the device
845845 * @info: device information for use by other layers
846846 * @pnvm_loaded: indicates PNVM was loaded
847- * @ltr_enabled: set to true if the LTR is enabled
848847 * @suppress_cmd_error_once: suppress "FW error in SYNC CMD" once,
849848 * e.g. for testing
850849 * @fail_to_parse_pnvm_image: set to true if pnvm parsing failed
@@ -883,7 +882,6 @@ struct iwl_trans {
883882 bool step_urm ;
884883 bool suppress_cmd_error_once ;
885884
886- bool ltr_enabled ;
887885 u8 pnvm_loaded :1 ;
888886 u8 fail_to_parse_pnvm_image :1 ;
889887 u8 reduce_power_loaded :1 ;
@@ -1262,4 +1260,6 @@ static inline u16 iwl_trans_get_device_id(struct iwl_trans *trans)
12621260
12631261bool iwl_trans_is_pm_supported (struct iwl_trans * trans );
12641262
1263+ bool iwl_trans_is_ltr_enabled (struct iwl_trans * trans );
1264+
12651265#endif /* __iwl_trans_h__ */
Original file line number Diff line number Diff line change @@ -837,7 +837,7 @@ static int iwl_mvm_config_ltr(struct iwl_mvm *mvm)
837837 .flags = cpu_to_le32 (LTR_CFG_FLAG_FEATURE_ENABLE ),
838838 };
839839
840- if (!mvm -> trans -> ltr_enabled )
840+ if (!iwl_trans_is_ltr_enabled ( mvm -> trans ) )
841841 return 0 ;
842842
843843 return iwl_mvm_send_cmd_pdu (mvm , LTR_CONFIG , 0 ,
Original file line number Diff line number Diff line change @@ -404,6 +404,7 @@ struct iwl_pcie_txqs {
404404 * The user should use iwl_trans_{alloc,free}_tx_cmd.
405405 * @dev_cmd_pool_name: name for the TX command allocation pool
406406 * @pm_support: set to true in start_hw if link pm is supported
407+ * @ltr_enabled: set to true if the LTR is enabled
407408 */
408409struct iwl_trans_pcie {
409410 struct iwl_rxq * rxq ;
@@ -515,6 +516,7 @@ struct iwl_trans_pcie {
515516 char dev_cmd_pool_name [50 ];
516517
517518 bool pm_support ;
519+ bool ltr_enabled ;
518520};
519521
520522static inline struct iwl_trans_pcie *
@@ -1161,4 +1163,10 @@ static inline bool iwl_pcie_gen1_is_pm_supported(struct iwl_trans *trans)
11611163 return trans_pcie -> pm_support ;
11621164}
11631165
1166+ static inline bool iwl_pcie_gen1_2_is_ltr_enabled (struct iwl_trans * trans )
1167+ {
1168+ struct iwl_trans_pcie * trans_pcie = IWL_TRANS_GET_PCIE_TRANS (trans );
1169+
1170+ return trans_pcie -> ltr_enabled ;
1171+ }
11641172#endif /* __iwl_trans_int_pcie_h__ */
Original file line number Diff line number Diff line change @@ -217,10 +217,10 @@ void iwl_pcie_apm_config(struct iwl_trans *trans)
217217 trans_pcie -> pm_support = !(lctl & PCI_EXP_LNKCTL_ASPM_L0S );
218218
219219 pcie_capability_read_word (trans_pcie -> pci_dev , PCI_EXP_DEVCTL2 , & cap );
220- trans -> ltr_enabled = cap & PCI_EXP_DEVCTL2_LTR_EN ;
220+ trans_pcie -> ltr_enabled = cap & PCI_EXP_DEVCTL2_LTR_EN ;
221221 IWL_DEBUG_POWER (trans , "L1 %sabled - LTR %sabled\n" ,
222222 (lctl & PCI_EXP_LNKCTL_ASPM_L1 ) ? "En" : "Dis" ,
223- trans -> ltr_enabled ? "En" : "Dis" );
223+ trans_pcie -> ltr_enabled ? "En" : "Dis" );
224224}
225225
226226/*
You can’t perform that action at this time.
0 commit comments