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

Commit 805a3b81 authored by Wey-Yi Guy's avatar Wey-Yi Guy Committed by John W. Linville
Browse files

iwlagn: call commit_rxon function directly



No need to go though multiple levels of indirect call to send RXON command.
Call it directly

Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent e80d70e9
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -310,7 +310,6 @@ static int iwlagn_set_pan_params(struct iwl_priv *priv)
}

struct iwl_hcmd_ops iwlagn_hcmd = {
	.commit_rxon = iwlagn_commit_rxon,
	.set_rxon_chain = iwlagn_set_rxon_chain,
	.set_tx_ant = iwlagn_send_tx_ant_config,
	.send_bt_config = iwl_send_bt_config,
@@ -318,7 +317,6 @@ struct iwl_hcmd_ops iwlagn_hcmd = {
};

struct iwl_hcmd_ops iwlagn_bt_hcmd = {
	.commit_rxon = iwlagn_commit_rxon,
	.set_rxon_chain = iwlagn_set_rxon_chain,
	.set_tx_ant = iwlagn_send_tx_ant_config,
	.send_bt_config = iwlagn_send_advance_bt_config,
+5 −5
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ void iwl_update_chain_flags(struct iwl_priv *priv)
		for_each_context(priv, ctx) {
			priv->cfg->ops->hcmd->set_rxon_chain(priv, ctx);
			if (ctx->active.rx_chain != ctx->staging.rx_chain)
				iwlcore_commit_rxon(priv, ctx);
				iwlagn_commit_rxon(priv, ctx);
		}
	}
}
@@ -274,7 +274,7 @@ static void iwl_bg_bt_full_concurrency(struct work_struct *work)
	for_each_context(priv, ctx) {
		if (priv->cfg->ops->hcmd->set_rxon_chain)
			priv->cfg->ops->hcmd->set_rxon_chain(priv, ctx);
		iwlcore_commit_rxon(priv, ctx);
		iwlagn_commit_rxon(priv, ctx);
	}

	priv->cfg->ops->hcmd->send_bt_config(priv);
@@ -2056,7 +2056,7 @@ int iwl_alive_start(struct iwl_priv *priv)
	set_bit(STATUS_READY, &priv->status);

	/* Configure the adapter for unassociated operation */
	ret = iwlcore_commit_rxon(priv, ctx);
	ret = iwlagn_commit_rxon(priv, ctx);
	if (ret)
		return ret;

@@ -3101,7 +3101,7 @@ static void iwlagn_disable_roc(struct iwl_priv *priv)

	priv->_agn.hw_roc_channel = NULL;

	iwlcore_commit_rxon(priv, ctx);
	iwlagn_commit_rxon(priv, ctx);

	ctx->is_active = false;
}
@@ -3144,7 +3144,7 @@ static int iwl_mac_remain_on_channel(struct ieee80211_hw *hw,
	priv->_agn.hw_roc_channel = channel;
	priv->_agn.hw_roc_chantype = channel_type;
	priv->_agn.hw_roc_duration = DIV_ROUND_UP(duration * 1000, 1024);
	iwlcore_commit_rxon(priv, &priv->contexts[IWL_RXON_CTX_PAN]);
	iwlagn_commit_rxon(priv, &priv->contexts[IWL_RXON_CTX_PAN]);
	queue_delayed_work(priv->workqueue, &priv->_agn.hw_roc_work,
			   msecs_to_jiffies(duration + 20));

+1 −1
Original line number Diff line number Diff line
@@ -1279,7 +1279,7 @@ static int iwl_set_mode(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
	if (priv->cfg->ops->hcmd->set_rxon_chain)
		priv->cfg->ops->hcmd->set_rxon_chain(priv, ctx);

	return iwlcore_commit_rxon(priv, ctx);
	return iwlagn_commit_rxon(priv, ctx);
}

static int iwl_setup_interface(struct iwl_priv *priv,
+1 −6
Original line number Diff line number Diff line
@@ -90,7 +90,6 @@ struct iwl_cmd;
#define IWL_CMD(x) case x: return #x

struct iwl_hcmd_ops {
	int (*commit_rxon)(struct iwl_priv *priv, struct iwl_rxon_context *ctx);
	void (*set_rxon_chain)(struct iwl_priv *priv,
			       struct iwl_rxon_context *ctx);
	int (*set_tx_ant)(struct iwl_priv *priv, u8 valid_tx_ant);
@@ -611,11 +610,7 @@ void iwl_apm_stop(struct iwl_priv *priv);
int iwl_apm_init(struct iwl_priv *priv);

int iwl_send_rxon_timing(struct iwl_priv *priv, struct iwl_rxon_context *ctx);
static inline int iwlcore_commit_rxon(struct iwl_priv *priv,
				      struct iwl_rxon_context *ctx)
{
	return priv->cfg->ops->hcmd->commit_rxon(priv, ctx);
}

static inline const struct ieee80211_supported_band *iwl_get_hw_mode(
			struct iwl_priv *priv, enum ieee80211_band band)
{