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

Commit 41c50542 authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by Wey-Yi Guy
Browse files

iwlagn: transport layer receives struct iwl_trans*



It still holds a pointer to iwl_priv. But hopefully this will disappear at some point.
Also add the multiple inclusion protection to iwl-trans.h that was forgotten.
Move iwl-trans structures to iwl-trans.h

Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
parent 0286cee0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -315,7 +315,7 @@ static int iwl5000_hw_channel_switch(struct iwl_priv *priv,
		return -EFAULT;
	}

	return trans_send_cmd(priv, &hcmd);
	return trans_send_cmd(&priv->trans, &hcmd);
}

static struct iwl_lib_ops iwl5000_lib = {
+1 −1
Original line number Diff line number Diff line
@@ -253,7 +253,7 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
		return -EFAULT;
	}

	return trans_send_cmd(priv, &hcmd);
	return trans_send_cmd(&priv->trans, &hcmd);
}

static struct iwl_lib_ops iwl6000_lib = {
+4 −4
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ int iwl_send_calib_results(struct iwl_priv *priv)
			hcmd.len[0] = priv->calib_results[i].buf_len;
			hcmd.data[0] = priv->calib_results[i].buf;
			hcmd.dataflags[0] = IWL_HCMD_DFL_NOCOPY;
			ret = trans_send_cmd(priv, &hcmd);
			ret = trans_send_cmd(&priv->trans, &hcmd);
			if (ret) {
				IWL_ERR(priv, "Error %d iteration %d\n",
					ret, i);
@@ -484,7 +484,7 @@ static int iwl_sensitivity_write(struct iwl_priv *priv)
	memcpy(&(priv->sensitivity_tbl[0]), &(cmd.table[0]),
	       sizeof(u16)*HD_TABLE_SIZE);

	return trans_send_cmd(priv, &cmd_out);
	return trans_send_cmd(&priv->trans, &cmd_out);
}

/* Prepare a SENSITIVITY_CMD, send to uCode if values have changed */
@@ -548,7 +548,7 @@ static int iwl_enhance_sensitivity_write(struct iwl_priv *priv)
	       &(cmd.enhance_table[HD_INA_NON_SQUARE_DET_OFDM_INDEX]),
	       sizeof(u16)*ENHANCE_HD_TABLE_ENTRIES);

	return trans_send_cmd(priv, &cmd_out);
	return trans_send_cmd(&priv->trans, &cmd_out);
}

void iwl_init_sensitivity(struct iwl_priv *priv)
@@ -892,7 +892,7 @@ static void iwlagn_gain_computation(struct iwl_priv *priv,
			priv->_agn.phy_calib_chain_noise_gain_cmd);
		cmd.delta_gain_1 = data->delta_gain_code[1];
		cmd.delta_gain_2 = data->delta_gain_code[2];
		trans_send_cmd_pdu(priv, REPLY_PHY_CALIBRATION_CMD,
		trans_send_cmd_pdu(&priv->trans, REPLY_PHY_CALIBRATION_CMD,
			CMD_ASYNC, sizeof(cmd), &cmd);

		data->radio_write = 1;
+5 −5
Original line number Diff line number Diff line
@@ -519,7 +519,7 @@ int iwlagn_send_tx_power(struct iwl_priv *priv)
	else
		tx_ant_cfg_cmd = REPLY_TX_POWER_DBM_CMD;

	return trans_send_cmd_pdu(priv, tx_ant_cfg_cmd, CMD_SYNC,
	return trans_send_cmd_pdu(&priv->trans, tx_ant_cfg_cmd, CMD_SYNC,
			sizeof(tx_power_cmd), &tx_power_cmd);
}

@@ -1061,7 +1061,7 @@ int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
	if (ret)
		return ret;

	ret = trans_send_cmd(priv, &cmd);
	ret = trans_send_cmd(&priv->trans, &cmd);
	if (ret) {
		clear_bit(STATUS_SCAN_HW, &priv->status);
		iwlagn_set_pan_params(priv);
@@ -1167,7 +1167,7 @@ int iwlagn_txfifo_flush(struct iwl_priv *priv, u16 flush_control)
		       flush_cmd.fifo_control);
	flush_cmd.flush_control = cpu_to_le16(flush_control);

	return trans_send_cmd(priv, &cmd);
	return trans_send_cmd(&priv->trans, &cmd);
}

