diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-07-22 17:51:16 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-07-22 17:51:16 -0400 |
commit | 41bf37117b47fc5ce2aae91f6a108e7e42e0b046 (patch) | |
tree | d5c8f24075313edfe548256dd931527f1569921e /drivers/net/wireless/iwlwifi/iwl-dev.h | |
parent | 415b3334a21aa67806c52d1acf4e72e14f7f402f (diff) | |
parent | 6e6e8c510a84fe3237ef02b954e58cca6a3f4b1a (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-dev.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 197 |
1 files changed, 65 insertions, 132 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 424c45c43f5b..6c9790cac8d0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -48,6 +48,8 @@ | |||
48 | #include "iwl-power.h" | 48 | #include "iwl-power.h" |
49 | #include "iwl-agn-rs.h" | 49 | #include "iwl-agn-rs.h" |
50 | #include "iwl-agn-tt.h" | 50 | #include "iwl-agn-tt.h" |
51 | #include "iwl-bus.h" | ||
52 | #include "iwl-trans.h" | ||
51 | 53 | ||
52 | #define DRV_NAME "iwlagn" | 54 | #define DRV_NAME "iwlagn" |
53 | 55 | ||
@@ -396,13 +398,6 @@ struct iwl_tid_data { | |||
396 | struct iwl_ht_agg agg; | 398 | struct iwl_ht_agg agg; |
397 | }; | 399 | }; |
398 | 400 | ||
399 | struct iwl_hw_key { | ||
400 | u32 cipher; | ||
401 | int keylen; | ||
402 | u8 keyidx; | ||
403 | u8 key[32]; | ||
404 | }; | ||
405 | |||
406 | union iwl_ht_rate_supp { | 401 | union iwl_ht_rate_supp { |
407 | u16 rates; | 402 | u16 rates; |
408 | struct { | 403 | struct { |
@@ -455,7 +450,6 @@ struct iwl_station_entry { | |||
455 | struct iwl_addsta_cmd sta; | 450 | struct iwl_addsta_cmd sta; |
456 | struct iwl_tid_data tid[MAX_TID_COUNT]; | 451 | struct iwl_tid_data tid[MAX_TID_COUNT]; |
457 | u8 used, ctxid; | 452 | u8 used, ctxid; |
458 | struct iwl_hw_key keyinfo; | ||
459 | struct iwl_link_quality_cmd *lq; | 453 | struct iwl_link_quality_cmd *lq; |
460 | }; | 454 | }; |
461 | 455 | ||
@@ -558,7 +552,8 @@ enum iwl_ucode_tlv_type { | |||
558 | IWL_UCODE_TLV_INIT_ERRLOG_PTR = 13, | 552 | IWL_UCODE_TLV_INIT_ERRLOG_PTR = 13, |
559 | IWL_UCODE_TLV_ENHANCE_SENS_TBL = 14, | 553 | IWL_UCODE_TLV_ENHANCE_SENS_TBL = 14, |
560 | IWL_UCODE_TLV_PHY_CALIBRATION_SIZE = 15, | 554 | IWL_UCODE_TLV_PHY_CALIBRATION_SIZE = 15, |
561 | /* 16 and 17 reserved for future use */ | 555 | IWL_UCODE_TLV_WOWLAN_INST = 16, |
556 | IWL_UCODE_TLV_WOWLAN_DATA = 17, | ||
562 | IWL_UCODE_TLV_FLAGS = 18, | 557 | IWL_UCODE_TLV_FLAGS = 18, |
563 | }; | 558 | }; |
564 | 559 | ||
@@ -1158,6 +1153,8 @@ struct iwl_rxon_context { | |||
1158 | 1153 | ||
1159 | __le32 station_flags; | 1154 | __le32 station_flags; |
1160 | 1155 | ||
1156 | int beacon_int; | ||
1157 | |||
1161 | struct { | 1158 | struct { |
1162 | bool non_gf_sta_present; | 1159 | bool non_gf_sta_present; |
1163 | u8 protection; | 1160 | u8 protection; |
@@ -1193,77 +1190,6 @@ struct iwl_testmode_trace { | |||
1193 | }; | 1190 | }; |
1194 | #endif | 1191 | #endif |
1195 | 1192 | ||
1196 | struct iwl_bus; | ||
1197 | |||
1198 | /** | ||
1199 | * struct iwl_bus_ops - bus specific operations | ||
1200 | |||
1201 | * @get_pm_support: must returns true if the bus can go to sleep | ||
1202 | * @apm_config: will be called during the config of the APM configuration | ||
1203 | * @set_drv_data: set the priv pointer to the bus layer | ||
1204 | * @get_dev: returns the device struct | ||
1205 | * @get_irq: returns the irq number | ||
1206 | * @get_hw_id: prints the hw_id in the provided buffer | ||
1207 | * @write8: write a byte to register at offset ofs | ||
1208 | * @write32: write a dword to register at offset ofs | ||
1209 | * @wread32: read a dword at register at offset ofs | ||
1210 | */ | ||
1211 | struct iwl_bus_ops { | ||
1212 | bool (*get_pm_support)(struct iwl_bus *bus); | ||
1213 | void (*apm_config)(struct iwl_bus *bus); | ||
1214 | void (*set_drv_data)(struct iwl_bus *bus, void *priv); | ||
1215 | struct device *(*get_dev)(const struct iwl_bus *bus); | ||
1216 | unsigned int (*get_irq)(const struct iwl_bus *bus); | ||
1217 | void (*get_hw_id)(struct iwl_bus *bus, char buf[], int buf_len); | ||
1218 | void (*write8)(struct iwl_bus *bus, u32 ofs, u8 val); | ||
1219 | void (*write32)(struct iwl_bus *bus, u32 ofs, u32 val); | ||
1220 | u32 (*read32)(struct iwl_bus *bus, u32 ofs); | ||
1221 | }; | ||
1222 | |||
1223 | struct iwl_bus { | ||
1224 | /* pointer to bus specific struct */ | ||
1225 | void *bus_specific; | ||
1226 | |||
1227 | /* Common data to all buses */ | ||
1228 | struct iwl_priv *priv; /* driver's context */ | ||
1229 | struct device *dev; | ||
1230 | struct iwl_bus_ops *ops; | ||
1231 | unsigned int irq; | ||
1232 | }; | ||
1233 | |||
1234 | struct iwl_trans; | ||
1235 | |||
1236 | /** | ||
1237 | * struct iwl_trans_ops - transport specific operations | ||
1238 | |||
1239 | * @rx_init: inits the rx memory, allocate it if needed | ||
1240 | * @rx_stop: stop the rx | ||
1241 | * @rx_free: frees the rx memory | ||
1242 | * @tx_init:inits the tx memory, allocate if needed | ||
1243 | * @tx_stop: stop the tx | ||
1244 | * @tx_free: frees the tx memory | ||
1245 | * @send_cmd:send a host command | ||
1246 | * @send_cmd_pdu:send a host command: flags can be CMD_* | ||
1247 | */ | ||
1248 | struct iwl_trans_ops { | ||
1249 | int (*rx_init)(struct iwl_priv *priv); | ||
1250 | int (*rx_stop)(struct iwl_priv *priv); | ||
1251 | void (*rx_free)(struct iwl_priv *priv); | ||
1252 | |||
1253 | int (*tx_init)(struct iwl_priv *priv); | ||
1254 | int (*tx_stop)(struct iwl_priv *priv); | ||
1255 | void (*tx_free)(struct iwl_priv *priv); | ||
1256 | |||
1257 | int (*send_cmd)(struct iwl_priv *priv, struct iwl_host_cmd *cmd); | ||
1258 | |||
1259 | int (*send_cmd_pdu)(struct iwl_priv *priv, u8 id, u32 flags, u16 len, | ||
1260 | const void *data); | ||
1261 | }; | ||
1262 | |||
1263 | struct iwl_trans { | ||
1264 | const struct iwl_trans_ops *ops; | ||
1265 | }; | ||
1266 | |||
1267 | /* uCode ownership */ | 1193 | /* uCode ownership */ |
1268 | #define IWL_OWNERSHIP_DRIVER 0 | 1194 | #define IWL_OWNERSHIP_DRIVER 0 |
1269 | #define IWL_OWNERSHIP_TM 1 | 1195 | #define IWL_OWNERSHIP_TM 1 |
@@ -1335,7 +1261,7 @@ struct iwl_priv { | |||
1335 | spinlock_t reg_lock; /* protect hw register access */ | 1261 | spinlock_t reg_lock; /* protect hw register access */ |
1336 | struct mutex mutex; | 1262 | struct mutex mutex; |
1337 | 1263 | ||
1338 | struct iwl_bus bus; /* bus specific data */ | 1264 | struct iwl_bus *bus; /* bus specific data */ |
1339 | struct iwl_trans trans; | 1265 | struct iwl_trans trans; |
1340 | 1266 | ||
1341 | /* microcode/device supports multiple contexts */ | 1267 | /* microcode/device supports multiple contexts */ |
@@ -1362,6 +1288,7 @@ struct iwl_priv { | |||
1362 | 1288 | ||
1363 | struct fw_img ucode_rt; | 1289 | struct fw_img ucode_rt; |
1364 | struct fw_img ucode_init; | 1290 | struct fw_img ucode_init; |
1291 | struct fw_img ucode_wowlan; | ||
1365 | 1292 | ||
1366 | enum iwlagn_ucode_type ucode_type; | 1293 | enum iwlagn_ucode_type ucode_type; |
1367 | u8 ucode_write_complete; /* the image write is complete */ | 1294 | u8 ucode_write_complete; /* the image write is complete */ |
@@ -1434,6 +1361,8 @@ struct iwl_priv { | |||
1434 | 1361 | ||
1435 | u8 mac80211_registered; | 1362 | u8 mac80211_registered; |
1436 | 1363 | ||
1364 | bool wowlan; | ||
1365 | |||
1437 | /* eeprom -- this is in the card's little endian byte order */ | 1366 | /* eeprom -- this is in the card's little endian byte order */ |
1438 | u8 *eeprom; | 1367 | u8 *eeprom; |
1439 | int nvm_device_type; | 1368 | int nvm_device_type; |
@@ -1469,56 +1398,54 @@ struct iwl_priv { | |||
1469 | } accum_stats, delta_stats, max_delta_stats; | 1398 | } accum_stats, delta_stats, max_delta_stats; |
1470 | #endif | 1399 | #endif |
1471 | 1400 | ||
1472 | struct { | 1401 | /* INT ICT Table */ |
1473 | /* INT ICT Table */ | 1402 | __le32 *ict_tbl; |
1474 | __le32 *ict_tbl; | 1403 | void *ict_tbl_vir; |
1475 | void *ict_tbl_vir; | 1404 | dma_addr_t ict_tbl_dma; |
1476 | dma_addr_t ict_tbl_dma; | 1405 | dma_addr_t aligned_ict_tbl_dma; |
1477 | dma_addr_t aligned_ict_tbl_dma; | 1406 | int ict_index; |
1478 | int ict_index; | 1407 | u32 inta; |
1479 | u32 inta; | 1408 | bool use_ict; |
1480 | bool use_ict; | 1409 | /* |
1481 | /* | 1410 | * reporting the number of tids has AGG on. 0 means |
1482 | * reporting the number of tids has AGG on. 0 means | 1411 | * no AGGREGATION |
1483 | * no AGGREGATION | 1412 | */ |
1484 | */ | 1413 | u8 agg_tids_count; |
1485 | u8 agg_tids_count; | 1414 | |
1486 | 1415 | struct iwl_rx_phy_res last_phy_res; | |
1487 | struct iwl_rx_phy_res last_phy_res; | 1416 | bool last_phy_res_valid; |
1488 | bool last_phy_res_valid; | 1417 | |
1489 | 1418 | struct completion firmware_loading_complete; | |
1490 | struct completion firmware_loading_complete; | 1419 | |
1491 | 1420 | u32 init_evtlog_ptr, init_evtlog_size, init_errlog_ptr; | |
1492 | u32 init_evtlog_ptr, init_evtlog_size, init_errlog_ptr; | 1421 | u32 inst_evtlog_ptr, inst_evtlog_size, inst_errlog_ptr; |
1493 | u32 inst_evtlog_ptr, inst_evtlog_size, inst_errlog_ptr; | 1422 | |
1494 | 1423 | /* | |
1495 | /* | 1424 | * chain noise reset and gain commands are the |
1496 | * chain noise reset and gain commands are the | 1425 | * two extra calibration commands follows the standard |
1497 | * two extra calibration commands follows the standard | 1426 | * phy calibration commands |
1498 | * phy calibration commands | 1427 | */ |
1499 | */ | 1428 | u8 phy_calib_chain_noise_reset_cmd; |
1500 | u8 phy_calib_chain_noise_reset_cmd; | 1429 | u8 phy_calib_chain_noise_gain_cmd; |
1501 | u8 phy_calib_chain_noise_gain_cmd; | 1430 | |
1502 | 1431 | /* counts reply_tx error */ | |
1503 | /* counts reply_tx error */ | 1432 | struct reply_tx_error_statistics reply_tx_stats; |
1504 | struct reply_tx_error_statistics reply_tx_stats; | 1433 | struct reply_agg_tx_error_statistics reply_agg_tx_stats; |
1505 | struct reply_agg_tx_error_statistics reply_agg_tx_stats; | 1434 | /* notification wait support */ |
1506 | /* notification wait support */ | 1435 | struct list_head notif_waits; |
1507 | struct list_head notif_waits; | 1436 | spinlock_t notif_wait_lock; |
1508 | spinlock_t notif_wait_lock; | 1437 | wait_queue_head_t notif_waitq; |
1509 | wait_queue_head_t notif_waitq; | 1438 | |
1510 | 1439 | /* remain-on-channel offload support */ | |
1511 | /* remain-on-channel offload support */ | 1440 | struct ieee80211_channel *hw_roc_channel; |
1512 | struct ieee80211_channel *hw_roc_channel; | 1441 | struct delayed_work hw_roc_work; |
1513 | struct delayed_work hw_roc_work; | 1442 | enum nl80211_channel_type hw_roc_chantype; |
1514 | enum nl80211_channel_type hw_roc_chantype; | 1443 | int hw_roc_duration; |
1515 | int hw_roc_duration; | 1444 | bool hw_roc_setup; |
1516 | bool hw_roc_setup; | 1445 | |
1517 | 1446 | struct sk_buff *offchan_tx_skb; | |
1518 | struct sk_buff *offchan_tx_skb; | 1447 | int offchan_tx_timeout; |
1519 | int offchan_tx_timeout; | 1448 | struct ieee80211_channel *offchan_tx_chan; |
1520 | struct ieee80211_channel *offchan_tx_chan; | ||
1521 | } _agn; | ||
1522 | 1449 | ||
1523 | /* bt coex */ | 1450 | /* bt coex */ |
1524 | u8 bt_enable_flag; | 1451 | u8 bt_enable_flag; |
@@ -1588,6 +1515,7 @@ struct iwl_priv { | |||
1588 | struct dentry *debugfs_dir; | 1515 | struct dentry *debugfs_dir; |
1589 | u32 dbgfs_sram_offset, dbgfs_sram_len; | 1516 | u32 dbgfs_sram_offset, dbgfs_sram_len; |
1590 | bool disable_ht40; | 1517 | bool disable_ht40; |
1518 | void *wowlan_sram; | ||
1591 | #endif /* CONFIG_IWLWIFI_DEBUGFS */ | 1519 | #endif /* CONFIG_IWLWIFI_DEBUGFS */ |
1592 | 1520 | ||
1593 | struct work_struct txpower_work; | 1521 | struct work_struct txpower_work; |
@@ -1605,9 +1533,14 @@ struct iwl_priv { | |||
1605 | bool led_registered; | 1533 | bool led_registered; |
1606 | #ifdef CONFIG_IWLWIFI_DEVICE_SVTOOL | 1534 | #ifdef CONFIG_IWLWIFI_DEVICE_SVTOOL |
1607 | struct iwl_testmode_trace testmode_trace; | 1535 | struct iwl_testmode_trace testmode_trace; |
1608 | #endif | ||
1609 | u32 tm_fixed_rate; | 1536 | u32 tm_fixed_rate; |
1537 | #endif | ||
1610 | 1538 | ||
1539 | /* WoWLAN GTK rekey data */ | ||
1540 | u8 kck[NL80211_KCK_LEN], kek[NL80211_KEK_LEN]; | ||
1541 | __le64 replay_ctr; | ||
1542 | __le16 last_seq_ctl; | ||
1543 | bool have_rekey_data; | ||
1611 | }; /*iwl_priv */ | 1544 | }; /*iwl_priv */ |
1612 | 1545 | ||
1613 | static inline void iwl_txq_ctx_activate(struct iwl_priv *priv, int txq_id) | 1546 | static inline void iwl_txq_ctx_activate(struct iwl_priv *priv, int txq_id) |