diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2011-08-26 02:10:39 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-08-29 15:25:30 -0400 |
commit | d618912417fbce4f6514fe1cbef7df2e73bdb6c2 (patch) | |
tree | e14bf2a7a09d898431cd0bac6d8b38318cb6dc48 /drivers/net/wireless/iwlwifi/iwl-core.c | |
parent | 8f470ce31de1a9dfe6b53e0967eaa7e72b741714 (diff) |
iwlagn: hw_params moves to iwl_shared
Since it is used by all the layers, it needs to move to iwl_shared.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-core.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 2b3d0526e96..2aeafa18579 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -55,8 +55,8 @@ static void iwl_init_ht_hw_capab(const struct iwl_priv *priv, | |||
55 | enum ieee80211_band band) | 55 | enum ieee80211_band band) |
56 | { | 56 | { |
57 | u16 max_bit_rate = 0; | 57 | u16 max_bit_rate = 0; |
58 | u8 rx_chains_num = priv->hw_params.rx_chains_num; | 58 | u8 rx_chains_num = hw_params(priv).rx_chains_num; |
59 | u8 tx_chains_num = priv->hw_params.tx_chains_num; | 59 | u8 tx_chains_num = hw_params(priv).tx_chains_num; |
60 | 60 | ||
61 | ht_info->cap = 0; | 61 | ht_info->cap = 0; |
62 | memset(&ht_info->mcs, 0, sizeof(ht_info->mcs)); | 62 | memset(&ht_info->mcs, 0, sizeof(ht_info->mcs)); |
@@ -68,7 +68,7 @@ static void iwl_init_ht_hw_capab(const struct iwl_priv *priv, | |||
68 | ht_info->cap |= IEEE80211_HT_CAP_GRN_FLD; | 68 | ht_info->cap |= IEEE80211_HT_CAP_GRN_FLD; |
69 | ht_info->cap |= IEEE80211_HT_CAP_SGI_20; | 69 | ht_info->cap |= IEEE80211_HT_CAP_SGI_20; |
70 | max_bit_rate = MAX_BIT_RATE_20_MHZ; | 70 | max_bit_rate = MAX_BIT_RATE_20_MHZ; |
71 | if (priv->hw_params.ht40_channel & BIT(band)) { | 71 | if (hw_params(priv).ht40_channel & BIT(band)) { |
72 | ht_info->cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40; | 72 | ht_info->cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40; |
73 | ht_info->cap |= IEEE80211_HT_CAP_SGI_40; | 73 | ht_info->cap |= IEEE80211_HT_CAP_SGI_40; |
74 | ht_info->mcs.rx_mask[4] = 0x01; | 74 | ht_info->mcs.rx_mask[4] = 0x01; |
@@ -359,7 +359,7 @@ int iwl_send_rxon_timing(struct iwl_priv *priv, struct iwl_rxon_context *ctx) | |||
359 | beacon_int = le16_to_cpu(ctx->timing.beacon_interval); | 359 | beacon_int = le16_to_cpu(ctx->timing.beacon_interval); |
360 | } else { | 360 | } else { |
361 | beacon_int = iwl_adjust_beacon_interval(beacon_int, | 361 | beacon_int = iwl_adjust_beacon_interval(beacon_int, |
362 | priv->hw_params.max_beacon_itrvl * TIME_UNIT); | 362 | hw_params(priv).max_beacon_itrvl * TIME_UNIT); |
363 | ctx->timing.beacon_interval = cpu_to_le16(beacon_int); | 363 | ctx->timing.beacon_interval = cpu_to_le16(beacon_int); |
364 | } | 364 | } |
365 | 365 | ||
@@ -1823,7 +1823,7 @@ void iwl_bg_watchdog(unsigned long data) | |||
1823 | 1823 | ||
1824 | /* monitor and check for other stuck queues */ | 1824 | /* monitor and check for other stuck queues */ |
1825 | if (iwl_is_any_associated(priv)) { | 1825 | if (iwl_is_any_associated(priv)) { |
1826 | for (cnt = 0; cnt < priv->hw_params.max_txq_num; cnt++) { | 1826 | for (cnt = 0; cnt < hw_params(priv).max_txq_num; cnt++) { |
1827 | /* skip as we already checked the command queue */ | 1827 | /* skip as we already checked the command queue */ |
1828 | if (cnt == priv->cmd_queue) | 1828 | if (cnt == priv->cmd_queue) |
1829 | continue; | 1829 | continue; |
@@ -1864,12 +1864,12 @@ u32 iwl_usecs_to_beacons(struct iwl_priv *priv, u32 usec, u32 beacon_interval) | |||
1864 | 1864 | ||
1865 | quot = (usec / interval) & | 1865 | quot = (usec / interval) & |
1866 | (iwl_beacon_time_mask_high(priv, | 1866 | (iwl_beacon_time_mask_high(priv, |
1867 | priv->hw_params.beacon_time_tsf_bits) >> | 1867 | hw_params(priv).beacon_time_tsf_bits) >> |
1868 | priv->hw_params.beacon_time_tsf_bits); | 1868 | hw_params(priv).beacon_time_tsf_bits); |
1869 | rem = (usec % interval) & iwl_beacon_time_mask_low(priv, | 1869 | rem = (usec % interval) & iwl_beacon_time_mask_low(priv, |
1870 | priv->hw_params.beacon_time_tsf_bits); | 1870 | hw_params(priv).beacon_time_tsf_bits); |
1871 | 1871 | ||
1872 | return (quot << priv->hw_params.beacon_time_tsf_bits) + rem; | 1872 | return (quot << hw_params(priv).beacon_time_tsf_bits) + rem; |
1873 | } | 1873 | } |
1874 | 1874 | ||
1875 | /* base is usually what we get from ucode with each received frame, | 1875 | /* base is usually what we get from ucode with each received frame, |
@@ -1879,22 +1879,22 @@ __le32 iwl_add_beacon_time(struct iwl_priv *priv, u32 base, | |||
1879 | u32 addon, u32 beacon_interval) | 1879 | u32 addon, u32 beacon_interval) |
1880 | { | 1880 | { |
1881 | u32 base_low = base & iwl_beacon_time_mask_low(priv, | 1881 | u32 base_low = base & iwl_beacon_time_mask_low(priv, |
1882 | priv->hw_params.beacon_time_tsf_bits); | 1882 | hw_params(priv).beacon_time_tsf_bits); |
1883 | u32 addon_low = addon & iwl_beacon_time_mask_low(priv, | 1883 | u32 addon_low = addon & iwl_beacon_time_mask_low(priv, |
1884 | priv->hw_params.beacon_time_tsf_bits); | 1884 | hw_params(priv).beacon_time_tsf_bits); |
1885 | u32 interval = beacon_interval * TIME_UNIT; | 1885 | u32 interval = beacon_interval * TIME_UNIT; |
1886 | u32 res = (base & iwl_beacon_time_mask_high(priv, | 1886 | u32 res = (base & iwl_beacon_time_mask_high(priv, |
1887 | priv->hw_params.beacon_time_tsf_bits)) + | 1887 | hw_params(priv).beacon_time_tsf_bits)) + |
1888 | (addon & iwl_beacon_time_mask_high(priv, | 1888 | (addon & iwl_beacon_time_mask_high(priv, |
1889 | priv->hw_params.beacon_time_tsf_bits)); | 1889 | hw_params(priv).beacon_time_tsf_bits)); |
1890 | 1890 | ||
1891 | if (base_low > addon_low) | 1891 | if (base_low > addon_low) |
1892 | res += base_low - addon_low; | 1892 | res += base_low - addon_low; |
1893 | else if (base_low < addon_low) { | 1893 | else if (base_low < addon_low) { |
1894 | res += interval + base_low - addon_low; | 1894 | res += interval + base_low - addon_low; |
1895 | res += (1 << priv->hw_params.beacon_time_tsf_bits); | 1895 | res += (1 << hw_params(priv).beacon_time_tsf_bits); |
1896 | } else | 1896 | } else |
1897 | res += (1 << priv->hw_params.beacon_time_tsf_bits); | 1897 | res += (1 << hw_params(priv).beacon_time_tsf_bits); |
1898 | 1898 | ||
1899 | return cpu_to_le32(res); | 1899 | return cpu_to_le32(res); |
1900 | } | 1900 | } |