aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-3945.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index 39b6f16c87f..f4cd9370e7f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -528,10 +528,11 @@ static void iwl3945_rx_reply_rx(struct iwl_priv *priv,
528 528
529 rx_status.flag = 0; 529 rx_status.flag = 0;
530 rx_status.mactime = le64_to_cpu(rx_end->timestamp); 530 rx_status.mactime = le64_to_cpu(rx_end->timestamp);
531 rx_status.freq =
532 ieee80211_channel_to_frequency(le16_to_cpu(rx_hdr->channel));
533 rx_status.band = (rx_hdr->phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? 531 rx_status.band = (rx_hdr->phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ?
534 IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; 532 IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ;
533 rx_status.freq =
534 ieee80211_channel_to_frequency(le16_to_cpu(rx_hdr->channel),
535 rx_status.band);
535 536
536 rx_status.rate_idx = iwl3945_hwrate_to_plcp_idx(rx_hdr->rate); 537 rx_status.rate_idx = iwl3945_hwrate_to_plcp_idx(rx_hdr->rate);
537 if (rx_status.band == IEEE80211_BAND_5GHZ) 538 if (rx_status.band == IEEE80211_BAND_5GHZ)
@@ -695,8 +696,7 @@ void iwl3945_hw_build_tx_cmd_rate(struct iwl_priv *priv,
695 696
696 /* We need to figure out how to get the sta->supp_rates while 697 /* We need to figure out how to get the sta->supp_rates while
697 * in this running context */ 698 * in this running context */
698 rate_mask = IWL_RATES_MASK; 699 rate_mask = IWL_RATES_MASK_3945;
699
700 700
701 /* Set retry limit on DATA packets and Probe Responses*/ 701 /* Set retry limit on DATA packets and Probe Responses*/
702 if (ieee80211_is_probe_resp(fc)) 702 if (ieee80211_is_probe_resp(fc))
@@ -898,13 +898,11 @@ static void iwl3945_nic_config(struct iwl_priv *priv)
898{ 898{
899 struct iwl3945_eeprom *eeprom = (struct iwl3945_eeprom *)priv->eeprom; 899 struct iwl3945_eeprom *eeprom = (struct iwl3945_eeprom *)priv->eeprom;
900 unsigned long flags; 900 unsigned long flags;
901 u8 rev_id = 0; 901 u8 rev_id = priv->pci_dev->revision;
902 902
903 spin_lock_irqsave(&priv->lock, flags); 903 spin_lock_irqsave(&priv->lock, flags);
904 904
905 /* Determine HW type */ 905 /* Determine HW type */
906 pci_read_config_byte(priv->pci_dev, PCI_REVISION_ID, &rev_id);
907
908 IWL_DEBUG_INFO(priv, "HW Revision ID = 0x%X\n", rev_id); 906 IWL_DEBUG_INFO(priv, "HW Revision ID = 0x%X\n", rev_id);
909 907
910 if (rev_id & PCI_CFG_REV_ID_BIT_RTP) 908 if (rev_id & PCI_CFG_REV_ID_BIT_RTP)
@@ -1583,7 +1581,7 @@ static int iwl3945_hw_reg_comp_txpower_temp(struct iwl_priv *priv)
1583 ref_temp); 1581 ref_temp);
1584 1582
1585 /* set tx power value for all rates, OFDM and CCK */ 1583 /* set tx power value for all rates, OFDM and CCK */
1586 for (rate_index = 0; rate_index < IWL_RATE_COUNT; 1584 for (rate_index = 0; rate_index < IWL_RATE_COUNT_3945;
1587 rate_index++) { 1585 rate_index++) {
1588 int power_idx = 1586 int power_idx =
1589 ch_info->power_info[rate_index].base_power_index; 1587 ch_info->power_info[rate_index].base_power_index;
@@ -1823,7 +1821,7 @@ int iwl3945_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
1823 1821
1824 /* If we issue a new RXON command which required a tune then we must 1822 /* If we issue a new RXON command which required a tune then we must
1825 * send a new TXPOWER command or we won't be able to Tx any frames */ 1823 * send a new TXPOWER command or we won't be able to Tx any frames */
1826 rc = priv->cfg->ops->lib->send_tx_power(priv); 1824 rc = iwl_set_tx_power(priv, priv->tx_power_next, true);
1827 if (rc) { 1825 if (rc) {
1828 IWL_ERR(priv, "Error setting Tx power (%d).\n", rc); 1826 IWL_ERR(priv, "Error setting Tx power (%d).\n", rc);
1829 return rc; 1827 return rc;