diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-dev.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 89 |
1 files changed, 79 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 58c69a5798d4..f3f3473c5c7e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -57,8 +57,8 @@ extern struct iwl_cfg iwl5100_bgn_cfg; | |||
57 | extern struct iwl_cfg iwl5100_abg_cfg; | 57 | extern struct iwl_cfg iwl5100_abg_cfg; |
58 | extern struct iwl_cfg iwl5150_agn_cfg; | 58 | extern struct iwl_cfg iwl5150_agn_cfg; |
59 | extern struct iwl_cfg iwl5150_abg_cfg; | 59 | extern struct iwl_cfg iwl5150_abg_cfg; |
60 | extern struct iwl_cfg iwl6000g2a_2agn_cfg; | ||
60 | extern struct iwl_cfg iwl6000i_2agn_cfg; | 61 | extern struct iwl_cfg iwl6000i_2agn_cfg; |
61 | extern struct iwl_cfg iwl6000g2_2agn_cfg; | ||
62 | extern struct iwl_cfg iwl6000i_2abg_cfg; | 62 | extern struct iwl_cfg iwl6000i_2abg_cfg; |
63 | extern struct iwl_cfg iwl6000i_2bg_cfg; | 63 | extern struct iwl_cfg iwl6000i_2bg_cfg; |
64 | extern struct iwl_cfg iwl6000_3agn_cfg; | 64 | extern struct iwl_cfg iwl6000_3agn_cfg; |
@@ -497,20 +497,38 @@ struct iwl_station_entry { | |||
497 | struct iwl_link_quality_cmd *lq; | 497 | struct iwl_link_quality_cmd *lq; |
498 | }; | 498 | }; |
499 | 499 | ||
500 | struct iwl_station_priv_common { | ||
501 | u8 sta_id; | ||
502 | }; | ||
503 | |||
500 | /* | 504 | /* |
501 | * iwl_station_priv: Driver's private station information | 505 | * iwl_station_priv: Driver's private station information |
502 | * | 506 | * |
503 | * When mac80211 creates a station it reserves some space (hw->sta_data_size) | 507 | * When mac80211 creates a station it reserves some space (hw->sta_data_size) |
504 | * in the structure for use by driver. This structure is places in that | 508 | * in the structure for use by driver. This structure is places in that |
505 | * space. | 509 | * space. |
510 | * | ||
511 | * The common struct MUST be first because it is shared between | ||
512 | * 3945 and agn! | ||
506 | */ | 513 | */ |
507 | struct iwl_station_priv { | 514 | struct iwl_station_priv { |
515 | struct iwl_station_priv_common common; | ||
508 | struct iwl_lq_sta lq_sta; | 516 | struct iwl_lq_sta lq_sta; |
509 | atomic_t pending_frames; | 517 | atomic_t pending_frames; |
510 | bool client; | 518 | bool client; |
511 | bool asleep; | 519 | bool asleep; |
512 | }; | 520 | }; |
513 | 521 | ||
522 | /** | ||
523 | * struct iwl_vif_priv - driver's private per-interface information | ||
524 | * | ||
525 | * When mac80211 allocates a virtual interface, it can allocate | ||
526 | * space for us to put data into. | ||
527 | */ | ||
528 | struct iwl_vif_priv { | ||
529 | u8 ibss_bssid_sta_id; | ||
530 | }; | ||
531 | |||
514 | /* one for each uCode image (inst/data, boot/init/runtime) */ | 532 | /* one for each uCode image (inst/data, boot/init/runtime) */ |
515 | struct fw_desc { | 533 | struct fw_desc { |
516 | void *v_addr; /* access by driver */ | 534 | void *v_addr; /* access by driver */ |
@@ -518,7 +536,7 @@ struct fw_desc { | |||
518 | u32 len; /* bytes */ | 536 | u32 len; /* bytes */ |
519 | }; | 537 | }; |
520 | 538 | ||
521 | /* uCode file layout */ | 539 | /* v1/v2 uCode file layout */ |
522 | struct iwl_ucode_header { | 540 | struct iwl_ucode_header { |
523 | __le32 ver; /* major/minor/API/serial */ | 541 | __le32 ver; /* major/minor/API/serial */ |
524 | union { | 542 | union { |
@@ -541,7 +559,62 @@ struct iwl_ucode_header { | |||
541 | } v2; | 559 | } v2; |
542 | } u; | 560 | } u; |
543 | }; | 561 | }; |
544 | #define UCODE_HEADER_SIZE(ver) ((ver) == 1 ? 24 : 28) | 562 | |
563 | /* | ||
564 | * new TLV uCode file layout | ||
565 | * | ||
566 | * The new TLV file format contains TLVs, that each specify | ||
567 | * some piece of data. To facilitate "groups", for example | ||
568 | * different instruction image with different capabilities, | ||
569 | * bundled with the same init image, an alternative mechanism | ||
570 | * is provided: | ||
571 | * When the alternative field is 0, that means that the item | ||
572 | * is always valid. When it is non-zero, then it is only | ||
573 | * valid in conjunction with items of the same alternative, | ||
574 | * in which case the driver (user) selects one alternative | ||
575 | * to use. | ||
576 | */ | ||
577 | |||
578 | enum iwl_ucode_tlv_type { | ||
579 | IWL_UCODE_TLV_INVALID = 0, /* unused */ | ||
580 | IWL_UCODE_TLV_INST = 1, | ||
581 | IWL_UCODE_TLV_DATA = 2, | ||
582 | IWL_UCODE_TLV_INIT = 3, | ||
583 | IWL_UCODE_TLV_INIT_DATA = 4, | ||
584 | IWL_UCODE_TLV_BOOT = 5, | ||
585 | IWL_UCODE_TLV_PROBE_MAX_LEN = 6, /* a u32 value */ | ||
586 | }; | ||
587 | |||
588 | struct iwl_ucode_tlv { | ||
589 | __le16 type; /* see above */ | ||
590 | __le16 alternative; /* see comment */ | ||
591 | __le32 length; /* not including type/length fields */ | ||
592 | u8 data[0]; | ||
593 | } __attribute__ ((packed)); | ||
594 | |||
595 | #define IWL_TLV_UCODE_MAGIC 0x0a4c5749 | ||
596 | |||
597 | struct iwl_tlv_ucode_header { | ||
598 | /* | ||
599 | * The TLV style ucode header is distinguished from | ||
600 | * the v1/v2 style header by first four bytes being | ||
601 | * zero, as such is an invalid combination of | ||
602 | * major/minor/API/serial versions. | ||
603 | */ | ||
604 | __le32 zero; | ||
605 | __le32 magic; | ||
606 | u8 human_readable[64]; | ||
607 | __le32 ver; /* major/minor/API/serial */ | ||
608 | __le32 build; | ||
609 | __le64 alternatives; /* bitmask of valid alternatives */ | ||
610 | /* | ||
611 | * The data contained herein has a TLV layout, | ||
612 | * see above for the TLV header and types. | ||
613 | * Note that each TLV is padded to a length | ||
614 | * that is a multiple of 4 for alignment. | ||
615 | */ | ||
616 | u8 data[0]; | ||
617 | }; | ||
545 | 618 | ||
546 | struct iwl4965_ibss_seq { | 619 | struct iwl4965_ibss_seq { |
547 | u8 mac[ETH_ALEN]; | 620 | u8 mac[ETH_ALEN]; |
@@ -1155,8 +1228,7 @@ struct iwl_priv { | |||
1155 | #endif | 1228 | #endif |
1156 | 1229 | ||
1157 | /* context information */ | 1230 | /* context information */ |
1158 | u8 bssid[ETH_ALEN]; | 1231 | u8 bssid[ETH_ALEN]; /* used only on 3945 but filled by core */ |
1159 | u16 rts_threshold; | ||
1160 | u8 mac_addr[ETH_ALEN]; | 1232 | u8 mac_addr[ETH_ALEN]; |
1161 | 1233 | ||
1162 | /*station table variables */ | 1234 | /*station table variables */ |
@@ -1189,7 +1261,6 @@ struct iwl_priv { | |||
1189 | 1261 | ||
1190 | /* Last Rx'd beacon timestamp */ | 1262 | /* Last Rx'd beacon timestamp */ |
1191 | u64 timestamp; | 1263 | u64 timestamp; |
1192 | u16 beacon_int; | ||
1193 | struct ieee80211_vif *vif; | 1264 | struct ieee80211_vif *vif; |
1194 | 1265 | ||
1195 | union { | 1266 | union { |
@@ -1242,6 +1313,8 @@ struct iwl_priv { | |||
1242 | 1313 | ||
1243 | struct iwl_rx_phy_res last_phy_res; | 1314 | struct iwl_rx_phy_res last_phy_res; |
1244 | bool last_phy_res_valid; | 1315 | bool last_phy_res_valid; |
1316 | |||
1317 | struct completion firmware_loading_complete; | ||
1245 | } _agn; | 1318 | } _agn; |
1246 | #endif | 1319 | #endif |
1247 | }; | 1320 | }; |
@@ -1249,10 +1322,6 @@ struct iwl_priv { | |||
1249 | struct iwl_hw_params hw_params; | 1322 | struct iwl_hw_params hw_params; |
1250 | 1323 | ||
1251 | u32 inta_mask; | 1324 | u32 inta_mask; |
1252 | /* Current association information needed to configure the | ||
1253 | * hardware */ | ||
1254 | u16 assoc_id; | ||
1255 | u16 assoc_capability; | ||
1256 | 1325 | ||
1257 | struct iwl_qos_info qos_data; | 1326 | struct iwl_qos_info qos_data; |
1258 | 1327 | ||