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

Commit 3fa50738 authored by Johannes Berg's avatar Johannes Berg Committed by Wey-Yi Guy
Browse files

iwlagn: prepare for multi-TB commands



In a subsequent patch, I want to make commands use
multiple TBs in a TFD. This is a simple change to
prepare the data structures for this, with as of
now still just a single TB supported.

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
parent 6b86bd62
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -195,9 +195,9 @@ static int iwl2030_hw_channel_switch(struct iwl_priv *priv,
	struct ieee80211_vif *vif = ctx->vif;
	struct iwl_host_cmd hcmd = {
		.id = REPLY_CHANNEL_SWITCH,
		.len = sizeof(cmd),
		.len = { sizeof(cmd), },
		.flags = CMD_SYNC,
		.data = &cmd,
		.data = { &cmd, },
	};

	cmd.band = priv->band == IEEE80211_BAND_2GHZ;
+2 −2
Original line number Diff line number Diff line
@@ -282,9 +282,9 @@ static int iwl5000_hw_channel_switch(struct iwl_priv *priv,
	struct ieee80211_vif *vif = ctx->vif;
	struct iwl_host_cmd hcmd = {
		.id = REPLY_CHANNEL_SWITCH,
		.len = sizeof(cmd),
		.len = { sizeof(cmd), },
		.flags = CMD_SYNC,
		.data = &cmd,
		.data = { &cmd, },
	};

	cmd.band = priv->band == IEEE80211_BAND_2GHZ;
+2 −2
Original line number Diff line number Diff line
@@ -221,9 +221,9 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
	struct ieee80211_vif *vif = ctx->vif;
	struct iwl_host_cmd hcmd = {
		.id = REPLY_CHANNEL_SWITCH,
		.len = sizeof(cmd),
		.len = { sizeof(cmd), },
		.flags = CMD_SYNC,
		.data = &cmd,
		.data = { &cmd, },
	};

	cmd.band = priv->band == IEEE80211_BAND_2GHZ;
+6 −6
Original line number Diff line number Diff line
@@ -93,8 +93,8 @@ int iwl_send_calib_results(struct iwl_priv *priv)
	for (i = 0; i < IWL_CALIB_MAX; i++) {
		if ((BIT(i) & priv->hw_params.calib_init_cfg) &&
		    priv->calib_results[i].buf) {
			hcmd.len = priv->calib_results[i].buf_len;
			hcmd.data = priv->calib_results[i].buf;
			hcmd.len[0] = priv->calib_results[i].buf_len;
			hcmd.data[0] = priv->calib_results[i].buf;
			ret = iwl_send_cmd_sync(priv, &hcmd);
			if (ret) {
				IWL_ERR(priv, "Error %d iteration %d\n",
@@ -456,9 +456,9 @@ static int iwl_sensitivity_write(struct iwl_priv *priv)
	struct iwl_sensitivity_data *data = NULL;
	struct iwl_host_cmd cmd_out = {
		.id = SENSITIVITY_CMD,
		.len = sizeof(struct iwl_sensitivity_cmd),
		.len = { sizeof(struct iwl_sensitivity_cmd), },
		.flags = CMD_ASYNC,
		.data = &cmd,
		.data = { &cmd, },
	};

	data = &(priv->sensitivity_data);
@@ -491,9 +491,9 @@ static int iwl_enhance_sensitivity_write(struct iwl_priv *priv)
	struct iwl_sensitivity_data *data = NULL;
	struct iwl_host_cmd cmd_out = {
		.id = SENSITIVITY_CMD,
		.len = sizeof(struct iwl_enhance_sensitivity_cmd),
		.len = { sizeof(struct iwl_enhance_sensitivity_cmd), },
		.flags = CMD_ASYNC,
		.data = &cmd,
		.data = { &cmd, },
	};

	data = &(priv->sensitivity_data);
+6 −6
Original line number Diff line number Diff line
@@ -1140,7 +1140,7 @@ int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
{
	struct iwl_host_cmd cmd = {
		.id = REPLY_SCAN_CMD,
		.len = sizeof(struct iwl_scan_cmd),
		.len = { sizeof(struct iwl_scan_cmd), },
		.flags = CMD_SIZE_HUGE,
	};
	struct iwl_scan_cmd *scan;
@@ -1425,10 +1425,10 @@ int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
		return -EIO;
	}

	cmd.len += le16_to_cpu(scan->tx_cmd.len) +
	cmd.len[0] += le16_to_cpu(scan->tx_cmd.len) +
	    scan->channel_count * sizeof(struct iwl_scan_channel);
	cmd.data = scan;
	scan->len = cpu_to_le16(cmd.len);
	cmd.data[0] = scan;
	scan->len = cpu_to_le16(cmd.len[0]);

	/* set scan bit here for PAN params */
	set_bit(STATUS_SCAN_HW, &priv->status);
@@ -1520,9 +1520,9 @@ int iwlagn_txfifo_flush(struct iwl_priv *priv, u16 flush_control)
	struct iwl_txfifo_flush_cmd flush_cmd;
	struct iwl_host_cmd cmd = {
		.id = REPLY_TXFIFO_FLUSH,
		.len = sizeof(struct iwl_txfifo_flush_cmd),
		.len = { sizeof(struct iwl_txfifo_flush_cmd), },
		.flags = CMD_SYNC,
		.data = &flush_cmd,
		.data = { &flush_cmd, },
	};

	might_sleep();
Loading