diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-dev.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 99 |
1 files changed, 24 insertions, 75 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index c235a1ea71b4..f70219c3b122 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/slab.h> | 38 | #include <linux/slab.h> |
39 | #include <linux/mutex.h> | 39 | #include <linux/mutex.h> |
40 | 40 | ||
41 | #include "iwl-fw.h" | ||
41 | #include "iwl-eeprom.h" | 42 | #include "iwl-eeprom.h" |
42 | #include "iwl-csr.h" | 43 | #include "iwl-csr.h" |
43 | #include "iwl-debug.h" | 44 | #include "iwl-debug.h" |
@@ -47,7 +48,6 @@ | |||
47 | #include "iwl-agn-rs.h" | 48 | #include "iwl-agn-rs.h" |
48 | #include "iwl-agn-tt.h" | 49 | #include "iwl-agn-tt.h" |
49 | #include "iwl-trans.h" | 50 | #include "iwl-trans.h" |
50 | #include "iwl-shared.h" | ||
51 | #include "iwl-op-mode.h" | 51 | #include "iwl-op-mode.h" |
52 | #include "iwl-notif-wait.h" | 52 | #include "iwl-notif-wait.h" |
53 | 53 | ||
@@ -194,6 +194,7 @@ struct iwl_qos_info { | |||
194 | * These states relate to a specific RA / TID. | 194 | * These states relate to a specific RA / TID. |
195 | * | 195 | * |
196 | * @IWL_AGG_OFF: aggregation is not used | 196 | * @IWL_AGG_OFF: aggregation is not used |
197 | * @IWL_AGG_STARTING: aggregation are starting (between start and oper) | ||
197 | * @IWL_AGG_ON: aggregation session is up | 198 | * @IWL_AGG_ON: aggregation session is up |
198 | * @IWL_EMPTYING_HW_QUEUE_ADDBA: establishing a BA session - waiting for the | 199 | * @IWL_EMPTYING_HW_QUEUE_ADDBA: establishing a BA session - waiting for the |
199 | * HW queue to be empty from packets for this RA /TID. | 200 | * HW queue to be empty from packets for this RA /TID. |
@@ -202,6 +203,7 @@ struct iwl_qos_info { | |||
202 | */ | 203 | */ |
203 | enum iwl_agg_state { | 204 | enum iwl_agg_state { |
204 | IWL_AGG_OFF = 0, | 205 | IWL_AGG_OFF = 0, |
206 | IWL_AGG_STARTING, | ||
205 | IWL_AGG_ON, | 207 | IWL_AGG_ON, |
206 | IWL_EMPTYING_HW_QUEUE_ADDBA, | 208 | IWL_EMPTYING_HW_QUEUE_ADDBA, |
207 | IWL_EMPTYING_HW_QUEUE_DELBA, | 209 | IWL_EMPTYING_HW_QUEUE_DELBA, |
@@ -504,44 +506,6 @@ struct reply_agg_tx_error_statistics { | |||
504 | u32 unknown; | 506 | u32 unknown; |
505 | }; | 507 | }; |
506 | 508 | ||
507 | /* management statistics */ | ||
508 | enum iwl_mgmt_stats { | ||
509 | MANAGEMENT_ASSOC_REQ = 0, | ||
510 | MANAGEMENT_ASSOC_RESP, | ||
511 | MANAGEMENT_REASSOC_REQ, | ||
512 | MANAGEMENT_REASSOC_RESP, | ||
513 | MANAGEMENT_PROBE_REQ, | ||
514 | MANAGEMENT_PROBE_RESP, | ||
515 | MANAGEMENT_BEACON, | ||
516 | MANAGEMENT_ATIM, | ||
517 | MANAGEMENT_DISASSOC, | ||
518 | MANAGEMENT_AUTH, | ||
519 | MANAGEMENT_DEAUTH, | ||
520 | MANAGEMENT_ACTION, | ||
521 | MANAGEMENT_MAX, | ||
522 | }; | ||
523 | /* control statistics */ | ||
524 | enum iwl_ctrl_stats { | ||
525 | CONTROL_BACK_REQ = 0, | ||
526 | CONTROL_BACK, | ||
527 | CONTROL_PSPOLL, | ||
528 | CONTROL_RTS, | ||
529 | CONTROL_CTS, | ||
530 | CONTROL_ACK, | ||
531 | CONTROL_CFEND, | ||
532 | CONTROL_CFENDACK, | ||
533 | CONTROL_MAX, | ||
534 | }; | ||
535 | |||
536 | struct traffic_stats { | ||
537 | #ifdef CONFIG_IWLWIFI_DEBUGFS | ||
538 | u32 mgmt[MANAGEMENT_MAX]; | ||
539 | u32 ctrl[CONTROL_MAX]; | ||
540 | u32 data_cnt; | ||
541 | u64 data_bytes; | ||
542 | #endif | ||
543 | }; | ||
544 | |||
545 | /* | 509 | /* |
546 | * schedule the timer to wake up every UCODE_TRACE_PERIOD milliseconds | 510 | * schedule the timer to wake up every UCODE_TRACE_PERIOD milliseconds |
547 | * to perform continuous uCode event logging operation if enabled | 511 | * to perform continuous uCode event logging operation if enabled |
@@ -568,25 +532,8 @@ struct iwl_event_log { | |||
568 | int wraps_more_count; | 532 | int wraps_more_count; |
569 | }; | 533 | }; |
570 | 534 | ||
571 | /* | ||
572 | * This is the threshold value of plcp error rate per 100mSecs. It is | ||
573 | * used to set and check for the validity of plcp_delta. | ||
574 | */ | ||
575 | #define IWL_MAX_PLCP_ERR_THRESHOLD_MIN (1) | ||
576 | #define IWL_MAX_PLCP_ERR_THRESHOLD_DEF (50) | ||
577 | #define IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF (100) | ||
578 | #define IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF (200) | ||
579 | #define IWL_MAX_PLCP_ERR_THRESHOLD_MAX (255) | ||
580 | #define IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE (0) | ||
581 | |||
582 | #define IWL_DELAY_NEXT_FORCE_RF_RESET (HZ*3) | 535 | #define IWL_DELAY_NEXT_FORCE_RF_RESET (HZ*3) |
583 | 536 | ||
584 | /* TX queue watchdog timeouts in mSecs */ | ||
585 | #define IWL_WATCHHDOG_DISABLED (0) | ||
586 | #define IWL_DEF_WD_TIMEOUT (2000) | ||
587 | #define IWL_LONG_WD_TIMEOUT (10000) | ||
588 | #define IWL_MAX_WD_TIMEOUT (120000) | ||
589 | |||
590 | /* BT Antenna Coupling Threshold (dB) */ | 537 | /* BT Antenna Coupling Threshold (dB) */ |
591 | #define IWL_BT_ANTENNA_COUPLING_THRESHOLD (35) | 538 | #define IWL_BT_ANTENNA_COUPLING_THRESHOLD (35) |
592 | 539 | ||
@@ -602,6 +549,13 @@ struct iwl_rf_reset { | |||
602 | unsigned long last_reset_jiffies; | 549 | unsigned long last_reset_jiffies; |
603 | }; | 550 | }; |
604 | 551 | ||
552 | enum iwl_rxon_context_id { | ||
553 | IWL_RXON_CTX_BSS, | ||
554 | IWL_RXON_CTX_PAN, | ||
555 | |||
556 | NUM_IWL_RXON_CTX | ||
557 | }; | ||
558 | |||
605 | /* extend beacon time format bit shifting */ | 559 | /* extend beacon time format bit shifting */ |
606 | /* | 560 | /* |
607 | * for _agn devices | 561 | * for _agn devices |
@@ -742,12 +696,15 @@ struct iwl_wipan_noa_data { | |||
742 | }; | 696 | }; |
743 | 697 | ||
744 | /* Calibration disabling bit mask */ | 698 | /* Calibration disabling bit mask */ |
745 | #define IWL_SENSITIVITY_CALIB_DISABLED BIT(1) | 699 | enum { |
746 | #define IWL_CHAIN_NOISE_CALIB_DISABLED BIT(2) | 700 | IWL_CALIB_ENABLE_ALL = 0, |
747 | #define IWL_TX_POWER_CALIB_DISABLED BIT(3) | 701 | |
702 | IWL_SENSITIVITY_CALIB_DISABLED = BIT(0), | ||
703 | IWL_CHAIN_NOISE_CALIB_DISABLED = BIT(1), | ||
704 | IWL_TX_POWER_CALIB_DISABLED = BIT(2), | ||
748 | 705 | ||
749 | #define IWL_CALIB_ENABLE_ALL 0 | 706 | IWL_CALIB_DISABLE_ALL = 0xFFFFFFFF, |
750 | #define IWL_CALIB_DISABLE_ALL 0xFFFFFFFF | 707 | }; |
751 | 708 | ||
752 | #define IWL_OP_MODE_GET_DVM(_iwl_op_mode) \ | 709 | #define IWL_OP_MODE_GET_DVM(_iwl_op_mode) \ |
753 | ((struct iwl_priv *) ((_iwl_op_mode)->op_mode_specific)) | 710 | ((struct iwl_priv *) ((_iwl_op_mode)->op_mode_specific)) |
@@ -758,8 +715,9 @@ struct iwl_wipan_noa_data { | |||
758 | 715 | ||
759 | struct iwl_priv { | 716 | struct iwl_priv { |
760 | 717 | ||
761 | /*data shared among all the driver's layers */ | 718 | struct iwl_trans *trans; |
762 | struct iwl_shared *shrd; | 719 | struct device *dev; /* for debug prints only */ |
720 | const struct iwl_cfg *cfg; | ||
763 | const struct iwl_fw *fw; | 721 | const struct iwl_fw *fw; |
764 | const struct iwl_lib_ops *lib; | 722 | const struct iwl_lib_ops *lib; |
765 | unsigned long status; | 723 | unsigned long status; |
@@ -769,9 +727,9 @@ struct iwl_priv { | |||
769 | 727 | ||
770 | unsigned long transport_queue_stop; | 728 | unsigned long transport_queue_stop; |
771 | bool passive_no_rx; | 729 | bool passive_no_rx; |
772 | #define IWL_INVALID_AC 0xff | 730 | #define IWL_INVALID_MAC80211_QUEUE 0xff |
773 | u8 queue_to_ac[IWL_MAX_HW_QUEUES]; | 731 | u8 queue_to_mac80211[IWL_MAX_HW_QUEUES]; |
774 | atomic_t ac_stop_count[IEEE80211_NUM_ACS]; | 732 | atomic_t queue_stop_count[IWL_MAX_HW_QUEUES]; |
775 | 733 | ||
776 | unsigned long agg_q_alloc[BITS_TO_LONGS(IWL_MAX_HW_QUEUES)]; | 734 | unsigned long agg_q_alloc[BITS_TO_LONGS(IWL_MAX_HW_QUEUES)]; |
777 | 735 | ||
@@ -880,10 +838,6 @@ struct iwl_priv { | |||
880 | 838 | ||
881 | int activity_timer_active; | 839 | int activity_timer_active; |
882 | 840 | ||
883 | /* counts mgmt, ctl, and data packets */ | ||
884 | struct traffic_stats tx_stats; | ||
885 | struct traffic_stats rx_stats; | ||
886 | |||
887 | struct iwl_power_mgr power_data; | 841 | struct iwl_power_mgr power_data; |
888 | struct iwl_tt_mgmt thermal_throttle; | 842 | struct iwl_tt_mgmt thermal_throttle; |
889 | 843 | ||
@@ -1003,10 +957,6 @@ struct iwl_priv { | |||
1003 | 957 | ||
1004 | #ifdef CONFIG_IWLWIFI_DEBUGFS | 958 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
1005 | /* debugfs */ | 959 | /* debugfs */ |
1006 | u16 tx_traffic_idx; | ||
1007 | u16 rx_traffic_idx; | ||
1008 | u8 *tx_traffic; | ||
1009 | u8 *rx_traffic; | ||
1010 | struct dentry *debugfs_dir; | 960 | struct dentry *debugfs_dir; |
1011 | u32 dbgfs_sram_offset, dbgfs_sram_len; | 961 | u32 dbgfs_sram_offset, dbgfs_sram_len; |
1012 | bool disable_ht40; | 962 | bool disable_ht40; |
@@ -1051,7 +1001,6 @@ struct iwl_priv { | |||
1051 | }; /*iwl_priv */ | 1001 | }; /*iwl_priv */ |
1052 | 1002 | ||
1053 | extern struct kmem_cache *iwl_tx_cmd_pool; | 1003 | extern struct kmem_cache *iwl_tx_cmd_pool; |
1054 | extern struct iwl_mod_params iwlagn_mod_params; | ||
1055 | 1004 | ||
1056 | static inline struct iwl_rxon_context * | 1005 | static inline struct iwl_rxon_context * |
1057 | iwl_rxon_ctx_from_vif(struct ieee80211_vif *vif) | 1006 | iwl_rxon_ctx_from_vif(struct ieee80211_vif *vif) |