]> git.karo-electronics.de Git - linux-beck.git/commitdiff
iwlwifi: remove priv->active_rate_basic
authorJohannes Berg <johannes.berg@intel.com>
Thu, 21 Jan 2010 19:33:19 +0000 (11:33 -0800)
committerReinette Chatre <reinette.chatre@intel.com>
Wed, 10 Mar 2010 00:04:54 +0000 (16:04 -0800)
This variable is assigned a default value,
but then assigned zero as soon as mac80211
calls a change channel (which will happen
right after the hw is started) and after
that it never changes again.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
drivers/net/wireless/iwlwifi/iwl-agn-rs.c
drivers/net/wireless/iwlwifi/iwl-agn-rs.h
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-dev.h
drivers/net/wireless/iwlwifi/iwl3945-base.c

index 696e668b801d24a6a674dc292d86972b3d5ed91b..84271cc62afa78da68f5e3e8a69de149ae8a9293 100644 (file)
@@ -597,10 +597,6 @@ static u16 rs_get_supported_rates(struct iwl_lq_sta *lq_sta,
                                  struct ieee80211_hdr *hdr,
                                  enum iwl_table_type rate_type)
 {
-       if (hdr && is_multicast_ether_addr(hdr->addr1) &&
-           lq_sta->active_rate_basic)
-               return lq_sta->active_rate_basic;
-
        if (is_legacy(rate_type)) {
                return lq_sta->active_legacy_rate;
        } else {
@@ -2552,7 +2548,6 @@ static void rs_rate_init(void *priv_r, struct ieee80211_supported_band *sband,
        lq_sta->missed_rate_counter = IWL_MISSED_RATE_MAX;
        lq_sta->is_green = rs_use_green(sta, &priv->current_ht_config);
        lq_sta->active_legacy_rate = priv->active_rate & ~(0x1000);
-       lq_sta->active_rate_basic = priv->active_rate_basic;
        lq_sta->band = priv->band;
        /*
         * active_siso_rate mask includes 9 MBits (bit 5), and CCK (bits 0-3),
index e71923961e691599f663dd5e279f3d1f07a5a5c3..e182f5a0f736a0b4c7e47c0670c9fe64dc679ab6 100644 (file)
@@ -411,7 +411,6 @@ struct iwl_lq_sta {
        u16 active_siso_rate;
        u16 active_mimo2_rate;
        u16 active_mimo3_rate;
-       u16 active_rate_basic;
        s8 max_rate_idx;     /* Max rate set by user */
        u8 missed_rate_counter;
 
index e7e4bf71568c8e94ca0ad5ba716a821a89184696..fbbe9985966267be6e2f099a7428716203e32a32 100644 (file)
@@ -2104,7 +2104,6 @@ static void iwl_alive_start(struct iwl_priv *priv)
        ieee80211_wake_queues(priv->hw);
 
        priv->active_rate = IWL_RATES_MASK;
-       priv->active_rate_basic = IWL_RATES_MASK & IWL_BASIC_RATES_MASK;
 
        /* Configure Tx antenna selection based on H/W config */
        if (priv->cfg->ops->hcmd->set_tx_ant)
index 1cfcc9fe9dc3166493b4a68611993974e91b7652..8e8f5282c01caf9fc338e23c67d944af279d7ea8 100644 (file)
@@ -897,23 +897,10 @@ EXPORT_SYMBOL(iwl_full_rxon_required);
 
 u8 iwl_rate_get_lowest_plcp(struct iwl_priv *priv)
 {
-       int i;
-       int rate_mask;
-
-       /* Set rate mask*/
-       if (priv->staging_rxon.flags & RXON_FLG_BAND_24G_MSK)
-               rate_mask = priv->active_rate_basic & IWL_CCK_RATES_MASK;
-       else
-               rate_mask = priv->active_rate_basic & IWL_OFDM_RATES_MASK;
-
-       /* Find lowest valid rate */
-       for (i = IWL_RATE_1M_INDEX; i != IWL_RATE_INVALID;
-                                       i = iwl_rates[i].next_ieee) {
-               if (rate_mask & (1 << i))
-                       return iwl_rates[i].plcp;
-       }
-
-       /* No valid rate was found. Assign the lowest one */
+       /*
+        * Assign the lowest rate -- should really get this from
+        * the beacon skb from mac80211.
+        */
        if (priv->staging_rxon.flags & RXON_FLG_BAND_24G_MSK)
                return IWL_RATE_1M_PLCP;
        else
@@ -1272,7 +1259,6 @@ static void iwl_set_rate(struct iwl_priv *priv)
        }
 
        priv->active_rate = 0;
-       priv->active_rate_basic = 0;
 
        for (i = 0; i < hw->n_bitrates; i++) {
                rate = &(hw->bitrates[i]);
@@ -1280,30 +1266,13 @@ static void iwl_set_rate(struct iwl_priv *priv)
                        priv->active_rate |= (1 << rate->hw_value);
        }
 
-       IWL_DEBUG_RATE(priv, "Set active_rate = %0x, active_rate_basic = %0x\n",
-                      priv->active_rate, priv->active_rate_basic);
+       IWL_DEBUG_RATE(priv, "Set active_rate = %0x\n", priv->active_rate);
 
-       /*
-        * If a basic rate is configured, then use it (adding IWL_RATE_1M_MASK)
-        * otherwise set it to the default of all CCK rates and 6, 12, 24 for
-        * OFDM
-        */
-       if (priv->active_rate_basic & IWL_CCK_BASIC_RATES_MASK)
-               priv->staging_rxon.cck_basic_rates =
-                   ((priv->active_rate_basic &
-                     IWL_CCK_RATES_MASK) >> IWL_FIRST_CCK_RATE) & 0xF;
-       else
-               priv->staging_rxon.cck_basic_rates =
-                   (IWL_CCK_BASIC_RATES_MASK >> IWL_FIRST_CCK_RATE) & 0xF;
-
-       if (priv->active_rate_basic & IWL_OFDM_BASIC_RATES_MASK)
-               priv->staging_rxon.ofdm_basic_rates =
-                   ((priv->active_rate_basic &
-                     (IWL_OFDM_BASIC_RATES_MASK | IWL_RATE_6M_MASK)) >>
-                     IWL_FIRST_OFDM_RATE) & 0xFF;
-       else
-               priv->staging_rxon.ofdm_basic_rates =
-                  (IWL_OFDM_BASIC_RATES_MASK >> IWL_FIRST_OFDM_RATE) & 0xFF;
+       priv->staging_rxon.cck_basic_rates =
+           (IWL_CCK_BASIC_RATES_MASK >> IWL_FIRST_CCK_RATE) & 0xF;
+
+       priv->staging_rxon.ofdm_basic_rates =
+          (IWL_OFDM_BASIC_RATES_MASK >> IWL_FIRST_OFDM_RATE) & 0xFF;
 }
 
 void iwl_rx_csa(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
index 4d6558fbebe569f110624d678064ed793f51e05c..ba404b99f4fecfd09f84fa3b84166daa23ce5e86 100644 (file)
@@ -1168,7 +1168,6 @@ struct iwl_priv {
        u64 led_tpt;
 
        u16 active_rate;
-       u16 active_rate_basic;
 
        u8 assoc_station_added;
        u8 start_calib;
index b2b050592bc1f68ce9f1c8ee7f602f98366b9db1..9cc15f96d208257a3371a8ab5ac6706222b2c0f5 100644 (file)
@@ -2509,7 +2509,6 @@ static void iwl3945_alive_start(struct iwl_priv *priv)
        ieee80211_wake_queues(priv->hw);
 
        priv->active_rate = IWL_RATES_MASK;
-       priv->active_rate_basic = IWL_RATES_MASK & IWL_BASIC_RATES_MASK;
 
        iwl_power_update_mode(priv, true);