diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-04-05 12:41:49 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-07 15:49:41 -0400 |
commit | 3240cab3ddfb2637cfca3a078078cdeda44d0a99 (patch) | |
tree | c7947465a10490d184533e337b06c862574781d7 /drivers/net/wireless/iwlwifi/iwl-dev.h | |
parent | 68e022dfeb548b48635888d1392f983977293573 (diff) |
iwlagn: clean up some 3945/4965 remnants
When the driver was split, a bunch of definitions
for the 3945 and 4965 devices stayed around, but
they're now useless so remove (some of) them.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-dev.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 235 |
1 files changed, 61 insertions, 174 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 1c9d2dd37cca..8dc209a341aa 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -26,7 +26,6 @@ | |||
26 | /* | 26 | /* |
27 | * Please use this file (iwl-dev.h) for driver implementation definitions. | 27 | * Please use this file (iwl-dev.h) for driver implementation definitions. |
28 | * Please use iwl-commands.h for uCode API definitions. | 28 | * Please use iwl-commands.h for uCode API definitions. |
29 | * Please use iwl-4965-hw.h for hardware-related definitions. | ||
30 | */ | 29 | */ |
31 | 30 | ||
32 | #ifndef __iwl_dev_h__ | 31 | #ifndef __iwl_dev_h__ |
@@ -179,53 +178,12 @@ struct iwl_tx_queue { | |||
179 | 178 | ||
180 | #define IWL_NUM_SCAN_RATES (2) | 179 | #define IWL_NUM_SCAN_RATES (2) |
181 | 180 | ||
182 | struct iwl4965_channel_tgd_info { | ||
183 | u8 type; | ||
184 | s8 max_power; | ||
185 | }; | ||
186 | |||
187 | struct iwl4965_channel_tgh_info { | ||
188 | s64 last_radar_time; | ||
189 | }; | ||
190 | |||
191 | #define IWL4965_MAX_RATE (33) | ||
192 | |||
193 | struct iwl3945_clip_group { | ||
194 | /* maximum power level to prevent clipping for each rate, derived by | ||
195 | * us from this band's saturation power in EEPROM */ | ||
196 | const s8 clip_powers[IWL_MAX_RATES]; | ||
197 | }; | ||
198 | |||
199 | /* current Tx power values to use, one for each rate for each channel. | ||
200 | * requested power is limited by: | ||
201 | * -- regulatory EEPROM limits for this channel | ||
202 | * -- hardware capabilities (clip-powers) | ||
203 | * -- spectrum management | ||
204 | * -- user preference (e.g. iwconfig) | ||
205 | * when requested power is set, base power index must also be set. */ | ||
206 | struct iwl3945_channel_power_info { | ||
207 | struct iwl3945_tx_power tpc; /* actual radio and DSP gain settings */ | ||
208 | s8 power_table_index; /* actual (compenst'd) index into gain table */ | ||
209 | s8 base_power_index; /* gain index for power at factory temp. */ | ||
210 | s8 requested_power; /* power (dBm) requested for this chnl/rate */ | ||
211 | }; | ||
212 | |||
213 | /* current scan Tx power values to use, one for each scan rate for each | ||
214 | * channel. */ | ||
215 | struct iwl3945_scan_power_info { | ||
216 | struct iwl3945_tx_power tpc; /* actual radio and DSP gain settings */ | ||
217 | s8 power_table_index; /* actual (compenst'd) index into gain table */ | ||
218 | s8 requested_power; /* scan pwr (dBm) requested for chnl/rate */ | ||
219 | }; | ||
220 | |||
221 | /* | 181 | /* |
222 | * One for each channel, holds all channel setup data | 182 | * One for each channel, holds all channel setup data |
223 | * Some of the fields (e.g. eeprom and flags/max_power_avg) are redundant | 183 | * Some of the fields (e.g. eeprom and flags/max_power_avg) are redundant |
224 | * with one another! | 184 | * with one another! |
225 | */ | 185 | */ |
226 | struct iwl_channel_info { | 186 | struct iwl_channel_info { |
227 | struct iwl4965_channel_tgd_info tgd; | ||
228 | struct iwl4965_channel_tgh_info tgh; | ||
229 | struct iwl_eeprom_channel eeprom; /* EEPROM regulatory limit */ | 187 | struct iwl_eeprom_channel eeprom; /* EEPROM regulatory limit */ |
230 | struct iwl_eeprom_channel ht40_eeprom; /* EEPROM regulatory limit for | 188 | struct iwl_eeprom_channel ht40_eeprom; /* EEPROM regulatory limit for |
231 | * HT40 channel */ | 189 | * HT40 channel */ |
@@ -245,14 +203,6 @@ struct iwl_channel_info { | |||
245 | s8 ht40_max_power_avg; /* (dBm) regul. eeprom, normal Tx, any rate */ | 203 | s8 ht40_max_power_avg; /* (dBm) regul. eeprom, normal Tx, any rate */ |
246 | u8 ht40_flags; /* flags copied from EEPROM */ | 204 | u8 ht40_flags; /* flags copied from EEPROM */ |
247 | u8 ht40_extension_channel; /* HT_IE_EXT_CHANNEL_* */ | 205 | u8 ht40_extension_channel; /* HT_IE_EXT_CHANNEL_* */ |
248 | |||
249 | /* Radio/DSP gain settings for each "normal" data Tx rate. | ||
250 | * These include, in addition to RF and DSP gain, a few fields for | ||
251 | * remembering/modifying gain settings (indexes). */ | ||
252 | struct iwl3945_channel_power_info power_info[IWL4965_MAX_RATE]; | ||
253 | |||
254 | /* Radio/DSP gain settings for each scan rate, for directed scans. */ | ||
255 | struct iwl3945_scan_power_info scan_pwr_info[IWL_NUM_SCAN_RATES]; | ||
256 | }; | 206 | }; |
257 | 207 | ||
258 | #define IWL_TX_FIFO_BK 0 /* shared */ | 208 | #define IWL_TX_FIFO_BK 0 /* shared */ |
@@ -501,9 +451,6 @@ struct iwl_station_priv_common { | |||
501 | * When mac80211 creates a station it reserves some space (hw->sta_data_size) | 451 | * When mac80211 creates a station it reserves some space (hw->sta_data_size) |
502 | * in the structure for use by driver. This structure is places in that | 452 | * in the structure for use by driver. This structure is places in that |
503 | * space. | 453 | * space. |
504 | * | ||
505 | * The common struct MUST be first because it is shared between | ||
506 | * 3945 and agn! | ||
507 | */ | 454 | */ |
508 | struct iwl_station_priv { | 455 | struct iwl_station_priv { |
509 | struct iwl_station_priv_common common; | 456 | struct iwl_station_priv_common common; |
@@ -621,14 +568,6 @@ struct iwl_tlv_ucode_header { | |||
621 | u8 data[0]; | 568 | u8 data[0]; |
622 | }; | 569 | }; |
623 | 570 | ||
624 | struct iwl4965_ibss_seq { | ||
625 | u8 mac[ETH_ALEN]; | ||
626 | u16 seq_num; | ||
627 | u16 frag_num; | ||
628 | unsigned long packet_time; | ||
629 | struct list_head list; | ||
630 | }; | ||
631 | |||
632 | struct iwl_sensitivity_ranges { | 571 | struct iwl_sensitivity_ranges { |
633 | u16 min_nrg_cck; | 572 | u16 min_nrg_cck; |
634 | u16 max_nrg_cck; | 573 | u16 max_nrg_cck; |
@@ -724,8 +663,6 @@ struct iwl_hw_params { | |||
724 | * Naming convention -- | 663 | * Naming convention -- |
725 | * iwl_ <-- Is part of iwlwifi | 664 | * iwl_ <-- Is part of iwlwifi |
726 | * iwlXXXX_ <-- Hardware specific (implemented in iwl-XXXX.c for XXXX) | 665 | * iwlXXXX_ <-- Hardware specific (implemented in iwl-XXXX.c for XXXX) |
727 | * iwl4965_bg_ <-- Called from work queue context | ||
728 | * iwl4965_mac_ <-- mac80211 callback | ||
729 | * | 666 | * |
730 | ****************************************************************************/ | 667 | ****************************************************************************/ |
731 | extern void iwl_update_chain_flags(struct iwl_priv *priv); | 668 | extern void iwl_update_chain_flags(struct iwl_priv *priv); |
@@ -774,7 +711,6 @@ struct iwl_dma_ptr { | |||
774 | 711 | ||
775 | /* Sensitivity and chain noise calibration */ | 712 | /* Sensitivity and chain noise calibration */ |
776 | #define INITIALIZATION_VALUE 0xFFFF | 713 | #define INITIALIZATION_VALUE 0xFFFF |
777 | #define IWL4965_CAL_NUM_BEACONS 20 | ||
778 | #define IWL_CAL_NUM_BEACONS 16 | 714 | #define IWL_CAL_NUM_BEACONS 16 |
779 | #define MAXIMUM_ALLOWED_PATHLOSS 15 | 715 | #define MAXIMUM_ALLOWED_PATHLOSS 15 |
780 | 716 | ||
@@ -808,24 +744,19 @@ struct iwl_dma_ptr { | |||
808 | #define NRG_NUM_PREV_STAT_L 20 | 744 | #define NRG_NUM_PREV_STAT_L 20 |
809 | #define NUM_RX_CHAINS 3 | 745 | #define NUM_RX_CHAINS 3 |
810 | 746 | ||
811 | enum iwl4965_false_alarm_state { | 747 | enum iwlagn_false_alarm_state { |
812 | IWL_FA_TOO_MANY = 0, | 748 | IWL_FA_TOO_MANY = 0, |
813 | IWL_FA_TOO_FEW = 1, | 749 | IWL_FA_TOO_FEW = 1, |
814 | IWL_FA_GOOD_RANGE = 2, | 750 | IWL_FA_GOOD_RANGE = 2, |
815 | }; | 751 | }; |
816 | 752 | ||
817 | enum iwl4965_chain_noise_state { | 753 | enum iwlagn_chain_noise_state { |
818 | IWL_CHAIN_NOISE_ALIVE = 0, /* must be 0 */ | 754 | IWL_CHAIN_NOISE_ALIVE = 0, /* must be 0 */ |
819 | IWL_CHAIN_NOISE_ACCUMULATE, | 755 | IWL_CHAIN_NOISE_ACCUMULATE, |
820 | IWL_CHAIN_NOISE_CALIBRATED, | 756 | IWL_CHAIN_NOISE_CALIBRATED, |
821 | IWL_CHAIN_NOISE_DONE, | 757 | IWL_CHAIN_NOISE_DONE, |
822 | }; | 758 | }; |
823 | 759 | ||
824 | enum iwl4965_calib_enabled_state { | ||
825 | IWL_CALIB_DISABLED = 0, /* must be 0 */ | ||
826 | IWL_CALIB_ENABLED = 1, | ||
827 | }; | ||
828 | |||
829 | 760 | ||
830 | /* | 761 | /* |
831 | * enum iwl_calib | 762 | * enum iwl_calib |
@@ -1133,12 +1064,6 @@ struct iwl_force_reset { | |||
1133 | 1064 | ||
1134 | /* extend beacon time format bit shifting */ | 1065 | /* extend beacon time format bit shifting */ |
1135 | /* | 1066 | /* |
1136 | * for _3945 devices | ||
1137 | * bits 31:24 - extended | ||
1138 | * bits 23:0 - interval | ||
1139 | */ | ||
1140 | #define IWL3945_EXT_BEACON_TIME_POS 24 | ||
1141 | /* | ||
1142 | * for _agn devices | 1067 | * for _agn devices |
1143 | * bits 31:22 - extended | 1068 | * bits 31:22 - extended |
1144 | * bits 21:0 - interval | 1069 | * bits 21:0 - interval |
@@ -1391,15 +1316,12 @@ struct iwl_priv { | |||
1391 | struct iwl_power_mgr power_data; | 1316 | struct iwl_power_mgr power_data; |
1392 | struct iwl_tt_mgmt thermal_throttle; | 1317 | struct iwl_tt_mgmt thermal_throttle; |
1393 | 1318 | ||
1394 | /* context information */ | ||
1395 | u8 bssid[ETH_ALEN]; /* used only on 3945 but filled by core */ | ||
1396 | |||
1397 | /* station table variables */ | 1319 | /* station table variables */ |
1398 | 1320 | ||
1399 | /* Note: if lock and sta_lock are needed, lock must be acquired first */ | 1321 | /* Note: if lock and sta_lock are needed, lock must be acquired first */ |
1400 | spinlock_t sta_lock; | 1322 | spinlock_t sta_lock; |
1401 | int num_stations; | 1323 | int num_stations; |
1402 | struct iwl_station_entry stations[IWL_STATION_COUNT]; | 1324 | struct iwl_station_entry stations[IWLAGN_STATION_COUNT]; |
1403 | unsigned long ucode_key_table; | 1325 | unsigned long ucode_key_table; |
1404 | 1326 | ||
1405 | /* queue refcounts */ | 1327 | /* queue refcounts */ |
@@ -1423,101 +1345,66 @@ struct iwl_priv { | |||
1423 | /* Last Rx'd beacon timestamp */ | 1345 | /* Last Rx'd beacon timestamp */ |
1424 | u64 timestamp; | 1346 | u64 timestamp; |
1425 | 1347 | ||
1426 | union { | 1348 | struct { |
1427 | #if defined(CONFIG_IWL3945) || defined(CONFIG_IWL3945_MODULE) | 1349 | /* INT ICT Table */ |
1428 | struct { | 1350 | __le32 *ict_tbl; |
1429 | void *shared_virt; | 1351 | void *ict_tbl_vir; |
1430 | dma_addr_t shared_phys; | 1352 | dma_addr_t ict_tbl_dma; |
1431 | 1353 | dma_addr_t aligned_ict_tbl_dma; | |
1432 | struct delayed_work thermal_periodic; | 1354 | int ict_index; |
1433 | struct delayed_work rfkill_poll; | 1355 | u32 inta; |
1434 | 1356 | bool use_ict; | |
1435 | struct iwl3945_notif_statistics statistics; | 1357 | /* |
1436 | #ifdef CONFIG_IWLWIFI_DEBUGFS | 1358 | * reporting the number of tids has AGG on. 0 means |
1437 | struct iwl3945_notif_statistics accum_statistics; | 1359 | * no AGGREGATION |
1438 | struct iwl3945_notif_statistics delta_statistics; | 1360 | */ |
1439 | struct iwl3945_notif_statistics max_delta; | 1361 | u8 agg_tids_count; |
1440 | #endif | 1362 | |
1441 | 1363 | struct iwl_rx_phy_res last_phy_res; | |
1442 | u32 sta_supp_rates; | 1364 | bool last_phy_res_valid; |
1443 | int last_rx_rssi; /* From Rx packet statistics */ | 1365 | |
1444 | 1366 | struct completion firmware_loading_complete; | |
1445 | /* Rx'd packet timing information */ | 1367 | |
1446 | u32 last_beacon_time; | 1368 | u32 init_evtlog_ptr, init_evtlog_size, init_errlog_ptr; |
1447 | u64 last_tsf; | 1369 | u32 inst_evtlog_ptr, inst_evtlog_size, inst_errlog_ptr; |
1448 | 1370 | ||
1449 | /* | 1371 | /* |
1450 | * each calibration channel group in the | 1372 | * chain noise reset and gain commands are the |
1451 | * EEPROM has a derived clip setting for | 1373 | * two extra calibration commands follows the standard |
1452 | * each rate. | 1374 | * phy calibration commands |
1453 | */ | 1375 | */ |
1454 | const struct iwl3945_clip_group clip_groups[5]; | 1376 | u8 phy_calib_chain_noise_reset_cmd; |
1455 | 1377 | u8 phy_calib_chain_noise_gain_cmd; | |
1456 | } _3945; | 1378 | |
1457 | #endif | 1379 | struct iwl_notif_statistics statistics; |
1458 | #if defined(CONFIG_IWLAGN) || defined(CONFIG_IWLAGN_MODULE) | 1380 | struct iwl_bt_notif_statistics statistics_bt; |
1459 | struct { | 1381 | /* counts reply_tx error */ |
1460 | /* INT ICT Table */ | 1382 | struct reply_tx_error_statistics reply_tx_stats; |
1461 | __le32 *ict_tbl; | 1383 | struct reply_agg_tx_error_statistics reply_agg_tx_stats; |
1462 | void *ict_tbl_vir; | ||
1463 | dma_addr_t ict_tbl_dma; | ||
1464 | dma_addr_t aligned_ict_tbl_dma; | ||
1465 | int ict_index; | ||
1466 | u32 inta; | ||
1467 | bool use_ict; | ||
1468 | /* | ||
1469 | * reporting the number of tids has AGG on. 0 means | ||
1470 | * no AGGREGATION | ||
1471 | */ | ||
1472 | u8 agg_tids_count; | ||
1473 | |||
1474 | struct iwl_rx_phy_res last_phy_res; | ||
1475 | bool last_phy_res_valid; | ||
1476 | |||
1477 | struct completion firmware_loading_complete; | ||
1478 | |||
1479 | u32 init_evtlog_ptr, init_evtlog_size, init_errlog_ptr; | ||
1480 | u32 inst_evtlog_ptr, inst_evtlog_size, inst_errlog_ptr; | ||
1481 | |||
1482 | /* | ||
1483 | * chain noise reset and gain commands are the | ||
1484 | * two extra calibration commands follows the standard | ||
1485 | * phy calibration commands | ||
1486 | */ | ||
1487 | u8 phy_calib_chain_noise_reset_cmd; | ||
1488 | u8 phy_calib_chain_noise_gain_cmd; | ||
1489 | |||
1490 | struct iwl_notif_statistics statistics; | ||
1491 | struct iwl_bt_notif_statistics statistics_bt; | ||
1492 | /* counts reply_tx error */ | ||
1493 | struct reply_tx_error_statistics reply_tx_stats; | ||
1494 | struct reply_agg_tx_error_statistics reply_agg_tx_stats; | ||
1495 | #ifdef CONFIG_IWLWIFI_DEBUGFS | 1384 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
1496 | struct iwl_notif_statistics accum_statistics; | 1385 | struct iwl_notif_statistics accum_statistics; |
1497 | struct iwl_notif_statistics delta_statistics; | 1386 | struct iwl_notif_statistics delta_statistics; |
1498 | struct iwl_notif_statistics max_delta; | 1387 | struct iwl_notif_statistics max_delta; |
1499 | struct iwl_bt_notif_statistics accum_statistics_bt; | 1388 | struct iwl_bt_notif_statistics accum_statistics_bt; |
1500 | struct iwl_bt_notif_statistics delta_statistics_bt; | 1389 | struct iwl_bt_notif_statistics delta_statistics_bt; |
1501 | struct iwl_bt_notif_statistics max_delta_bt; | 1390 | struct iwl_bt_notif_statistics max_delta_bt; |
1502 | #endif | ||
1503 | |||
1504 | /* notification wait support */ | ||
1505 | struct list_head notif_waits; | ||
1506 | spinlock_t notif_wait_lock; | ||
1507 | wait_queue_head_t notif_waitq; | ||
1508 | |||
1509 | /* remain-on-channel offload support */ | ||
1510 | struct ieee80211_channel *hw_roc_channel; | ||
1511 | struct delayed_work hw_roc_work; | ||
1512 | enum nl80211_channel_type hw_roc_chantype; | ||
1513 | int hw_roc_duration; | ||
1514 | |||
1515 | struct sk_buff *offchan_tx_skb; | ||
1516 | int offchan_tx_timeout; | ||
1517 | struct ieee80211_channel *offchan_tx_chan; | ||
1518 | } _agn; | ||
1519 | #endif | 1391 | #endif |
1520 | }; | 1392 | /* notification wait support */ |
1393 | struct list_head notif_waits; | ||
1394 | spinlock_t notif_wait_lock; | ||
1395 | wait_queue_head_t notif_waitq; | ||
1396 | |||
1397 | /* remain-on-channel offload support */ | ||
1398 | struct ieee80211_channel *hw_roc_channel; | ||
1399 | struct delayed_work hw_roc_work; | ||
1400 | enum nl80211_channel_type hw_roc_chantype; | ||
1401 | int hw_roc_duration; | ||
1402 | bool hw_roc_setup; | ||
1403 | |||
1404 | struct sk_buff *offchan_tx_skb; | ||
1405 | int offchan_tx_timeout; | ||
1406 | struct ieee80211_channel *offchan_tx_chan; | ||
1407 | } _agn; | ||
1521 | 1408 | ||
1522 | /* bt coex */ | 1409 | /* bt coex */ |
1523 | u8 bt_enable_flag; | 1410 | u8 bt_enable_flag; |