aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-core.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-core.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h129
1 files changed, 74 insertions, 55 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 5daa1893fd0..6228b1c2ec9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -255,20 +255,12 @@ struct iwl_mod_params {
255 int restart_fw; /* def: 1 = restart firmware */ 255 int restart_fw; /* def: 1 = restart firmware */
256}; 256};
257 257
258/** 258/*
259 * struct iwl_cfg
260 * @fw_name_pre: Firmware filename prefix. The api version and extension
261 * (.ucode) will be added to filename before loading from disk. The
262 * filename is constructed as fw_name_pre<api>.ucode.
263 * @ucode_api_max: Highest version of uCode API supported by driver.
264 * @ucode_api_min: Lowest version of uCode API supported by driver.
265 * @pa_type: used by 6000 series only to identify the type of Power Amplifier
266 * @max_ll_items: max number of OTP blocks 259 * @max_ll_items: max number of OTP blocks
267 * @shadow_ram_support: shadow support for OTP memory 260 * @shadow_ram_support: shadow support for OTP memory
268 * @led_compensation: compensate on the led on/off time per HW according 261 * @led_compensation: compensate on the led on/off time per HW according
269 * to the deviation to achieve the desired led frequency. 262 * to the deviation to achieve the desired led frequency.
270 * The detail algorithm is described in iwl-led.c 263 * The detail algorithm is described in iwl-led.c
271 * @use_rts_for_aggregation: use rts/cts protection for HT traffic
272 * @chain_noise_num_beacons: number of beacons used to compute chain noise 264 * @chain_noise_num_beacons: number of beacons used to compute chain noise
273 * @adv_thermal_throttle: support advance thermal throttle 265 * @adv_thermal_throttle: support advance thermal throttle
274 * @support_ct_kill_exit: support ct kill exit condition 266 * @support_ct_kill_exit: support ct kill exit condition
@@ -286,15 +278,73 @@ struct iwl_mod_params {
286 * sensitivity calibration operation 278 * sensitivity calibration operation
287 * @chain_noise_calib_by_driver: driver has the capability to perform 279 * @chain_noise_calib_by_driver: driver has the capability to perform
288 * chain noise calibration operation 280 * chain noise calibration operation
289 * @scan_antennas: available antenna for scan operation 281*/
282struct iwl_base_params {
283 int eeprom_size;
284 int num_of_queues; /* def: HW dependent */
285 int num_of_ampdu_queues;/* def: HW dependent */
286 /* for iwl_apm_init() */
287 u32 pll_cfg_val;
288 bool set_l0s;
289 bool use_bsm;
290
291 bool use_isr_legacy;
292 const u16 max_ll_items;
293 const bool shadow_ram_support;
294 u16 led_compensation;
295 const bool broken_powersave;
296 int chain_noise_num_beacons;
297 const bool supports_idle;
298 bool adv_thermal_throttle;
299 bool support_ct_kill_exit;
300 const bool support_wimax_coexist;
301 u8 plcp_delta_threshold;
302 s32 chain_noise_scale;
303 /* timer period for monitor the driver queues */
304 u32 monitor_recover_period;
305 bool temperature_kelvin;
306 u32 max_event_log_size;
307 const bool tx_power_by_driver;
308 const bool ucode_tracing;
309 const bool sensitivity_calib_by_driver;
310 const bool chain_noise_calib_by_driver;
311};
312/*
290 * @advanced_bt_coexist: support advanced bt coexist 313 * @advanced_bt_coexist: support advanced bt coexist
291 * @bt_init_traffic_load: specify initial bt traffic load 314 * @bt_init_traffic_load: specify initial bt traffic load
292 * @bt_prio_boost: default bt priority boost value 315 * @bt_prio_boost: default bt priority boost value
293 * @need_dc_calib: need to perform init dc calibration
294 * @bt_statistics: use BT version of statistics notification 316 * @bt_statistics: use BT version of statistics notification
295 * @agg_time_limit: maximum number of uSec in aggregation 317 * @agg_time_limit: maximum number of uSec in aggregation
296 * @ampdu_factor: Maximum A-MPDU length factor 318 * @ampdu_factor: Maximum A-MPDU length factor
297 * @ampdu_density: Minimum A-MPDU spacing 319 * @ampdu_density: Minimum A-MPDU spacing
320*/
321struct iwl_bt_params {
322 bool advanced_bt_coexist;
323 u8 bt_init_traffic_load;
324 u8 bt_prio_boost;
325 const bool bt_statistics;
326 u16 agg_time_limit;
327 u8 ampdu_factor;
328 u8 ampdu_density;
329};
330/*
331 * @use_rts_for_aggregation: use rts/cts protection for HT traffic
332*/
333struct iwl_ht_params {
334 const bool ht_greenfield_support; /* if used set to true */
335 bool use_rts_for_aggregation;
336};
337
338/**
339 * struct iwl_cfg
340 * @fw_name_pre: Firmware filename prefix. The api version and extension
341 * (.ucode) will be added to filename before loading from disk. The
342 * filename is constructed as fw_name_pre<api>.ucode.
343 * @ucode_api_max: Highest version of uCode API supported by driver.
344 * @ucode_api_min: Lowest version of uCode API supported by driver.
345 * @pa_type: used by 6000 series only to identify the type of Power Amplifier
346 * @need_dc_calib: need to perform init dc calibration
347 * @scan_antennas: available antenna for scan operation
298 * 348 *
299 * We enable the driver to be backward compatible wrt API version. The 349 * We enable the driver to be backward compatible wrt API version. The
300 * driver specifies which APIs it supports (with @ucode_api_max being the 350 * driver specifies which APIs it supports (with @ucode_api_max being the
@@ -305,9 +355,9 @@ struct iwl_mod_params {
305 * 355 *
306 * For example, 356 * For example,
307 * if (IWL_UCODE_API(priv->ucode_ver) >= 2) { 357 * if (IWL_UCODE_API(priv->ucode_ver) >= 2) {
308 * Driver interacts with Firmware API version >= 2. 358 * Driver interacts with Firmware API version >= 2.
309 * } else { 359 * } else {
310 * Driver interacts with Firmware API version 1. 360 * Driver interacts with Firmware API version 1.
311 * } 361 * }
312 * 362 *
313 * The ideal usage of this infrastructure is to treat a new ucode API 363 * The ideal usage of this infrastructure is to treat a new ucode API
@@ -318,59 +368,28 @@ struct iwl_mod_params {
318 * 368 *
319 */ 369 */
320struct iwl_cfg { 370struct iwl_cfg {
371 /* params specific to an individual device within a device family */
321 const char *name; 372 const char *name;
322 const char *fw_name_pre; 373 const char *fw_name_pre;
323 const unsigned int ucode_api_max; 374 const unsigned int ucode_api_max;
324 const unsigned int ucode_api_min; 375 const unsigned int ucode_api_min;
376 u8 valid_tx_ant;
377 u8 valid_rx_ant;
325 unsigned int sku; 378 unsigned int sku;
326 int eeprom_size;
327 u16 eeprom_ver; 379 u16 eeprom_ver;
328 u16 eeprom_calib_ver; 380 u16 eeprom_calib_ver;
329 int num_of_queues; /* def: HW dependent */
330 int num_of_ampdu_queues;/* def: HW dependent */
331 const struct iwl_ops *ops; 381 const struct iwl_ops *ops;
382 /* module based parameters which can be set from modprobe cmd */
332 const struct iwl_mod_params *mod_params; 383 const struct iwl_mod_params *mod_params;
333 u8 valid_tx_ant; 384 /* params not likely to change within a device family */
334 u8 valid_rx_ant; 385 struct iwl_base_params *base_params;
335 386 /* params likely to change within a device family */
336 /* for iwl_apm_init() */ 387 struct iwl_ht_params *ht_params;
337 u32 pll_cfg_val; 388 struct iwl_bt_params *bt_params;
338 bool set_l0s; 389 enum iwl_pa_type pa_type; /* if used set to IWL_PA_SYSTEM */
339 bool use_bsm; 390 const bool need_dc_calib; /* if used set to true */
340
341 bool use_isr_legacy;
342 enum iwl_pa_type pa_type;
343 const u16 max_ll_items;
344 const bool shadow_ram_support;
345 const bool ht_greenfield_support;
346 u16 led_compensation;
347 const bool broken_powersave;
348 bool use_rts_for_aggregation;
349 int chain_noise_num_beacons;
350 const bool supports_idle;
351 bool adv_thermal_throttle;
352 bool support_ct_kill_exit;
353 const bool support_wimax_coexist;
354 u8 plcp_delta_threshold;
355 s32 chain_noise_scale;
356 /* timer period for monitor the driver queues */
357 u32 monitor_recover_period;
358 bool temperature_kelvin;
359 u32 max_event_log_size;
360 const bool tx_power_by_driver;
361 const bool ucode_tracing;
362 const bool sensitivity_calib_by_driver;
363 const bool chain_noise_calib_by_driver;
364 u8 scan_rx_antennas[IEEE80211_NUM_BANDS]; 391 u8 scan_rx_antennas[IEEE80211_NUM_BANDS];
365 u8 scan_tx_antennas[IEEE80211_NUM_BANDS]; 392 u8 scan_tx_antennas[IEEE80211_NUM_BANDS];
366 bool advanced_bt_coexist;
367 u8 bt_init_traffic_load;
368 u8 bt_prio_boost;
369 const bool need_dc_calib;
370 const bool bt_statistics;
371 u16 agg_time_limit;
372 u8 ampdu_factor;
373 u8 ampdu_density;
374}; 393};
375 394
376/*************************** 395/***************************