diff options
author | Samuel Ortiz <samuel.ortiz@intel.com> | 2009-01-23 16:45:11 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 16:01:32 -0500 |
commit | 75bcfae97d71756263ccbffc2dcdd8b3020a1a0f (patch) | |
tree | 48249318907ef79703593a27cee4490a13ca5b5b /drivers | |
parent | 7b841727d2715d97592f46164804b34d6241644f (diff) |
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: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 4aeb101fc45b..602a3a915684 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -1705,12 +1705,12 @@ static void iwl3945_hw_reg_set_scan_power(struct iwl_priv *priv, u32 scan_tbl_in | |||
1705 | } | 1705 | } |
1706 | 1706 | ||
1707 | /** | 1707 | /** |
1708 | * iwl3945_hw_reg_send_txpower - fill in Tx Power command with gain settings | 1708 | * iwl3945_send_tx_power - fill in Tx Power command with gain settings |
1709 | * | 1709 | * |
1710 | * Configures power settings for all rates for the current channel, | 1710 | * Configures power settings for all rates for the current channel, |
1711 | * using values from channel info struct, and send to NIC | 1711 | * using values from channel info struct, and send to NIC |
1712 | */ | 1712 | */ |
1713 | int iwl3945_hw_reg_send_txpower(struct iwl_priv *priv) | 1713 | int iwl3945_send_tx_power(struct iwl_priv *priv) |
1714 | { | 1714 | { |
1715 | int rate_idx, i; | 1715 | int rate_idx, i; |
1716 | const struct iwl_channel_info *ch_info = NULL; | 1716 | 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 | } | 1935 | } |
1936 | 1936 | ||
1937 | /* send Txpower command for current channel to ucode */ | 1937 | /* send Txpower command for current channel to ucode */ |
1938 | return iwl3945_hw_reg_send_txpower(priv); | 1938 | return priv->cfg->ops->lib->send_tx_power(priv); |
1939 | } | 1939 | } |
1940 | 1940 | ||
1941 | int iwl3945_hw_reg_set_txpower(struct iwl_priv *priv, s8 power) | 1941 | int iwl3945_hw_reg_set_txpower(struct iwl_priv *priv, s8 power) |
@@ -2712,6 +2712,7 @@ static struct iwl_lib_ops iwl3945_lib = { | |||
2712 | .config = iwl3945_nic_config, | 2712 | .config = iwl3945_nic_config, |
2713 | .set_pwr_src = iwl3945_set_pwr_src, | 2713 | .set_pwr_src = iwl3945_set_pwr_src, |
2714 | }, | 2714 | }, |
2715 | .send_tx_power = iwl3945_send_tx_power, | ||
2715 | }; | 2716 | }; |
2716 | 2717 | ||
2717 | static struct iwl_hcmd_utils_ops iwl3945_hcmd_utils = { | 2718 | static struct iwl_hcmd_utils_ops iwl3945_hcmd_utils = { |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index de8c8d7ca0fe..997ac33500f3 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -744,7 +744,7 @@ static int iwl3945_commit_rxon(struct iwl_priv *priv) | |||
744 | 744 | ||
745 | /* If we issue a new RXON command which required a tune then we must | 745 | /* If we issue a new RXON command which required a tune then we must |
746 | * send a new TXPOWER command or we won't be able to Tx any frames */ | 746 | * send a new TXPOWER command or we won't be able to Tx any frames */ |
747 | rc = iwl3945_hw_reg_send_txpower(priv); | 747 | rc = priv->cfg->ops->lib->send_tx_power(priv); |
748 | if (rc) { | 748 | if (rc) { |
749 | IWL_ERR(priv, "Error setting Tx power (%d).\n", rc); | 749 | IWL_ERR(priv, "Error setting Tx power (%d).\n", rc); |
750 | return rc; | 750 | return rc; |
@@ -5517,7 +5517,7 @@ static void iwl3945_bg_scan_completed(struct work_struct *work) | |||
5517 | /* Since setting the TXPOWER may have been deferred while | 5517 | /* Since setting the TXPOWER may have been deferred while |
5518 | * performing the scan, fire one off */ | 5518 | * performing the scan, fire one off */ |
5519 | mutex_lock(&priv->mutex); | 5519 | mutex_lock(&priv->mutex); |
5520 | iwl3945_hw_reg_send_txpower(priv); | 5520 | priv->cfg->ops->lib->send_tx_power(priv); |
5521 | mutex_unlock(&priv->mutex); | 5521 | mutex_unlock(&priv->mutex); |
5522 | } | 5522 | } |
5523 | 5523 | ||