提交 75bcfae9 编写于 作者: S Samuel Ortiz 提交者: John W. Linville

iwl3945: Define send_tx_power

We can define this iwl_lib ops for 3945, as this would help us cleaning the
scanning code.
Signed-off-by: NSamuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 7b841727
...@@ -1705,12 +1705,12 @@ static void iwl3945_hw_reg_set_scan_power(struct iwl_priv *priv, u32 scan_tbl_in ...@@ -1705,12 +1705,12 @@ static void iwl3945_hw_reg_set_scan_power(struct iwl_priv *priv, u32 scan_tbl_in
} }
/** /**
* iwl3945_hw_reg_send_txpower - fill in Tx Power command with gain settings * iwl3945_send_tx_power - fill in Tx Power command with gain settings
* *
* Configures power settings for all rates for the current channel, * Configures power settings for all rates for the current channel,
* using values from channel info struct, and send to NIC * using values from channel info struct, and send to NIC
*/ */
int iwl3945_hw_reg_send_txpower(struct iwl_priv *priv) int iwl3945_send_tx_power(struct iwl_priv *priv)
{ {
int rate_idx, i; int rate_idx, i;
const struct iwl_channel_info *ch_info = NULL; const struct iwl_channel_info *ch_info = NULL;
...@@ -1935,7 +1935,7 @@ static int iwl3945_hw_reg_comp_txpower_temp(struct iwl_priv *priv) ...@@ -1935,7 +1935,7 @@ static int iwl3945_hw_reg_comp_txpower_temp(struct iwl_priv *priv)
} }
/* send Txpower command for current channel to ucode */ /* send Txpower command for current channel to ucode */
return iwl3945_hw_reg_send_txpower(priv); return priv->cfg->ops->lib->send_tx_power(priv);
} }
int iwl3945_hw_reg_set_txpower(struct iwl_priv *priv, s8 power) int iwl3945_hw_reg_set_txpower(struct iwl_priv *priv, s8 power)
...@@ -2712,6 +2712,7 @@ static struct iwl_lib_ops iwl3945_lib = { ...@@ -2712,6 +2712,7 @@ static struct iwl_lib_ops iwl3945_lib = {
.config = iwl3945_nic_config, .config = iwl3945_nic_config,
.set_pwr_src = iwl3945_set_pwr_src, .set_pwr_src = iwl3945_set_pwr_src,
}, },
.send_tx_power = iwl3945_send_tx_power,
}; };
static struct iwl_hcmd_utils_ops iwl3945_hcmd_utils = { static struct iwl_hcmd_utils_ops iwl3945_hcmd_utils = {
......
...@@ -744,7 +744,7 @@ static int iwl3945_commit_rxon(struct iwl_priv *priv) ...@@ -744,7 +744,7 @@ static int iwl3945_commit_rxon(struct iwl_priv *priv)
/* If we issue a new RXON command which required a tune then we must /* If we issue a new RXON command which required a tune then we must
* send a new TXPOWER command or we won't be able to Tx any frames */ * send a new TXPOWER command or we won't be able to Tx any frames */
rc = iwl3945_hw_reg_send_txpower(priv); rc = priv->cfg->ops->lib->send_tx_power(priv);
if (rc) { if (rc) {
IWL_ERR(priv, "Error setting Tx power (%d).\n", rc); IWL_ERR(priv, "Error setting Tx power (%d).\n", rc);
return rc; return rc;
...@@ -5517,7 +5517,7 @@ static void iwl3945_bg_scan_completed(struct work_struct *work) ...@@ -5517,7 +5517,7 @@ static void iwl3945_bg_scan_completed(struct work_struct *work)
/* Since setting the TXPOWER may have been deferred while /* Since setting the TXPOWER may have been deferred while
* performing the scan, fire one off */ * performing the scan, fire one off */
mutex_lock(&priv->mutex); mutex_lock(&priv->mutex);
iwl3945_hw_reg_send_txpower(priv); priv->cfg->ops->lib->send_tx_power(priv);
mutex_unlock(&priv->mutex); mutex_unlock(&priv->mutex);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册