aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-1000.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-1000.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-1000.c78
1 files changed, 40 insertions, 38 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
index 9e392896005d..9a0191a5ea35 100644
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
@@ -44,7 +44,7 @@
44#include "iwl-sta.h" 44#include "iwl-sta.h"
45#include "iwl-agn.h" 45#include "iwl-agn.h"
46#include "iwl-helpers.h" 46#include "iwl-helpers.h"
47#include "iwl-5000-hw.h" 47#include "iwl-agn-hw.h"
48#include "iwl-agn-led.h" 48#include "iwl-agn-led.h"
49 49
50/* Highest firmware API version supported */ 50/* Highest firmware API version supported */
@@ -118,7 +118,7 @@ static struct iwl_sensitivity_ranges iwl1000_sensitivity = {
118static int iwl1000_hw_set_hw_params(struct iwl_priv *priv) 118static int iwl1000_hw_set_hw_params(struct iwl_priv *priv)
119{ 119{
120 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES && 120 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
121 priv->cfg->mod_params->num_of_queues <= IWL50_NUM_QUEUES) 121 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
122 priv->cfg->num_of_queues = 122 priv->cfg->num_of_queues =
123 priv->cfg->mod_params->num_of_queues; 123 priv->cfg->mod_params->num_of_queues;
124 124
@@ -126,13 +126,13 @@ static int iwl1000_hw_set_hw_params(struct iwl_priv *priv)
126 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM; 126 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
127 priv->hw_params.scd_bc_tbls_size = 127 priv->hw_params.scd_bc_tbls_size =
128 priv->cfg->num_of_queues * 128 priv->cfg->num_of_queues *
129 sizeof(struct iwl5000_scd_bc_tbl); 129 sizeof(struct iwlagn_scd_bc_tbl);
130 priv->hw_params.tfd_size = sizeof(struct iwl_tfd); 130 priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
131 priv->hw_params.max_stations = IWL5000_STATION_COUNT; 131 priv->hw_params.max_stations = IWL5000_STATION_COUNT;
132 priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID; 132 priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID;
133 133
134 priv->hw_params.max_data_size = IWL50_RTC_DATA_SIZE; 134 priv->hw_params.max_data_size = IWLAGN_RTC_DATA_SIZE;
135 priv->hw_params.max_inst_size = IWL50_RTC_INST_SIZE; 135 priv->hw_params.max_inst_size = IWLAGN_RTC_INST_SIZE;
136 136
137 priv->hw_params.max_bsm_size = 0; 137 priv->hw_params.max_bsm_size = 0;
138 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) | 138 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
@@ -162,25 +162,25 @@ static int iwl1000_hw_set_hw_params(struct iwl_priv *priv)
162 162
163static struct iwl_lib_ops iwl1000_lib = { 163static struct iwl_lib_ops iwl1000_lib = {
164 .set_hw_params = iwl1000_hw_set_hw_params, 164 .set_hw_params = iwl1000_hw_set_hw_params,
165 .txq_update_byte_cnt_tbl = iwl5000_txq_update_byte_cnt_tbl, 165 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
166 .txq_inval_byte_cnt_tbl = iwl5000_txq_inval_byte_cnt_tbl, 166 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
167 .txq_set_sched = iwl5000_txq_set_sched, 167 .txq_set_sched = iwlagn_txq_set_sched,
168 .txq_agg_enable = iwl5000_txq_agg_enable, 168 .txq_agg_enable = iwlagn_txq_agg_enable,
169 .txq_agg_disable = iwl5000_txq_agg_disable, 169 .txq_agg_disable = iwlagn_txq_agg_disable,
170 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd, 170 .txq_attach_buf_to_tfd = iwl_hw_txq_attach_buf_to_tfd,
171 .txq_free_tfd = iwl_hw_txq_free_tfd, 171 .txq_free_tfd = iwl_hw_txq_free_tfd,
172 .txq_init = iwl_hw_tx_queue_init, 172 .txq_init = iwl_hw_tx_queue_init,
173 .rx_handler_setup = iwl5000_rx_handler_setup, 173 .rx_handler_setup = iwlagn_rx_handler_setup,
174 .setup_deferred_work = iwl5000_setup_deferred_work, 174 .setup_deferred_work = iwlagn_setup_deferred_work,
175 .is_valid_rtc_data_addr = iwl5000_hw_valid_rtc_data_addr, 175 .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
176 .load_ucode = iwl5000_load_ucode, 176 .load_ucode = iwlagn_load_ucode,
177 .dump_nic_event_log = iwl_dump_nic_event_log, 177 .dump_nic_event_log = iwl_dump_nic_event_log,
178 .dump_nic_error_log = iwl_dump_nic_error_log, 178 .dump_nic_error_log = iwl_dump_nic_error_log,
179 .dump_csr = iwl_dump_csr, 179 .dump_csr = iwl_dump_csr,
180 .dump_fh = iwl_dump_fh, 180 .dump_fh = iwl_dump_fh,
181 .init_alive_start = iwl5000_init_alive_start, 181 .init_alive_start = iwlagn_init_alive_start,
182 .alive_notify = iwl5000_alive_notify, 182 .alive_notify = iwlagn_alive_notify,
183 .send_tx_power = iwl5000_send_tx_power, 183 .send_tx_power = iwlagn_send_tx_power,
184 .update_chain_flags = iwl_update_chain_flags, 184 .update_chain_flags = iwl_update_chain_flags,
185 .apm_ops = { 185 .apm_ops = {
186 .init = iwl_apm_init, 186 .init = iwl_apm_init,
@@ -190,25 +190,25 @@ static struct iwl_lib_ops iwl1000_lib = {
190 }, 190 },
191 .eeprom_ops = { 191 .eeprom_ops = {
192 .regulatory_bands = { 192 .regulatory_bands = {
193 EEPROM_5000_REG_BAND_1_CHANNELS, 193 EEPROM_REG_BAND_1_CHANNELS,
194 EEPROM_5000_REG_BAND_2_CHANNELS, 194 EEPROM_REG_BAND_2_CHANNELS,
195 EEPROM_5000_REG_BAND_3_CHANNELS, 195 EEPROM_REG_BAND_3_CHANNELS,
196 EEPROM_5000_REG_BAND_4_CHANNELS, 196 EEPROM_REG_BAND_4_CHANNELS,
197 EEPROM_5000_REG_BAND_5_CHANNELS, 197 EEPROM_REG_BAND_5_CHANNELS,
198 EEPROM_5000_REG_BAND_24_HT40_CHANNELS, 198 EEPROM_REG_BAND_24_HT40_CHANNELS,
199 EEPROM_5000_REG_BAND_52_HT40_CHANNELS 199 EEPROM_REG_BAND_52_HT40_CHANNELS
200 }, 200 },
201 .verify_signature = iwlcore_eeprom_verify_signature, 201 .verify_signature = iwlcore_eeprom_verify_signature,
202 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore, 202 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
203 .release_semaphore = iwlcore_eeprom_release_semaphore, 203 .release_semaphore = iwlcore_eeprom_release_semaphore,
204 .calib_version = iwl5000_eeprom_calib_version, 204 .calib_version = iwlagn_eeprom_calib_version,
205 .query_addr = iwl5000_eeprom_query_addr, 205 .query_addr = iwlagn_eeprom_query_addr,
206 }, 206 },
207 .post_associate = iwl_post_associate, 207 .post_associate = iwl_post_associate,
208 .isr = iwl_isr_ict, 208 .isr = iwl_isr_ict,
209 .config_ap = iwl_config_ap, 209 .config_ap = iwl_config_ap,
210 .temp_ops = { 210 .temp_ops = {
211 .temperature = iwl5000_temperature, 211 .temperature = iwlagn_temperature,
212 .set_ct_kill = iwl1000_set_ct_threshold, 212 .set_ct_kill = iwl1000_set_ct_threshold,
213 }, 213 },
214 .add_bcast_station = iwl_add_bcast_station, 214 .add_bcast_station = iwl_add_bcast_station,
@@ -218,10 +218,10 @@ static struct iwl_lib_ops iwl1000_lib = {
218}; 218};
219 219
220static const struct iwl_ops iwl1000_ops = { 220static const struct iwl_ops iwl1000_ops = {
221 .ucode = &iwl5000_ucode, 221 .ucode = &iwlagn_ucode,
222 .lib = &iwl1000_lib, 222 .lib = &iwl1000_lib,
223 .hcmd = &iwl5000_hcmd, 223 .hcmd = &iwlagn_hcmd,
224 .utils = &iwl5000_hcmd_utils, 224 .utils = &iwlagn_hcmd_utils,
225 .led = &iwlagn_led_ops, 225 .led = &iwlagn_led_ops,
226}; 226};
227 227
@@ -234,10 +234,10 @@ struct iwl_cfg iwl1000_bgn_cfg = {
234 .ops = &iwl1000_ops, 234 .ops = &iwl1000_ops,
235 .eeprom_size = OTP_LOW_IMAGE_SIZE, 235 .eeprom_size = OTP_LOW_IMAGE_SIZE,
236 .eeprom_ver = EEPROM_1000_EEPROM_VERSION, 236 .eeprom_ver = EEPROM_1000_EEPROM_VERSION,
237 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, 237 .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION,
238 .num_of_queues = IWL50_NUM_QUEUES, 238 .num_of_queues = IWLAGN_NUM_QUEUES,
239 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES, 239 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
240 .mod_params = &iwl50_mod_params, 240 .mod_params = &iwlagn_mod_params,
241 .valid_tx_ant = ANT_A, 241 .valid_tx_ant = ANT_A,
242 .valid_rx_ant = ANT_AB, 242 .valid_rx_ant = ANT_AB,
243 .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, 243 .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
@@ -253,6 +253,7 @@ struct iwl_cfg iwl1000_bgn_cfg = {
253 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF, 253 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF,
254 .chain_noise_scale = 1000, 254 .chain_noise_scale = 1000,
255 .monitor_recover_period = IWL_MONITORING_PERIOD, 255 .monitor_recover_period = IWL_MONITORING_PERIOD,
256 .max_event_log_size = 128,
256}; 257};
257 258
258struct iwl_cfg iwl1000_bg_cfg = { 259struct iwl_cfg iwl1000_bg_cfg = {
@@ -264,10 +265,10 @@ struct iwl_cfg iwl1000_bg_cfg = {
264 .ops = &iwl1000_ops, 265 .ops = &iwl1000_ops,
265 .eeprom_size = OTP_LOW_IMAGE_SIZE, 266 .eeprom_size = OTP_LOW_IMAGE_SIZE,
266 .eeprom_ver = EEPROM_1000_EEPROM_VERSION, 267 .eeprom_ver = EEPROM_1000_EEPROM_VERSION,
267 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, 268 .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION,
268 .num_of_queues = IWL50_NUM_QUEUES, 269 .num_of_queues = IWLAGN_NUM_QUEUES,
269 .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES, 270 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
270 .mod_params = &iwl50_mod_params, 271 .mod_params = &iwlagn_mod_params,
271 .valid_tx_ant = ANT_A, 272 .valid_tx_ant = ANT_A,
272 .valid_rx_ant = ANT_AB, 273 .valid_rx_ant = ANT_AB,
273 .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, 274 .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
@@ -282,6 +283,7 @@ struct iwl_cfg iwl1000_bg_cfg = {
282 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF, 283 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF,
283 .chain_noise_scale = 1000, 284 .chain_noise_scale = 1000,
284 .monitor_recover_period = IWL_MONITORING_PERIOD, 285 .monitor_recover_period = IWL_MONITORING_PERIOD,
286 .max_event_log_size = 128,
285}; 287};
286 288
287MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX)); 289MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX));