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

Commit 68e8dfda authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by Wey-Yi Guy
Browse files

iwlwifi: op_mode holds its pointer to the transport



Instead of using the shared area that we be killed.

Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
parent 9130bab1
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -60,13 +60,13 @@ static void iwl1000_set_ct_threshold(struct iwl_priv *priv)
static void iwl1000_nic_config(struct iwl_priv *priv)
{
	/* set CSR_HW_CONFIG_REG for uCode use */
	iwl_set_bit(trans(priv), CSR_HW_IF_CONFIG_REG,
	iwl_set_bit(priv->trans, CSR_HW_IF_CONFIG_REG,
		    CSR_HW_IF_CONFIG_REG_BIT_RADIO_SI |
		    CSR_HW_IF_CONFIG_REG_BIT_MAC_SI);

	/* Setting digital SVR for 1000 card to 1.32V */
	/* locking is acquired in iwl_set_bits_mask_prph() function */
	iwl_set_bits_mask_prph(trans(priv), APMG_DIGITAL_SVR_REG,
	iwl_set_bits_mask_prph(priv->trans, APMG_DIGITAL_SVR_REG,
				APMG_SVR_DIGITAL_VOLTAGE_1_32,
				~APMG_SVR_VOLTAGE_CONFIG_BIT_MSK);
}
@@ -222,7 +222,7 @@ static void iwl2000_nic_config(struct iwl_priv *priv)
{
	iwl_rf_config(priv);

	iwl_set_bit(trans(priv), CSR_GP_DRIVER_REG,
	iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG,
		    CSR_GP_DRIVER_REG_BIT_RADIO_IQ_INVER);
}

@@ -318,7 +318,7 @@ static void iwl5000_nic_config(struct iwl_priv *priv)
	 * (PCIe power is lost before PERST# is asserted),
	 * causing ME FW to lose ownership and not being able to obtain it back.
	 */
	iwl_set_bits_mask_prph(trans(priv), APMG_PS_CTRL_REG,
	iwl_set_bits_mask_prph(priv->trans, APMG_PS_CTRL_REG,
				APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS,
				~APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS);
}
@@ -580,21 +580,21 @@ static void iwl6000_nic_config(struct iwl_priv *priv)
		break;
	case IWL_DEVICE_FAMILY_6000i:
		/* 2x2 IPA phy type */
		iwl_write32(trans(priv), CSR_GP_DRIVER_REG,
		iwl_write32(priv->trans, CSR_GP_DRIVER_REG,
			     CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA);
		break;
	case IWL_DEVICE_FAMILY_6050:
		/* Indicate calibration version to uCode. */
		if (iwl_eeprom_calib_version(priv) >= 6)
			iwl_set_bit(trans(priv), CSR_GP_DRIVER_REG,
			iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG,
					CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
		break;
	case IWL_DEVICE_FAMILY_6150:
		/* Indicate calibration version to uCode. */
		if (iwl_eeprom_calib_version(priv) >= 6)
			iwl_set_bit(trans(priv), CSR_GP_DRIVER_REG,
			iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG,
					CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);
		iwl_set_bit(trans(priv), CSR_GP_DRIVER_REG,
		iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG,
			    CSR_GP_DRIVER_REG_BIT_6050_1x2);
		break;
	default:
+3 −3
Original line number Diff line number Diff line
@@ -189,7 +189,7 @@ void iwlagn_dev_txfifo_flush(struct iwl_priv *priv, u16 flush_control)
		goto done;
	}
	IWL_DEBUG_INFO(priv, "wait transmit/flush all frames\n");
	iwl_trans_wait_tx_queue_empty(trans(priv));
	iwl_trans_wait_tx_queue_empty(priv->trans);
done:
	ieee80211_wake_queues(priv->hw);
	mutex_unlock(&priv->mutex);
@@ -1132,7 +1132,7 @@ int iwlagn_suspend(struct iwl_priv *priv, struct cfg80211_wowlan *wowlan)
	memcpy(&rxon, &ctx->active, sizeof(rxon));

	priv->ucode_loaded = false;
	iwl_trans_stop_device(trans(priv));
	iwl_trans_stop_device(priv->trans);

	priv->wowlan = true;

@@ -1260,7 +1260,7 @@ int iwl_dvm_send_cmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
		return -EIO;
	}

	return iwl_trans_send_cmd(trans(priv), cmd);
	return iwl_trans_send_cmd(priv->trans, cmd);
}

int iwl_dvm_send_cmd_pdu(struct iwl_priv *priv, u8 id,
+5 −5
Original line number Diff line number Diff line
@@ -604,16 +604,16 @@ static int iwlagn_rx_card_state_notif(struct iwl_priv *priv,
	if (flags & (SW_CARD_DISABLED | HW_CARD_DISABLED |
		     CT_CARD_DISABLED)) {

		iwl_write32(trans(priv), CSR_UCODE_DRV_GP1_SET,
		iwl_write32(priv->trans, CSR_UCODE_DRV_GP1_SET,
			    CSR_UCODE_DRV_GP1_BIT_CMD_BLOCKED);

		iwl_write_direct32(trans(priv), HBUS_TARG_MBX_C,
		iwl_write_direct32(priv->trans, HBUS_TARG_MBX_C,
					HBUS_TARG_MBX_C_REG_BIT_CMD_BLOCKED);

		if (!(flags & RXON_CARD_DISABLED)) {
			iwl_write32(trans(priv), CSR_UCODE_DRV_GP1_CLR,
			iwl_write32(priv->trans, CSR_UCODE_DRV_GP1_CLR,
				    CSR_UCODE_DRV_GP1_BIT_CMD_BLOCKED);
			iwl_write_direct32(trans(priv), HBUS_TARG_MBX_C,
			iwl_write_direct32(priv->trans, HBUS_TARG_MBX_C,
					HBUS_TARG_MBX_C_REG_BIT_CMD_BLOCKED);
		}
		if (flags & CT_CARD_DISABLED)
@@ -636,7 +636,7 @@ static int iwlagn_rx_card_state_notif(struct iwl_priv *priv,
		wiphy_rfkill_set_hw_state(priv->hw->wiphy,
			test_bit(STATUS_RF_KILL_HW, &priv->status));
	else
		wake_up(&trans(priv)->wait_command_queue);
		wake_up(&priv->trans->wait_command_queue);
	return 0;
}

+7 −7
Original line number Diff line number Diff line
@@ -179,19 +179,19 @@ static void iwl_tt_check_exit_ct_kill(unsigned long data)

	if (tt->state == IWL_TI_CT_KILL) {
		if (priv->thermal_throttle.ct_kill_toggle) {
			iwl_write32(trans(priv), CSR_UCODE_DRV_GP1_CLR,
			iwl_write32(priv->trans, CSR_UCODE_DRV_GP1_CLR,
				    CSR_UCODE_DRV_GP1_REG_BIT_CT_KILL_EXIT);
			priv->thermal_throttle.ct_kill_toggle = false;
		} else {
			iwl_write32(trans(priv), CSR_UCODE_DRV_GP1_SET,
			iwl_write32(priv->trans, CSR_UCODE_DRV_GP1_SET,
				    CSR_UCODE_DRV_GP1_REG_BIT_CT_KILL_EXIT);
			priv->thermal_throttle.ct_kill_toggle = true;
		}
		iwl_read32(trans(priv), CSR_UCODE_DRV_GP1);
		spin_lock_irqsave(&trans(priv)->reg_lock, flags);
		if (likely(iwl_grab_nic_access(trans(priv))))
			iwl_release_nic_access(trans(priv));
		spin_unlock_irqrestore(&trans(priv)->reg_lock, flags);
		iwl_read32(priv->trans, CSR_UCODE_DRV_GP1);
		spin_lock_irqsave(&priv->trans->reg_lock, flags);
		if (likely(iwl_grab_nic_access(priv->trans)))
			iwl_release_nic_access(priv->trans);
		spin_unlock_irqrestore(&priv->trans->reg_lock, flags);

		/* Reschedule the ct_kill timer to occur in
		 * CT_KILL_EXIT_DURATION seconds to ensure we get a
+5 −5
Original line number Diff line number Diff line
@@ -467,7 +467,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
	else
		txq_id = ctx->ac_to_queue[skb_get_queue_mapping(skb)];

	if (iwl_trans_tx(trans(priv), skb, dev_cmd, txq_id))
	if (iwl_trans_tx(priv->trans, skb, dev_cmd, txq_id))
		goto drop_unlock_sta;

	if (ieee80211_is_data_qos(fc) && !ieee80211_is_qos_nullfunc(fc) &&
@@ -581,7 +581,7 @@ int iwlagn_tx_agg_stop(struct iwl_priv *priv, struct ieee80211_vif *vif,
	spin_unlock_bh(&priv->sta_lock);

	if (test_bit(txq_id, priv->agg_q_alloc)) {
		iwl_trans_tx_agg_disable(trans(priv), txq_id);
		iwl_trans_tx_agg_disable(priv->trans, txq_id);
		iwlagn_dealloc_agg_txq(priv, txq_id);
	}

@@ -665,7 +665,7 @@ int iwlagn_tx_agg_oper(struct iwl_priv *priv, struct ieee80211_vif *vif,

	fifo = ctx->ac_to_fifo[tid_to_ac[tid]];

	iwl_trans_tx_agg_setup(trans(priv), q, fifo,
	iwl_trans_tx_agg_setup(priv->trans, q, fifo,
			       sta_priv->sta_id, tid,
			       buf_size, ssn);

@@ -732,7 +732,7 @@ static void iwlagn_check_ratid_empty(struct iwl_priv *priv, int sta_id, u8 tid)
			IWL_DEBUG_TX_QUEUES(priv,
				"Can continue DELBA flow ssn = next_recl ="
				" %d", tid_data->next_reclaimed);
			iwl_trans_tx_agg_disable(trans(priv),
			iwl_trans_tx_agg_disable(priv->trans,
						 tid_data->agg.txq_id);
			iwlagn_dealloc_agg_txq(priv, tid_data->agg.txq_id);
			tid_data->agg.state = IWL_AGG_OFF;
@@ -1092,7 +1092,7 @@ static int iwl_reclaim(struct iwl_priv *priv, int sta_id, int tid,
		return 1;
	}

	iwl_trans_reclaim(trans(priv), txq_id, ssn, skbs);
	iwl_trans_reclaim(priv->trans, txq_id, ssn, skbs);
	return 0;
}

Loading