]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
iwlagn: testmode fixed rate available for testmode only
authorWey-Yi Guy <wey-yi.w.guy@intel.com>
Wed, 13 Jul 2011 18:13:46 +0000 (11:13 -0700)
committerWey-Yi Guy <wey-yi.w.guy@intel.com>
Thu, 21 Jul 2011 14:30:36 +0000 (07:30 -0700)
Move tm_fixed_rate inside CONFIG_IWLWIFI_DEVICE_SVTOOL and only
available when the option is enable.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
drivers/net/wireless/iwlwifi/iwl-agn-rs.c
drivers/net/wireless/iwlwifi/iwl-agn-tx.c
drivers/net/wireless/iwlwifi/iwl-dev.h

index ebcd13bc10d91e3e803a8c80e6ae73fe0c0773a7..3789ff4bf53beaa6dba5fe881d8c24f61f025a7f 100644 (file)
@@ -354,9 +354,11 @@ static void rs_program_fix_rate(struct iwl_priv *priv,
        lq_sta->active_mimo2_rate  = 0x1FD0;    /* 6 - 60 MBits, no 9, no CCK */
        lq_sta->active_mimo3_rate  = 0x1FD0;    /* 6 - 60 MBits, no 9, no CCK */
 
+#ifdef CONFIG_IWLWIFI_DEVICE_SVTOOL
        /* testmode has higher priority to overwirte the fixed rate */
        if (priv->tm_fixed_rate)
                lq_sta->dbg_fixed_rate = priv->tm_fixed_rate;
+#endif
 
        IWL_DEBUG_RATE(priv, "sta_id %d rate 0x%X\n",
                lq_sta->lq.sta_id, lq_sta->dbg_fixed_rate);
@@ -1080,7 +1082,8 @@ done:
        /* See if there's a better rate or modulation mode to try. */
        if (sta && sta->supp_rates[sband->band])
                rs_rate_scale_perform(priv, skb, sta, lq_sta);
-#ifdef CONFIG_MAC80211_DEBUGFS
+
+#if defined(CONFIG_MAC80211_DEBUGFS) && defined(CONFIG_IWLWIFI_DEVICE_SVTOOL)
        if ((priv->tm_fixed_rate) &&
            (priv->tm_fixed_rate != lq_sta->dbg_fixed_rate))
                rs_program_fix_rate(priv, lq_sta);
@@ -2904,8 +2907,9 @@ void iwl_rs_rate_init(struct iwl_priv *priv, struct ieee80211_sta *sta, u8 sta_i
        if (sband->band == IEEE80211_BAND_5GHZ)
                lq_sta->last_txrate_idx += IWL_FIRST_OFDM_RATE;
        lq_sta->is_agg = 0;
-
+#ifdef CONFIG_IWLWIFI_DEVICE_SVTOOL
        priv->tm_fixed_rate = 0;
+#endif
 #ifdef CONFIG_MAC80211_DEBUGFS
        lq_sta->dbg_fixed_rate = 0;
 #endif
index a5295c15d70d2010b572f4344a85c7963a7dbe39..53bb59ee719da50b4a3aebd00dfdedaef16605a5 100644 (file)
@@ -217,6 +217,7 @@ static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv,
        if (ieee80211_is_data(fc)) {
                tx_cmd->initial_rate_index = 0;
                tx_cmd->tx_flags |= TX_CMD_FLG_STA_RATE_MSK;
+#ifdef CONFIG_IWLWIFI_DEVICE_SVTOOL
                if (priv->tm_fixed_rate) {
                        /*
                         * rate overwrite by testmode
@@ -227,6 +228,7 @@ static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv,
                        memcpy(&tx_cmd->rate_n_flags, &priv->tm_fixed_rate,
                               sizeof(tx_cmd->rate_n_flags));
                }
+#endif
                return;
        }
 
index 964be5795c502a02f41fa028442da6235dc82d09..72ef50e319d261da461fcf256b8f83d1ac4fec66 100644 (file)
@@ -1535,8 +1535,8 @@ struct iwl_priv {
        bool led_registered;
 #ifdef CONFIG_IWLWIFI_DEVICE_SVTOOL
        struct iwl_testmode_trace testmode_trace;
-#endif
        u32 tm_fixed_rate;
+#endif
 
 }; /*iwl_priv */