Skip to content

Commit 1fee35d

Browse files
committed
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 <[email protected]>
1 parent 98d22b0 commit 1fee35d

File tree

1 file changed

+6
-6
lines changed
  • drivers/net/wireless/intel/iwlwifi

1 file changed

+6
-6
lines changed

drivers/net/wireless/intel/iwlwifi/iwl-io.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,38 +112,38 @@ int iwl_dump_fh(struct iwl_trans *trans, char **buf);
112112
*/
113113
static inline u32 iwl_umac_prph(struct iwl_trans *trans, u32 ofs)
114114
{
115-
return ofs + trans->cfg->trans.umac_prph_offset;
115+
return ofs + trans->trans_cfg->umac_prph_offset;
116116
}
117117

118118
static inline u32 iwl_read_umac_prph_no_grab(struct iwl_trans *trans, u32 ofs)
119119
{
120120
return iwl_read_prph_no_grab(trans, ofs +
121-
trans->cfg->trans.umac_prph_offset);
121+
trans->trans_cfg->umac_prph_offset);
122122
}
123123

124124
static inline u32 iwl_read_umac_prph(struct iwl_trans *trans, u32 ofs)
125125
{
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);
127127
}
128128

129129
static inline void iwl_write_umac_prph_no_grab(struct iwl_trans *trans, u32 ofs,
130130
u32 val)
131131
{
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,
133133
val);
134134
}
135135

136136
static inline void iwl_write_umac_prph(struct iwl_trans *trans, u32 ofs,
137137
u32 val)
138138
{
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);
140140
}
141141

142142
static inline int iwl_poll_umac_prph_bit(struct iwl_trans *trans, u32 addr,
143143
u32 bits, u32 mask, int timeout)
144144
{
145145
return iwl_poll_prph_bit(trans, addr +
146-
trans->cfg->trans.umac_prph_offset,
146+
trans->trans_cfg->umac_prph_offset,
147147
bits, mask, timeout);
148148
}
149149

0 commit comments

Comments
 (0)