Skip to content

Commit

Permalink
iwlagn: call commit_rxon function directly
Browse files Browse the repository at this point in the history
No need to go though multiple levels of indirect call to send RXON command.
Call it directly

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Wey-Yi Guy authored and John W. Linville committed Jun 3, 2011
1 parent e80d70e commit 805a3b8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
2 changes: 0 additions & 2 deletions drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,15 +310,13 @@ 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,
.set_pan_params = iwlagn_set_pan_params,
};

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,
Expand Down
10 changes: 5 additions & 5 deletions drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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));

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/iwlwifi/iwl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 1 addition & 6 deletions drivers/net/wireless/iwlwifi/iwl-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit 805a3b8

Please sign in to comment.