iwlagn: replace beacon_time_fsf_bits variable with #define
authorDon Fry <donald.h.fry@intel.com>
Thu, 15 Sep 2011 18:46:39 +0000 (11:46 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 19 Sep 2011 19:58:29 +0000 (15:58 -0400)
All devices use the same value for beacon_time_tsf_bits.  Use the #define

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-1000.c
drivers/net/wireless/iwlwifi/iwl-2000.c
drivers/net/wireless/iwlwifi/iwl-5000.c
drivers/net/wireless/iwlwifi/iwl-6000.c
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-shared.h

index 5eba5d9fdd8527794366b9fbb3f8aa88fd2a0092..dacbe3ad5c188eff25d4eeac2422c9c112a42a83 100644 (file)
@@ -161,8 +161,6 @@ static int iwl1000_hw_set_hw_params(struct iwl_priv *priv)
        if (priv->cfg->need_dc_calib)
                hw_params(priv).calib_init_cfg |= BIT(IWL_CALIB_DC);
 
-       hw_params(priv).beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
-
        return 0;
 }
 
index ba138a572e8002bd32eaa9e8556c5db13c8c35a7..82719b7ec3493a37462d8a51edf404a9adf1ee07 100644 (file)
@@ -159,8 +159,6 @@ static int iwl2000_hw_set_hw_params(struct iwl_priv *priv)
        if (priv->cfg->need_temp_offset_calib)
                hw_params(priv).calib_init_cfg |= BIT(IWL_CALIB_TEMP_OFFSET);
 
-       hw_params(priv).beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
-
        return 0;
 }
 
index 327ebf6b7063da5e4d0d4997040869e2e3ead9a0..de7f7f2b3d9ddecf3042dbd64bc26a98e13b23e6 100644 (file)
@@ -184,8 +184,6 @@ static int iwl5000_hw_set_hw_params(struct iwl_priv *priv)
                BIT(IWL_CALIB_TX_IQ_PERD)       |
                BIT(IWL_CALIB_BASE_BAND);
 
-       hw_params(priv).beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
-
        return 0;
 }
 
@@ -223,8 +221,6 @@ static int iwl5150_hw_set_hw_params(struct iwl_priv *priv)
        if (priv->cfg->need_dc_calib)
                hw_params(priv).calib_init_cfg |= BIT(IWL_CALIB_DC);
 
-       hw_params(priv).beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
-
        return 0;
 }
 
index d44378527380b40dfca1762c384cbe1b29d35965..5c1a8b8584a5ee8cadf94584c95768cd91182e3e 100644 (file)
@@ -180,8 +180,6 @@ static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
        if (priv->cfg->need_temp_offset_calib)
                hw_params(priv).calib_init_cfg |= BIT(IWL_CALIB_TEMP_OFFSET);
 
-       hw_params(priv).beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
-
        return 0;
 }
 
index 90ab27e50e7c1ba7d52a8af2a4c006f86ce9a854..0a426cbcbfc4bf644e9c7eeaebe762e3ce2a3330 100644 (file)
@@ -1803,13 +1803,12 @@ u32 iwl_usecs_to_beacons(struct iwl_priv *priv, u32 usec, u32 beacon_interval)
                return 0;
 
        quot = (usec / interval) &
-               (iwl_beacon_time_mask_high(priv,
-               hw_params(priv).beacon_time_tsf_bits) >>
-               hw_params(priv).beacon_time_tsf_bits);
+               (iwl_beacon_time_mask_high(priv, IWLAGN_EXT_BEACON_TIME_POS) >>
+               IWLAGN_EXT_BEACON_TIME_POS);
        rem = (usec % interval) & iwl_beacon_time_mask_low(priv,
-                                  hw_params(priv).beacon_time_tsf_bits);
+                                  IWLAGN_EXT_BEACON_TIME_POS);
 
-       return (quot << hw_params(priv).beacon_time_tsf_bits) + rem;
+       return (quot << IWLAGN_EXT_BEACON_TIME_POS) + rem;
 }
 
 /* base is usually what we get from ucode with each received frame,
@@ -1819,22 +1818,22 @@ __le32 iwl_add_beacon_time(struct iwl_priv *priv, u32 base,
                           u32 addon, u32 beacon_interval)
 {
        u32 base_low = base & iwl_beacon_time_mask_low(priv,
-                               hw_params(priv).beacon_time_tsf_bits);
+                               IWLAGN_EXT_BEACON_TIME_POS);
        u32 addon_low = addon & iwl_beacon_time_mask_low(priv,
-                               hw_params(priv).beacon_time_tsf_bits);
+                               IWLAGN_EXT_BEACON_TIME_POS);
        u32 interval = beacon_interval * TIME_UNIT;
        u32 res = (base & iwl_beacon_time_mask_high(priv,
-                               hw_params(priv).beacon_time_tsf_bits)) +
+                               IWLAGN_EXT_BEACON_TIME_POS)) +
                                (addon & iwl_beacon_time_mask_high(priv,
-                               hw_params(priv).beacon_time_tsf_bits));
+                               IWLAGN_EXT_BEACON_TIME_POS));
 
        if (base_low > addon_low)
                res += base_low - addon_low;
        else if (base_low < addon_low) {
                res += interval + base_low - addon_low;
-               res += (1 << hw_params(priv).beacon_time_tsf_bits);
+               res += (1 << IWLAGN_EXT_BEACON_TIME_POS);
        } else
-               res += (1 << hw_params(priv).beacon_time_tsf_bits);
+               res += (1 << IWLAGN_EXT_BEACON_TIME_POS);
 
        return cpu_to_le32(res);
 }
index 810b3e112077e090523ce5ecc4945726737f618c..8272a9489ab10b866780d3f311af61a70d97dc8f 100644 (file)
@@ -167,7 +167,6 @@ struct iwl_mod_params {
  * @valid_rx_ant: usable antennas for RX
  * @max_stations: the maximal number of stations
  * @ht40_channel: is 40MHz width possible: BIT(IEEE80211_BAND_XXX)
- * @beacon_time_tsf_bits: number of valid tsf bits for beacon time
  * @sku: sku read from EEPROM
  * @rx_page_order: Rx buffer page order
  * @max_inst_size: for ucode use
@@ -190,7 +189,6 @@ struct iwl_hw_params {
        u8  max_stations;
        u8  ht40_channel;
        bool shadow_reg_enable;
-       u16 beacon_time_tsf_bits;
        u16 sku;
        u32 rx_page_order;
        u32 max_inst_size;