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.h66
1 files changed, 26 insertions, 40 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index a3474376fdbc..b316d833d9a2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -63,6 +63,8 @@
63#ifndef __iwl_core_h__ 63#ifndef __iwl_core_h__
64#define __iwl_core_h__ 64#define __iwl_core_h__
65 65
66#include "iwl-dev.h"
67
66/************************ 68/************************
67 * forward declarations * 69 * forward declarations *
68 ************************/ 70 ************************/
@@ -210,12 +212,7 @@ struct iwl_lib_ops {
210 212
211 /* temperature */ 213 /* temperature */
212 struct iwl_temp_ops temp_ops; 214 struct iwl_temp_ops temp_ops;
213 /* check for plcp health */ 215
214 bool (*check_plcp_health)(struct iwl_priv *priv,
215 struct iwl_rx_packet *pkt);
216 /* check for ack health */
217 bool (*check_ack_health)(struct iwl_priv *priv,
218 struct iwl_rx_packet *pkt);
219 int (*txfifo_flush)(struct iwl_priv *priv, u16 flush_control); 216 int (*txfifo_flush)(struct iwl_priv *priv, u16 flush_control);
220 void (*dev_txfifo_flush)(struct iwl_priv *priv, u16 flush_control); 217 void (*dev_txfifo_flush)(struct iwl_priv *priv, u16 flush_control);
221 218
@@ -227,8 +224,6 @@ struct iwl_lib_ops {
227 224
228struct iwl_led_ops { 225struct iwl_led_ops {
229 int (*cmd)(struct iwl_priv *priv, struct iwl_led_cmd *led_cmd); 226 int (*cmd)(struct iwl_priv *priv, struct iwl_led_cmd *led_cmd);
230 int (*on)(struct iwl_priv *priv);
231 int (*off)(struct iwl_priv *priv);
232}; 227};
233 228
234/* NIC specific ops */ 229/* NIC specific ops */
@@ -263,6 +258,8 @@ struct iwl_mod_params {
263 int amsdu_size_8K; /* def: 1 = enable 8K amsdu size */ 258 int amsdu_size_8K; /* def: 1 = enable 8K amsdu size */
264 int antenna; /* def: 0 = both antennas (use diversity) */ 259 int antenna; /* def: 0 = both antennas (use diversity) */
265 int restart_fw; /* def: 1 = restart firmware */ 260 int restart_fw; /* def: 1 = restart firmware */
261 bool plcp_check; /* def: true = enable plcp health check */
262 bool ack_check; /* def: false = disable ack health check */
266}; 263};
267 264
268/* 265/*
@@ -307,7 +304,6 @@ struct iwl_base_params {
307 u16 led_compensation; 304 u16 led_compensation;
308 const bool broken_powersave; 305 const bool broken_powersave;
309 int chain_noise_num_beacons; 306 int chain_noise_num_beacons;
310 const bool supports_idle;
311 bool adv_thermal_throttle; 307 bool adv_thermal_throttle;
312 bool support_ct_kill_exit; 308 bool support_ct_kill_exit;
313 const bool support_wimax_coexist; 309 const bool support_wimax_coexist;
@@ -342,6 +338,7 @@ struct iwl_bt_params {
342 u8 ampdu_factor; 338 u8 ampdu_factor;
343 u8 ampdu_density; 339 u8 ampdu_density;
344 bool bt_sco_disable; 340 bool bt_sco_disable;
341 bool bt_session_2;
345}; 342};
346/* 343/*
347 * @use_rts_for_aggregation: use rts/cts protection for HT traffic 344 * @use_rts_for_aggregation: use rts/cts protection for HT traffic
@@ -366,6 +363,7 @@ struct iwl_ht_params {
366 * @adv_pm: advance power management 363 * @adv_pm: advance power management
367 * @rx_with_siso_diversity: 1x1 device with rx antenna diversity 364 * @rx_with_siso_diversity: 1x1 device with rx antenna diversity
368 * @internal_wimax_coex: internal wifi/wimax combo device 365 * @internal_wimax_coex: internal wifi/wimax combo device
366 * @iq_invert: I/Q inversion
369 * 367 *
370 * We enable the driver to be backward compatible wrt API version. The 368 * We enable the driver to be backward compatible wrt API version. The
371 * driver specifies which APIs it supports (with @ucode_api_max being the 369 * driver specifies which APIs it supports (with @ucode_api_max being the
@@ -415,6 +413,7 @@ struct iwl_cfg {
415 const bool adv_pm; 413 const bool adv_pm;
416 const bool rx_with_siso_diversity; 414 const bool rx_with_siso_diversity;
417 const bool internal_wimax_coex; 415 const bool internal_wimax_coex;
416 const bool iq_invert;
418}; 417};
419 418
420/*************************** 419/***************************
@@ -444,10 +443,6 @@ bool iwl_is_ht40_tx_allowed(struct iwl_priv *priv,
444void iwl_connection_init_rx_config(struct iwl_priv *priv, 443void iwl_connection_init_rx_config(struct iwl_priv *priv,
445 struct iwl_rxon_context *ctx); 444 struct iwl_rxon_context *ctx);
446void iwl_set_rate(struct iwl_priv *priv); 445void iwl_set_rate(struct iwl_priv *priv);
447int iwl_set_decrypted_flag(struct iwl_priv *priv,
448 struct ieee80211_hdr *hdr,
449 u32 decrypt_res,
450 struct ieee80211_rx_status *stats);
451void iwl_irq_handle_error(struct iwl_priv *priv); 446void iwl_irq_handle_error(struct iwl_priv *priv);
452int iwl_mac_add_interface(struct ieee80211_hw *hw, 447int iwl_mac_add_interface(struct ieee80211_hw *hw,
453 struct ieee80211_vif *vif); 448 struct ieee80211_vif *vif);
@@ -494,46 +489,21 @@ static inline void iwl_dbg_log_rx_data_frame(struct iwl_priv *priv,
494static inline void iwl_update_stats(struct iwl_priv *priv, bool is_tx, 489static inline void iwl_update_stats(struct iwl_priv *priv, bool is_tx,
495 __le16 fc, u16 len) 490 __le16 fc, u16 len)
496{ 491{
497 struct traffic_stats *stats;
498
499 if (is_tx)
500 stats = &priv->tx_stats;
501 else
502 stats = &priv->rx_stats;
503
504 if (ieee80211_is_data(fc)) {
505 /* data */
506 stats->data_bytes += len;
507 }
508 iwl_leds_background(priv);
509} 492}
510#endif 493#endif
511/*****************************************************
512 * RX handlers.
513 * **************************************************/
514void iwl_rx_pm_sleep_notif(struct iwl_priv *priv,
515 struct iwl_rx_mem_buffer *rxb);
516void iwl_rx_pm_debug_statistics_notif(struct iwl_priv *priv,
517 struct iwl_rx_mem_buffer *rxb);
518void iwl_rx_reply_error(struct iwl_priv *priv,
519 struct iwl_rx_mem_buffer *rxb);
520 494
521/***************************************************** 495/*****************************************************
522* RX 496* RX
523******************************************************/ 497******************************************************/
524void iwl_cmd_queue_free(struct iwl_priv *priv); 498void iwl_cmd_queue_free(struct iwl_priv *priv);
499void iwl_cmd_queue_unmap(struct iwl_priv *priv);
525int iwl_rx_queue_alloc(struct iwl_priv *priv); 500int iwl_rx_queue_alloc(struct iwl_priv *priv);
526void iwl_rx_queue_update_write_ptr(struct iwl_priv *priv, 501void iwl_rx_queue_update_write_ptr(struct iwl_priv *priv,
527 struct iwl_rx_queue *q); 502 struct iwl_rx_queue *q);
528int iwl_rx_queue_space(const struct iwl_rx_queue *q); 503int iwl_rx_queue_space(const struct iwl_rx_queue *q);
529void iwl_tx_cmd_complete(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb); 504void iwl_tx_cmd_complete(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb);
530/* Handlers */ 505
531void iwl_rx_spectrum_measure_notif(struct iwl_priv *priv,
532 struct iwl_rx_mem_buffer *rxb);
533void iwl_recover_from_statistics(struct iwl_priv *priv,
534 struct iwl_rx_packet *pkt);
535void iwl_chswitch_done(struct iwl_priv *priv, bool is_success); 506void iwl_chswitch_done(struct iwl_priv *priv, bool is_success);
536void iwl_rx_csa(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb);
537 507
538/* TX helpers */ 508/* TX helpers */
539 509
@@ -546,6 +516,7 @@ int iwl_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq,
546void iwl_tx_queue_reset(struct iwl_priv *priv, struct iwl_tx_queue *txq, 516void iwl_tx_queue_reset(struct iwl_priv *priv, struct iwl_tx_queue *txq,
547 int slots_num, u32 txq_id); 517 int slots_num, u32 txq_id);
548void iwl_tx_queue_free(struct iwl_priv *priv, int txq_id); 518void iwl_tx_queue_free(struct iwl_priv *priv, int txq_id);
519void iwl_tx_queue_unmap(struct iwl_priv *priv, int txq_id);
549void iwl_setup_watchdog(struct iwl_priv *priv); 520void iwl_setup_watchdog(struct iwl_priv *priv);
550/***************************************************** 521/*****************************************************
551 * TX power 522 * TX power
@@ -582,6 +553,10 @@ u16 iwl_get_passive_dwell_time(struct iwl_priv *priv,
582 struct ieee80211_vif *vif); 553 struct ieee80211_vif *vif);
583void iwl_setup_scan_deferred_work(struct iwl_priv *priv); 554void iwl_setup_scan_deferred_work(struct iwl_priv *priv);
584void iwl_cancel_scan_deferred_work(struct iwl_priv *priv); 555void iwl_cancel_scan_deferred_work(struct iwl_priv *priv);
556int __must_check iwl_scan_initiate(struct iwl_priv *priv,
557 struct ieee80211_vif *vif,
558 enum iwl_scan_type scan_type,
559 enum ieee80211_band band);
585 560
586/* For faster active scanning, scan will move to the next channel if fewer than 561/* For faster active scanning, scan will move to the next channel if fewer than
587 * PLCP_QUIET_THRESH packets are heard on this channel within 562 * PLCP_QUIET_THRESH packets are heard on this channel within
@@ -755,6 +730,17 @@ static inline const struct ieee80211_supported_band *iwl_get_hw_mode(
755 return priv->hw->wiphy->bands[band]; 730 return priv->hw->wiphy->bands[band];
756} 731}
757 732
733static inline bool iwl_advanced_bt_coexist(struct iwl_priv *priv)
734{
735 return priv->cfg->bt_params &&
736 priv->cfg->bt_params->advanced_bt_coexist;
737}
738
739static inline bool iwl_bt_statistics(struct iwl_priv *priv)
740{
741 return priv->cfg->bt_params && priv->cfg->bt_params->bt_statistics;
742}
743
758extern bool bt_coex_active; 744extern bool bt_coex_active;
759extern bool bt_siso_mode; 745extern bool bt_siso_mode;
760 746