iwlwifi: grap nic access before accessing periphery registers

We need to grap nic access before accessing periphery registers.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by Tomas Winkler and committed by John W. Linville 2d3db679 14652562

+3 -1
+3 -1
drivers/net/wireless/iwlwifi/iwl-5000.c
··· 241 * (PCIe power is lost before PERST# is asserted), 242 * causing ME FW to lose ownership and not being able to obtain it back. 243 */ 244 - iwl_set_bits_mask_prph(priv, APMG_PS_CTRL_REG, 245 APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS, 246 ~APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS); 247 248 spin_unlock_irqrestore(&priv->lock, flags); 249 }
··· 241 * (PCIe power is lost before PERST# is asserted), 242 * causing ME FW to lose ownership and not being able to obtain it back. 243 */ 244 + iwl_grab_nic_access(priv); 245 + iwl_set_bits_mask_prph(priv, APMG_PS_CTRL_REG, 246 APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS, 247 ~APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS); 248 + iwl_release_nic_access(priv); 249 250 spin_unlock_irqrestore(&priv->lock, flags); 251 }