Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c381be28 authored by Kenny Hsu's avatar Kenny Hsu Committed by Wey-Yi Guy
Browse files

iwlwifi: update testmode command of direct register access



In order to make sure the testcommand function of direct register
access can be performed even NIC is asleep, replace corresponding
handler iwl_read32 and iwl_write32 by using iwl_direct_read32 and
iwl_direct_write32.

Signed-off-by: default avatarKenny Hsu <kenny.hsu@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
parent d7514012
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -299,7 +299,7 @@ static int iwl_testmode_reg(struct ieee80211_hw *hw, struct nlattr **tb)


	switch (nla_get_u32(tb[IWL_TM_ATTR_COMMAND])) {
	switch (nla_get_u32(tb[IWL_TM_ATTR_COMMAND])) {
	case IWL_TM_CMD_APP2DEV_DIRECT_REG_READ32:
	case IWL_TM_CMD_APP2DEV_DIRECT_REG_READ32:
		val32 = iwl_read32(bus(priv), ofs);
		val32 = iwl_read_direct32(bus(priv), ofs);
		IWL_INFO(priv, "32bit value to read 0x%x\n", val32);
		IWL_INFO(priv, "32bit value to read 0x%x\n", val32);


		skb = cfg80211_testmode_alloc_reply_skb(hw->wiphy, 20);
		skb = cfg80211_testmode_alloc_reply_skb(hw->wiphy, 20);
@@ -321,7 +321,7 @@ static int iwl_testmode_reg(struct ieee80211_hw *hw, struct nlattr **tb)
		} else {
		} else {
			val32 = nla_get_u32(tb[IWL_TM_ATTR_REG_VALUE32]);
			val32 = nla_get_u32(tb[IWL_TM_ATTR_REG_VALUE32]);
			IWL_INFO(priv, "32bit value to write 0x%x\n", val32);
			IWL_INFO(priv, "32bit value to write 0x%x\n", val32);
			iwl_write32(bus(priv), ofs, val32);
			iwl_write_direct32(bus(priv), ofs, val32);
		}
		}
		break;
		break;
	case IWL_TM_CMD_APP2DEV_DIRECT_REG_WRITE8:
	case IWL_TM_CMD_APP2DEV_DIRECT_REG_WRITE8: