diff options
author | Luca Coelho <luciano.coelho@intel.com> | 2019-08-08 06:52:50 -0400 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2019-10-09 06:01:03 -0400 |
commit | 1fee35d04a42290a3c44b8a4e3c66dbdd6180c42 (patch) | |
tree | 760d1e9eaa28e4596b609bd2e299318ed03a9436 /drivers/net/wireless | |
parent | 98d22b01f9f6f85eb8870290006241b316829fd3 (diff) |
iwlwifi: don't access trans_cfg via cfg
We copy cfg->trans to trans->trans_cfg at the very beginning, so don't
try to access it via cfg->trans anymore, because the cfg may be unset
in later cases.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/iwl-io.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-io.h b/drivers/net/wireless/intel/iwlwifi/iwl-io.h index f8e4f0f5de0c..f09e368c7040 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-io.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-io.h | |||
@@ -112,38 +112,38 @@ int iwl_dump_fh(struct iwl_trans *trans, char **buf); | |||
112 | */ | 112 | */ |
113 | static inline u32 iwl_umac_prph(struct iwl_trans *trans, u32 ofs) | 113 | static inline u32 iwl_umac_prph(struct iwl_trans *trans, u32 ofs) |
114 | { | 114 | { |
115 | return ofs + trans->cfg->trans.umac_prph_offset; | 115 | return ofs + trans->trans_cfg->umac_prph_offset; |
116 | } | 116 | } |
117 | 117 | ||
118 | static inline u32 iwl_read_umac_prph_no_grab(struct iwl_trans *trans, u32 ofs) | 118 | static inline u32 iwl_read_umac_prph_no_grab(struct iwl_trans *trans, u32 ofs) |
119 | { | 119 | { |
120 | return iwl_read_prph_no_grab(trans, ofs + | 120 | return iwl_read_prph_no_grab(trans, ofs + |
121 | trans->cfg->trans.umac_prph_offset); | 121 | trans->trans_cfg->umac_prph_offset); |
122 | } | 122 | } |
123 | 123 | ||
124 | static inline u32 iwl_read_umac_prph(struct iwl_trans *trans, u32 ofs) | 124 | static inline u32 iwl_read_umac_prph(struct iwl_trans *trans, u32 ofs) |
125 | { | 125 | { |
126 | return iwl_read_prph(trans, ofs + trans->cfg->trans.umac_prph_offset); | 126 | return iwl_read_prph(trans, ofs + trans->trans_cfg->umac_prph_offset); |
127 | } | 127 | } |
128 | 128 | ||
129 | static inline void iwl_write_umac_prph_no_grab(struct iwl_trans *trans, u32 ofs, | 129 | static inline void iwl_write_umac_prph_no_grab(struct iwl_trans *trans, u32 ofs, |
130 | u32 val) | 130 | u32 val) |
131 | { | 131 | { |
132 | iwl_write_prph_no_grab(trans, ofs + trans->cfg->trans.umac_prph_offset, | 132 | iwl_write_prph_no_grab(trans, ofs + trans->trans_cfg->umac_prph_offset, |
133 | val); | 133 | val); |
134 | } | 134 | } |
135 | 135 | ||
136 | static inline void iwl_write_umac_prph(struct iwl_trans *trans, u32 ofs, | 136 | static inline void iwl_write_umac_prph(struct iwl_trans *trans, u32 ofs, |
137 | u32 val) | 137 | u32 val) |
138 | { | 138 | { |
139 | iwl_write_prph(trans, ofs + trans->cfg->trans.umac_prph_offset, val); | 139 | iwl_write_prph(trans, ofs + trans->trans_cfg->umac_prph_offset, val); |
140 | } | 140 | } |
141 | 141 | ||
142 | static inline int iwl_poll_umac_prph_bit(struct iwl_trans *trans, u32 addr, | 142 | static inline int iwl_poll_umac_prph_bit(struct iwl_trans *trans, u32 addr, |
143 | u32 bits, u32 mask, int timeout) | 143 | u32 bits, u32 mask, int timeout) |
144 | { | 144 | { |
145 | return iwl_poll_prph_bit(trans, addr + | 145 | return iwl_poll_prph_bit(trans, addr + |
146 | trans->cfg->trans.umac_prph_offset, | 146 | trans->trans_cfg->umac_prph_offset, |
147 | bits, mask, timeout); | 147 | bits, mask, timeout); |
148 | } | 148 | } |
149 | 149 | ||