Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266268
b: refs/heads/master
c: 403ba56
h: refs/heads/master
v: v3
  • Loading branch information
Don Fry authored and John W. Linville committed Sep 19, 2011
1 parent a956880 commit 96164b9
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b8c2b05e14fbe1ba3fffa31931a1a9ef8da933f9
refs/heads/master: 403ba56aedf2b3092e12219188e5c248f04c5acc
2 changes: 0 additions & 2 deletions trunk/drivers/net/wireless/iwlwifi/iwl-1000.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/net/wireless/iwlwifi/iwl-2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/net/wireless/iwlwifi/iwl-5000.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/net/wireless/iwlwifi/iwl-6000.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
21 changes: 10 additions & 11 deletions trunk/drivers/net/wireless/iwlwifi/iwl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
}
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/net/wireless/iwlwifi/iwl-shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down

0 comments on commit 96164b9

Please sign in to comment.