aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-3945.c
diff options
context:
space:
mode:
authorSamuel Ortiz <samuel.ortiz@intel.com>2009-01-27 17:27:52 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-09 15:03:33 -0500
commit8ccde88a87a3dc906234b281a036fee9c7371949 (patch)
tree05bb74d5f11201e0a7c38169ecbab3509e18b686 /drivers/net/wireless/iwlwifi/iwl-3945.c
parentd14c7c1d6aef1175625ea72938b07cee072723dc (diff)
iwl3945: Getting rid of the *39_rxon iwl_priv fields
The iwl_rxon_cmd is really just a iwl3945_rxon_cmd structure extension. So, we can use the *_rxon fields from iwl_priv instead of the 3945 specific ones (*39_rxon). We have to then be careful when submitting REPLY_RXON host commands, since the command length as to be set according to the HW. As another precaution the reserved4 and reserved5 fields are cleared before being sent to the 3945. With the *39_rxon removal, a lot of duplicated code can be removed from the 3945 code base. 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/net/wireless/iwlwifi/iwl-3945.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index 12f93b6207d6..610ee17c8406 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -251,7 +251,7 @@ int iwl3945_rs_next_rate(struct iwl_priv *priv, int rate)
251 break; 251 break;
252 case IEEE80211_BAND_2GHZ: 252 case IEEE80211_BAND_2GHZ:
253 if (!(priv->sta_supp_rates & IWL_OFDM_RATES_MASK) && 253 if (!(priv->sta_supp_rates & IWL_OFDM_RATES_MASK) &&
254 iwl3945_is_associated(priv)) { 254 iwl_is_associated(priv)) {
255 if (rate == IWL_RATE_11M_INDEX) 255 if (rate == IWL_RATE_11M_INDEX)
256 next_rate = IWL_RATE_5M_INDEX; 256 next_rate = IWL_RATE_5M_INDEX;
257 } 257 }
@@ -579,7 +579,8 @@ static void iwl3945_pass_packet_to_mac80211(struct iwl_priv *priv,
579 skb_put(rxb->skb, le16_to_cpu(rx_hdr->len)); 579 skb_put(rxb->skb, le16_to_cpu(rx_hdr->len));
580 580
581 if (!iwl3945_mod_params.sw_crypto) 581 if (!iwl3945_mod_params.sw_crypto)
582 iwl3945_set_decrypted_flag(priv, rxb->skb, 582 iwl_set_decrypted_flag(priv,
583 (struct ieee80211_hdr *)rxb->skb->data,
583 le32_to_cpu(rx_end->status), stats); 584 le32_to_cpu(rx_end->status), stats);
584 585
585#ifdef CONFIG_IWL3945_LEDS 586#ifdef CONFIG_IWL3945_LEDS
@@ -1694,17 +1695,17 @@ int iwl3945_send_tx_power(struct iwl_priv *priv)
1694 int rate_idx, i; 1695 int rate_idx, i;
1695 const struct iwl_channel_info *ch_info = NULL; 1696 const struct iwl_channel_info *ch_info = NULL;
1696 struct iwl3945_txpowertable_cmd txpower = { 1697 struct iwl3945_txpowertable_cmd txpower = {
1697 .channel = priv->active39_rxon.channel, 1698 .channel = priv->active_rxon.channel,
1698 }; 1699 };
1699 1700
1700 txpower.band = (priv->band == IEEE80211_BAND_5GHZ) ? 0 : 1; 1701 txpower.band = (priv->band == IEEE80211_BAND_5GHZ) ? 0 : 1;
1701 ch_info = iwl_get_channel_info(priv, 1702 ch_info = iwl_get_channel_info(priv,
1702 priv->band, 1703 priv->band,
1703 le16_to_cpu(priv->active39_rxon.channel)); 1704 le16_to_cpu(priv->active_rxon.channel));
1704 if (!ch_info) { 1705 if (!ch_info) {
1705 IWL_ERR(priv, 1706 IWL_ERR(priv,
1706 "Failed to get channel info for channel %d [%d]\n", 1707 "Failed to get channel info for channel %d [%d]\n",
1707 le16_to_cpu(priv->active39_rxon.channel), priv->band); 1708 le16_to_cpu(priv->active_rxon.channel), priv->band);
1708 return -EINVAL; 1709 return -EINVAL;
1709 } 1710 }
1710 1711
@@ -2432,7 +2433,7 @@ int iwl3945_init_hw_rate_table(struct iwl_priv *priv)
2432 * 1M CCK rates */ 2433 * 1M CCK rates */
2433 2434
2434 if (!(priv->sta_supp_rates & IWL_OFDM_RATES_MASK) && 2435 if (!(priv->sta_supp_rates & IWL_OFDM_RATES_MASK) &&
2435 iwl3945_is_associated(priv)) { 2436 iwl_is_associated(priv)) {
2436 2437
2437 index = IWL_FIRST_CCK_RATE; 2438 index = IWL_FIRST_CCK_RATE;
2438 for (i = IWL_RATE_6M_INDEX_TABLE; 2439 for (i = IWL_RATE_6M_INDEX_TABLE;