aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-dev.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-dev.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h76
1 files changed, 41 insertions, 35 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index a36a6ef45aae..fc6072cdd96f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -48,25 +48,6 @@
48#include "iwl-power.h" 48#include "iwl-power.h"
49#include "iwl-agn-rs.h" 49#include "iwl-agn-rs.h"
50 50
51/* configuration for the iwl4965 */
52extern struct iwl_cfg iwl4965_agn_cfg;
53extern struct iwl_cfg iwl5300_agn_cfg;
54extern struct iwl_cfg iwl5100_agn_cfg;
55extern struct iwl_cfg iwl5350_agn_cfg;
56extern struct iwl_cfg iwl5100_bgn_cfg;
57extern struct iwl_cfg iwl5100_abg_cfg;
58extern struct iwl_cfg iwl5150_agn_cfg;
59extern struct iwl_cfg iwl5150_abg_cfg;
60extern struct iwl_cfg iwl6000g2a_2agn_cfg;
61extern struct iwl_cfg iwl6000i_2agn_cfg;
62extern struct iwl_cfg iwl6000i_2abg_cfg;
63extern struct iwl_cfg iwl6000i_2bg_cfg;
64extern struct iwl_cfg iwl6000_3agn_cfg;
65extern struct iwl_cfg iwl6050_2agn_cfg;
66extern struct iwl_cfg iwl6050_2abg_cfg;
67extern struct iwl_cfg iwl1000_bgn_cfg;
68extern struct iwl_cfg iwl1000_bg_cfg;
69
70struct iwl_tx_queue; 51struct iwl_tx_queue;
71 52
72/* CT-KILL constants */ 53/* CT-KILL constants */
@@ -133,8 +114,8 @@ struct iwl_cmd_meta {
133 * structure is stored at the end of the shared queue memory. */ 114 * structure is stored at the end of the shared queue memory. */
134 u32 flags; 115 u32 flags;
135 116
136 DECLARE_PCI_UNMAP_ADDR(mapping) 117 DEFINE_DMA_UNMAP_ADDR(mapping);
137 DECLARE_PCI_UNMAP_LEN(len) 118 DEFINE_DMA_UNMAP_LEN(len);
138}; 119};
139 120
140/* 121/*
@@ -161,7 +142,7 @@ struct iwl_queue {
161 142
162/* One for each TFD */ 143/* One for each TFD */
163struct iwl_tx_info { 144struct iwl_tx_info {
164 struct sk_buff *skb[IWL_NUM_OF_TBS - 1]; 145 struct sk_buff *skb;
165}; 146};
166 147
167/** 148/**
@@ -433,7 +414,7 @@ struct iwl_ht_agg {
433 414
434 415
435struct iwl_tid_data { 416struct iwl_tid_data {
436 u16 seq_number; 417 u16 seq_number; /* agn only */
437 u16 tfds_in_queue; 418 u16 tfds_in_queue;
438 struct iwl_ht_agg agg; 419 struct iwl_ht_agg agg;
439}; 420};
@@ -583,6 +564,12 @@ enum iwl_ucode_tlv_type {
583 IWL_UCODE_TLV_INIT_DATA = 4, 564 IWL_UCODE_TLV_INIT_DATA = 4,
584 IWL_UCODE_TLV_BOOT = 5, 565 IWL_UCODE_TLV_BOOT = 5,
585 IWL_UCODE_TLV_PROBE_MAX_LEN = 6, /* a u32 value */ 566 IWL_UCODE_TLV_PROBE_MAX_LEN = 6, /* a u32 value */
567 IWL_UCODE_TLV_RUNT_EVTLOG_PTR = 8,
568 IWL_UCODE_TLV_RUNT_EVTLOG_SIZE = 9,
569 IWL_UCODE_TLV_RUNT_ERRLOG_PTR = 10,
570 IWL_UCODE_TLV_INIT_EVTLOG_PTR = 11,
571 IWL_UCODE_TLV_INIT_EVTLOG_SIZE = 12,
572 IWL_UCODE_TLV_INIT_ERRLOG_PTR = 13,
586}; 573};
587 574
588struct iwl_ucode_tlv { 575struct iwl_ucode_tlv {
@@ -675,6 +662,7 @@ struct iwl_sensitivity_ranges {
675 * @sw_crypto: 0 for hw, 1 for sw 662 * @sw_crypto: 0 for hw, 1 for sw
676 * @max_xxx_size: for ucode uses 663 * @max_xxx_size: for ucode uses
677 * @ct_kill_threshold: temperature threshold 664 * @ct_kill_threshold: temperature threshold
665 * @beacon_time_tsf_bits: number of valid tsf bits for beacon time
678 * @calib_init_cfg: setup initial calibrations for the hw 666 * @calib_init_cfg: setup initial calibrations for the hw
679 * @struct iwl_sensitivity_ranges: range of sensitivity values 667 * @struct iwl_sensitivity_ranges: range of sensitivity values
680 */ 668 */
@@ -701,6 +689,7 @@ struct iwl_hw_params {
701 u32 ct_kill_threshold; /* value in hw-dependent units */ 689 u32 ct_kill_threshold; /* value in hw-dependent units */
702 u32 ct_kill_exit_threshold; /* value in hw-dependent units */ 690 u32 ct_kill_exit_threshold; /* value in hw-dependent units */
703 /* for 1000, 6000 series and up */ 691 /* for 1000, 6000 series and up */
692 u16 beacon_time_tsf_bits;
704 u32 calib_init_cfg; 693 u32 calib_init_cfg;
705 const struct iwl_sensitivity_ranges *sens; 694 const struct iwl_sensitivity_ranges *sens;
706}; 695};
@@ -1075,6 +1064,20 @@ struct iwl_force_reset {
1075 unsigned long last_force_reset_jiffies; 1064 unsigned long last_force_reset_jiffies;
1076}; 1065};
1077 1066
1067/* extend beacon time format bit shifting */
1068/*
1069 * for _3945 devices
1070 * bits 31:24 - extended
1071 * bits 23:0 - interval
1072 */
1073#define IWL3945_EXT_BEACON_TIME_POS 24
1074/*
1075 * for _agn devices
1076 * bits 31:22 - extended
1077 * bits 21:0 - interval
1078 */
1079#define IWLAGN_EXT_BEACON_TIME_POS 22
1080
1078struct iwl_priv { 1081struct iwl_priv {
1079 1082
1080 /* ieee device used by generic ieee processing code */ 1083 /* ieee device used by generic ieee processing code */
@@ -1109,7 +1112,7 @@ struct iwl_priv {
1109 /* force reset */ 1112 /* force reset */
1110 struct iwl_force_reset force_reset[IWL_MAX_FORCE_RESET]; 1113 struct iwl_force_reset force_reset[IWL_MAX_FORCE_RESET];
1111 1114
1112 /* we allocate array of iwl4965_channel_info for NIC's valid channels. 1115 /* we allocate array of iwl_channel_info for NIC's valid channels.
1113 * Access via channel # using indirect index array */ 1116 * Access via channel # using indirect index array */
1114 struct iwl_channel_info *channel_info; /* channel info array */ 1117 struct iwl_channel_info *channel_info; /* channel info array */
1115 u8 channel_count; /* # of channels */ 1118 u8 channel_count; /* # of channels */
@@ -1127,6 +1130,7 @@ struct iwl_priv {
1127 void *scan_cmd; 1130 void *scan_cmd;
1128 enum ieee80211_band scan_band; 1131 enum ieee80211_band scan_band;
1129 struct cfg80211_scan_request *scan_request; 1132 struct cfg80211_scan_request *scan_request;
1133 struct ieee80211_vif *scan_vif;
1130 bool is_internal_short_scan; 1134 bool is_internal_short_scan;
1131 u8 scan_tx_ant[IEEE80211_NUM_BANDS]; 1135 u8 scan_tx_ant[IEEE80211_NUM_BANDS];
1132 u8 mgmt_tx_ant; 1136 u8 mgmt_tx_ant;
@@ -1174,7 +1178,7 @@ struct iwl_priv {
1174 struct iwl_switch_rxon switch_rxon; 1178 struct iwl_switch_rxon switch_rxon;
1175 1179
1176 /* 1st responses from initialize and runtime uCode images. 1180 /* 1st responses from initialize and runtime uCode images.
1177 * 4965's initialize alive response contains some calibration data. */ 1181 * _agn's initialize alive response contains some calibration data. */
1178 struct iwl_init_alive_resp card_alive_init; 1182 struct iwl_init_alive_resp card_alive_init;
1179 struct iwl_alive_resp card_alive; 1183 struct iwl_alive_resp card_alive;
1180 1184
@@ -1221,7 +1225,7 @@ struct iwl_priv {
1221 struct iwl_tt_mgmt thermal_throttle; 1225 struct iwl_tt_mgmt thermal_throttle;
1222 1226
1223 struct iwl_notif_statistics statistics; 1227 struct iwl_notif_statistics statistics;
1224#ifdef CONFIG_IWLWIFI_DEBUG 1228#ifdef CONFIG_IWLWIFI_DEBUGFS
1225 struct iwl_notif_statistics accum_statistics; 1229 struct iwl_notif_statistics accum_statistics;
1226 struct iwl_notif_statistics delta_statistics; 1230 struct iwl_notif_statistics delta_statistics;
1227 struct iwl_notif_statistics max_delta; 1231 struct iwl_notif_statistics max_delta;
@@ -1229,9 +1233,10 @@ struct iwl_priv {
1229 1233
1230 /* context information */ 1234 /* context information */
1231 u8 bssid[ETH_ALEN]; /* used only on 3945 but filled by core */ 1235 u8 bssid[ETH_ALEN]; /* used only on 3945 but filled by core */
1232 u8 mac_addr[ETH_ALEN];
1233 1236
1234 /*station table variables */ 1237 /* station table variables */
1238
1239 /* Note: if lock and sta_lock are needed, lock must be acquired first */
1235 spinlock_t sta_lock; 1240 spinlock_t sta_lock;
1236 int num_stations; 1241 int num_stations;
1237 struct iwl_station_entry stations[IWL_STATION_COUNT]; 1242 struct iwl_station_entry stations[IWL_STATION_COUNT];
@@ -1273,7 +1278,7 @@ struct iwl_priv {
1273 struct delayed_work rfkill_poll; 1278 struct delayed_work rfkill_poll;
1274 1279
1275 struct iwl3945_notif_statistics statistics; 1280 struct iwl3945_notif_statistics statistics;
1276#ifdef CONFIG_IWLWIFI_DEBUG 1281#ifdef CONFIG_IWLWIFI_DEBUGFS
1277 struct iwl3945_notif_statistics accum_statistics; 1282 struct iwl3945_notif_statistics accum_statistics;
1278 struct iwl3945_notif_statistics delta_statistics; 1283 struct iwl3945_notif_statistics delta_statistics;
1279 struct iwl3945_notif_statistics max_delta; 1284 struct iwl3945_notif_statistics max_delta;
@@ -1315,6 +1320,9 @@ struct iwl_priv {
1315 bool last_phy_res_valid; 1320 bool last_phy_res_valid;
1316 1321
1317 struct completion firmware_loading_complete; 1322 struct completion firmware_loading_complete;
1323
1324 u32 init_evtlog_ptr, init_evtlog_size, init_errlog_ptr;
1325 u32 inst_evtlog_ptr, inst_evtlog_size, inst_errlog_ptr;
1318 } _agn; 1326 } _agn;
1319#endif 1327#endif
1320 }; 1328 };
@@ -1353,9 +1361,7 @@ struct iwl_priv {
1353 /* debugging info */ 1361 /* debugging info */
1354 u32 debug_level; /* per device debugging will override global 1362 u32 debug_level; /* per device debugging will override global
1355 iwl_debug_level if set */ 1363 iwl_debug_level if set */
1356 u32 framecnt_to_us; 1364#endif /* CONFIG_IWLWIFI_DEBUG */
1357 atomic_t restrict_refcnt;
1358 bool disable_ht40;
1359#ifdef CONFIG_IWLWIFI_DEBUGFS 1365#ifdef CONFIG_IWLWIFI_DEBUGFS
1360 /* debugfs */ 1366 /* debugfs */
1361 u16 tx_traffic_idx; 1367 u16 tx_traffic_idx;
@@ -1364,8 +1370,8 @@ struct iwl_priv {
1364 u8 *rx_traffic; 1370 u8 *rx_traffic;
1365 struct dentry *debugfs_dir; 1371 struct dentry *debugfs_dir;
1366 u32 dbgfs_sram_offset, dbgfs_sram_len; 1372 u32 dbgfs_sram_offset, dbgfs_sram_len;
1373 bool disable_ht40;
1367#endif /* CONFIG_IWLWIFI_DEBUGFS */ 1374#endif /* CONFIG_IWLWIFI_DEBUGFS */
1368#endif /* CONFIG_IWLWIFI_DEBUG */
1369 1375
1370 struct work_struct txpower_work; 1376 struct work_struct txpower_work;
1371 u32 disable_sens_cal; 1377 u32 disable_sens_cal;
@@ -1419,9 +1425,9 @@ static inline u32 iwl_get_debug_level(struct iwl_priv *priv)
1419static inline struct ieee80211_hdr *iwl_tx_queue_get_hdr(struct iwl_priv *priv, 1425static inline struct ieee80211_hdr *iwl_tx_queue_get_hdr(struct iwl_priv *priv,
1420 int txq_id, int idx) 1426 int txq_id, int idx)
1421{ 1427{
1422 if (priv->txq[txq_id].txb[idx].skb[0]) 1428 if (priv->txq[txq_id].txb[idx].skb)
1423 return (struct ieee80211_hdr *)priv->txq[txq_id]. 1429 return (struct ieee80211_hdr *)priv->txq[txq_id].
1424 txb[idx].skb[0]->data; 1430 txb[idx].skb->data;
1425 return NULL; 1431 return NULL;
1426} 1432}
1427 1433