提交 01387ffd 编写于 作者: E Emmanuel Grumbach 提交者: Johannes Berg

iwlwifi: allow to zero SRAM

Sending a NULL pointer to iwl_trans_write_mem allows now
to zero SRAM.
Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 b1cf1bc1
...@@ -391,7 +391,8 @@ struct iwl_trans; ...@@ -391,7 +391,8 @@ struct iwl_trans;
* @read_prph: read a DWORD from a periphery register * @read_prph: read a DWORD from a periphery register
* @write_prph: write a DWORD to a periphery register * @write_prph: write a DWORD to a periphery register
* @read_mem: read device's SRAM in DWORD * @read_mem: read device's SRAM in DWORD
* @write_mem: write device's SRAM in DWORD * @write_mem: write device's SRAM in DWORD. If %buf is %NULL, then the memory
* will be zeroed.
* @configure: configure parameters required by the transport layer from * @configure: configure parameters required by the transport layer from
* the op_mode. May be called several times before start_fw, can't be * the op_mode. May be called several times before start_fw, can't be
* called after that. * called after that.
......
...@@ -815,7 +815,8 @@ static int iwl_trans_pcie_write_mem(struct iwl_trans *trans, u32 addr, ...@@ -815,7 +815,8 @@ static int iwl_trans_pcie_write_mem(struct iwl_trans *trans, u32 addr,
if (iwl_trans_grab_nic_access(trans, false)) { if (iwl_trans_grab_nic_access(trans, false)) {
iwl_write32(trans, HBUS_TARG_MEM_WADDR, addr); iwl_write32(trans, HBUS_TARG_MEM_WADDR, addr);
for (offs = 0; offs < dwords; offs++) for (offs = 0; offs < dwords; offs++)
iwl_write32(trans, HBUS_TARG_MEM_WDAT, vals[offs]); iwl_write32(trans, HBUS_TARG_MEM_WDAT,
vals ? vals[offs] : 0);
iwl_trans_release_nic_access(trans); iwl_trans_release_nic_access(trans);
} else { } else {
ret = -EBUSY; ret = -EBUSY;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册