iwl3945: do not use agn specific IWL_RATE_COUNT
authorStanislaw Gruszka <sgruszka@redhat.com>
Fri, 28 Jan 2011 15:47:49 +0000 (16:47 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 31 Jan 2011 20:06:21 +0000 (15:06 -0500)
Only use IWL_RATE_COUNT_3945 in 3945 code.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-3945.c
drivers/net/wireless/iwlwifi/iwl-agn-rs.h
drivers/net/wireless/iwlwifi/iwl3945-base.c

index 294221b068130fd9e6f8c833d2254cf5b184c14f..58213e72d107f01c399b744eb5e5cefe6a8ad96a 100644 (file)
@@ -762,8 +762,7 @@ void iwl3945_hw_build_tx_cmd_rate(struct iwl_priv *priv,
 
        /* We need to figure out how to get the sta->supp_rates while
         * in this running context */
-       rate_mask = IWL_RATES_MASK;
-
+       rate_mask = IWL_RATES_MASK_3945;
 
        /* Set retry limit on DATA packets and Probe Responses*/
        if (ieee80211_is_probe_resp(fc))
@@ -1650,7 +1649,7 @@ static int iwl3945_hw_reg_comp_txpower_temp(struct iwl_priv *priv)
                                                              ref_temp);
 
                /* set tx power value for all rates, OFDM and CCK */
-               for (rate_index = 0; rate_index < IWL_RATE_COUNT;
+               for (rate_index = 0; rate_index < IWL_RATE_COUNT_3945;
                     rate_index++) {
                        int power_idx =
                            ch_info->power_info[rate_index].base_power_index;
index 75e50d33ecb3a14a9d304b0ffe0342dc0d81a81d..184828c72b311099ec8c56e8a8a132644b421d3f 100644 (file)
@@ -213,6 +213,7 @@ enum {
         IWL_CCK_BASIC_RATES_MASK)
 
 #define IWL_RATES_MASK ((1 << IWL_RATE_COUNT) - 1)
+#define IWL_RATES_MASK_3945 ((1 << IWL_RATE_COUNT_3945) - 1)
 
 #define IWL_INVALID_VALUE    -1
 
index 55837d607534b20dff99f2e9b7c8259cc1a1a0ee..2945acd955f0ca494dc54bdf33c38ce5879530d1 100644 (file)
@@ -2517,7 +2517,7 @@ static void iwl3945_alive_start(struct iwl_priv *priv)
 
        ieee80211_wake_queues(priv->hw);
 
-       priv->active_rate = IWL_RATES_MASK;
+       priv->active_rate = IWL_RATES_MASK_3945;
 
        iwl_power_update_mode(priv, true);