void iwlagn_dev_txfifo_flush(struct iwl_priv *priv, u16 flush_control)
@@ -1361,12 +1361,12 @@ void iwlagn_send_advance_bt_config(struct iwl_priv *priv)
	if (priv->cfg->bt_params->bt_session_2) {
		memcpy(&bt_cmd_2000.basic, &basic,
			sizeof(basic));
		ret = trans_send_cmd_pdu(priv, REPLY_BT_CONFIG,
		ret = trans_send_cmd_pdu(&priv->trans, REPLY_BT_CONFIG,
			CMD_SYNC, sizeof(bt_cmd_2000), &bt_cmd_2000);
	} else {
		memcpy(&bt_cmd_6000.basic, &basic,
			sizeof(basic));
		ret = trans_send_cmd_pdu(priv, REPLY_BT_CONFIG,
		ret = trans_send_cmd_pdu(&priv->trans, REPLY_BT_CONFIG,
			CMD_SYNC, sizeof(bt_cmd_6000), &bt_cmd_6000);
	}
	if (ret)
+8 −8
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ static int iwlagn_disable_bss(struct iwl_priv *priv,
	int ret;

	send->filter_flags &= ~RXON_FILTER_ASSOC_MSK;
	ret = trans_send_cmd_pdu(priv, ctx->rxon_cmd,
	ret = trans_send_cmd_pdu(&priv->trans, ctx->rxon_cmd,
				CMD_SYNC, sizeof(*send), send);

	send->filter_flags = old_filter;
@@ -66,7 +66,7 @@ static int iwlagn_disable_pan(struct iwl_priv *priv,

	send->filter_flags &= ~RXON_FILTER_ASSOC_MSK;
	send->dev_type = RXON_DEV_TYPE_P2P;
	ret = trans_send_cmd_pdu(priv, ctx->rxon_cmd,
	ret = trans_send_cmd_pdu(&priv->trans, ctx->rxon_cmd,
				CMD_SYNC, sizeof(*send), send);

	send->filter_flags = old_filter;
@@ -92,7 +92,7 @@ static int iwlagn_disconn_pan(struct iwl_priv *priv,
	int ret;

	send->filter_flags &= ~RXON_FILTER_ASSOC_MSK;
	ret = trans_send_cmd_pdu(priv, ctx->rxon_cmd, CMD_SYNC,
	ret = trans_send_cmd_pdu(&priv->trans, ctx->rxon_cmd, CMD_SYNC,
				sizeof(*send), send);

	send->filter_flags = old_filter;
@@ -121,7 +121,7 @@ static void iwlagn_update_qos(struct iwl_priv *priv,
		      ctx->qos_data.qos_active,
		      ctx->qos_data.def_qos_parm.qos_flags);

	ret = trans_send_cmd_pdu(priv, ctx->qos_cmd, CMD_SYNC,
	ret = trans_send_cmd_pdu(&priv->trans, ctx->qos_cmd, CMD_SYNC,
			       sizeof(struct iwl_qosparam_cmd),
			       &ctx->qos_data.def_qos_parm);
	if (ret)
@@ -180,7 +180,7 @@ static int iwlagn_send_rxon_assoc(struct iwl_priv *priv,
		 ctx->staging.ofdm_ht_triple_stream_basic_rates;
	rxon_assoc.acquisition_data = ctx->staging.acquisition_data;

	ret = trans_send_cmd_pdu(priv, ctx->rxon_assoc_cmd,
	ret = trans_send_cmd_pdu(&priv->trans, ctx->rxon_assoc_cmd,
				CMD_ASYNC, sizeof(rxon_assoc), &rxon_assoc);
	return ret;
}
@@ -266,7 +266,7 @@ static int iwlagn_rxon_connect(struct iwl_priv *priv,
	 * Associated RXON doesn't clear the station table in uCode,
	 * so we don't need to restore stations etc. after this.
	 */
	ret = trans_send_cmd_pdu(priv, ctx->rxon_cmd, CMD_SYNC,
	ret = trans_send_cmd_pdu(&priv->trans, ctx->rxon_cmd, CMD_SYNC,
		      sizeof(struct iwl_rxon_cmd), &ctx->staging);
	if (ret) {
		IWL_ERR(priv, "Error setting new RXON (%d)\n", ret);
@@ -388,7 +388,7 @@ int iwlagn_set_pan_params(struct iwl_priv *priv)
	cmd.slots[0].width = cpu_to_le16(slot0);
	cmd.slots[1].width = cpu_to_le16(slot1);

	ret = trans_send_cmd_pdu(priv, REPLY_WIPAN_PARAMS, CMD_SYNC,
	ret = trans_send_cmd_pdu(&priv->trans, REPLY_WIPAN_PARAMS, CMD_SYNC,
			sizeof(cmd), &cmd);
	if (ret)
		IWL_ERR(priv, "Error setting PAN parameters (%d)\n", ret);
@@ -788,7 +788,7 @@ static void iwlagn_chain_noise_reset(struct iwl_priv *priv)
		memset(&cmd, 0, sizeof(cmd));
		iwl_set_calib_hdr(&cmd.hdr,
			priv->_agn.phy_calib_chain_noise_reset_cmd);
		ret = trans_send_cmd_pdu(priv,
		ret = trans_send_cmd_pdu(&priv->trans,
					REPLY_PHY_CALIBRATION_CMD,
					CMD_SYNC, sizeof(cmd), &cmd);
		if (ret)
Loading