diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.h | 59 |
1 files changed, 28 insertions, 31 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h index c7695a215a39..bdd32475b99c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945.h | |||
@@ -36,6 +36,10 @@ | |||
36 | #include <linux/kernel.h> | 36 | #include <linux/kernel.h> |
37 | #include <net/ieee80211_radiotap.h> | 37 | #include <net/ieee80211_radiotap.h> |
38 | 38 | ||
39 | /*used for rfkill*/ | ||
40 | #include <linux/rfkill.h> | ||
41 | #include <linux/input.h> | ||
42 | |||
39 | /* Hardware specific file defines the PCI IDs table for that hardware module */ | 43 | /* Hardware specific file defines the PCI IDs table for that hardware module */ |
40 | extern struct pci_device_id iwl3945_hw_card_ids[]; | 44 | extern struct pci_device_id iwl3945_hw_card_ids[]; |
41 | 45 | ||
@@ -69,6 +73,10 @@ extern struct pci_device_id iwl3945_hw_card_ids[]; | |||
69 | extern int iwl3945_param_hwcrypto; | 73 | extern int iwl3945_param_hwcrypto; |
70 | extern int iwl3945_param_queues_num; | 74 | extern int iwl3945_param_queues_num; |
71 | 75 | ||
76 | struct iwl3945_sta_priv { | ||
77 | struct iwl3945_rs_sta *rs_sta; | ||
78 | }; | ||
79 | |||
72 | enum iwl3945_antenna { | 80 | enum iwl3945_antenna { |
73 | IWL_ANTENNA_DIVERSITY, | 81 | IWL_ANTENNA_DIVERSITY, |
74 | IWL_ANTENNA_MAIN, | 82 | IWL_ANTENNA_MAIN, |
@@ -124,7 +132,6 @@ int iwl3945_x2_queue_used(const struct iwl3945_queue *q, int i); | |||
124 | 132 | ||
125 | /* One for each TFD */ | 133 | /* One for each TFD */ |
126 | struct iwl3945_tx_info { | 134 | struct iwl3945_tx_info { |
127 | struct ieee80211_tx_status status; | ||
128 | struct sk_buff *skb[MAX_NUM_OF_TBS]; | 135 | struct sk_buff *skb[MAX_NUM_OF_TBS]; |
129 | }; | 136 | }; |
130 | 137 | ||
@@ -507,8 +514,6 @@ struct iwl3945_ucode { | |||
507 | u8 data[0]; /* data in same order as "size" elements */ | 514 | u8 data[0]; /* data in same order as "size" elements */ |
508 | }; | 515 | }; |
509 | 516 | ||
510 | #define IWL_IBSS_MAC_HASH_SIZE 32 | ||
511 | |||
512 | struct iwl3945_ibss_seq { | 517 | struct iwl3945_ibss_seq { |
513 | u8 mac[ETH_ALEN]; | 518 | u8 mac[ETH_ALEN]; |
514 | u16 seq_num; | 519 | u16 seq_num; |
@@ -566,17 +571,8 @@ extern int iwl3945_send_add_station(struct iwl3945_priv *priv, | |||
566 | struct iwl3945_addsta_cmd *sta, u8 flags); | 571 | struct iwl3945_addsta_cmd *sta, u8 flags); |
567 | extern u8 iwl3945_add_station(struct iwl3945_priv *priv, const u8 *bssid, | 572 | extern u8 iwl3945_add_station(struct iwl3945_priv *priv, const u8 *bssid, |
568 | int is_ap, u8 flags); | 573 | int is_ap, u8 flags); |
569 | extern int iwl3945_is_network_packet(struct iwl3945_priv *priv, | ||
570 | struct ieee80211_hdr *header); | ||
571 | extern int iwl3945_power_init_handle(struct iwl3945_priv *priv); | 574 | extern int iwl3945_power_init_handle(struct iwl3945_priv *priv); |
572 | extern int iwl3945_eeprom_init(struct iwl3945_priv *priv); | 575 | extern int iwl3945_eeprom_init(struct iwl3945_priv *priv); |
573 | extern void iwl3945_handle_data_packet_monitor(struct iwl3945_priv *priv, | ||
574 | struct iwl3945_rx_mem_buffer *rxb, | ||
575 | void *data, short len, | ||
576 | struct ieee80211_rx_status *stats, | ||
577 | u16 phy_flags); | ||
578 | extern int iwl3945_is_duplicate_packet(struct iwl3945_priv *priv, | ||
579 | struct ieee80211_hdr *header); | ||
580 | extern int iwl3945_rx_queue_alloc(struct iwl3945_priv *priv); | 576 | extern int iwl3945_rx_queue_alloc(struct iwl3945_priv *priv); |
581 | extern void iwl3945_rx_queue_reset(struct iwl3945_priv *priv, | 577 | extern void iwl3945_rx_queue_reset(struct iwl3945_priv *priv, |
582 | struct iwl3945_rx_queue *rxq); | 578 | struct iwl3945_rx_queue *rxq); |
@@ -645,7 +641,7 @@ extern unsigned int iwl3945_hw_get_beacon_cmd(struct iwl3945_priv *priv, | |||
645 | extern int iwl3945_hw_get_rx_read(struct iwl3945_priv *priv); | 641 | extern int iwl3945_hw_get_rx_read(struct iwl3945_priv *priv); |
646 | extern void iwl3945_hw_build_tx_cmd_rate(struct iwl3945_priv *priv, | 642 | extern void iwl3945_hw_build_tx_cmd_rate(struct iwl3945_priv *priv, |
647 | struct iwl3945_cmd *cmd, | 643 | struct iwl3945_cmd *cmd, |
648 | struct ieee80211_tx_control *ctrl, | 644 | struct ieee80211_tx_info *info, |
649 | struct ieee80211_hdr *hdr, | 645 | struct ieee80211_hdr *hdr, |
650 | int sta_id, int tx_id); | 646 | int sta_id, int tx_id); |
651 | extern int iwl3945_hw_reg_send_txpower(struct iwl3945_priv *priv); | 647 | extern int iwl3945_hw_reg_send_txpower(struct iwl3945_priv *priv); |
@@ -687,6 +683,18 @@ enum { | |||
687 | 683 | ||
688 | #endif | 684 | #endif |
689 | 685 | ||
686 | #ifdef CONFIG_IWL3945_RFKILL | ||
687 | struct iwl3945_priv; | ||
688 | |||
689 | void iwl3945_rfkill_set_hw_state(struct iwl3945_priv *priv); | ||
690 | void iwl3945_rfkill_unregister(struct iwl3945_priv *priv); | ||
691 | int iwl3945_rfkill_init(struct iwl3945_priv *priv); | ||
692 | #else | ||
693 | static inline void iwl3945_rfkill_set_hw_state(struct iwl3945_priv *priv) {} | ||
694 | static inline void iwl3945_rfkill_unregister(struct iwl3945_priv *priv) {} | ||
695 | static inline int iwl3945_rfkill_init(struct iwl3945_priv *priv) { return 0; } | ||
696 | #endif | ||
697 | |||
690 | #define IWL_MAX_NUM_QUEUES IWL39_MAX_NUM_QUEUES | 698 | #define IWL_MAX_NUM_QUEUES IWL39_MAX_NUM_QUEUES |
691 | 699 | ||
692 | struct iwl3945_priv { | 700 | struct iwl3945_priv { |
@@ -703,7 +711,6 @@ struct iwl3945_priv { | |||
703 | 711 | ||
704 | enum ieee80211_band band; | 712 | enum ieee80211_band band; |
705 | int alloc_rxb_skb; | 713 | int alloc_rxb_skb; |
706 | bool add_radiotap; | ||
707 | 714 | ||
708 | void (*rx_handlers[REPLY_MAX])(struct iwl3945_priv *priv, | 715 | void (*rx_handlers[REPLY_MAX])(struct iwl3945_priv *priv, |
709 | struct iwl3945_rx_mem_buffer *rxb); | 716 | struct iwl3945_rx_mem_buffer *rxb); |
@@ -780,12 +787,17 @@ struct iwl3945_priv { | |||
780 | struct iwl3945_init_alive_resp card_alive_init; | 787 | struct iwl3945_init_alive_resp card_alive_init; |
781 | struct iwl3945_alive_resp card_alive; | 788 | struct iwl3945_alive_resp card_alive; |
782 | 789 | ||
790 | #ifdef CONFIG_IWL3945_RFKILL | ||
791 | struct rfkill *rfkill; | ||
792 | #endif | ||
793 | |||
783 | #ifdef CONFIG_IWL3945_LEDS | 794 | #ifdef CONFIG_IWL3945_LEDS |
784 | struct iwl3945_led led[IWL_LED_TRG_MAX]; | 795 | struct iwl3945_led led[IWL_LED_TRG_MAX]; |
785 | unsigned long last_blink_time; | 796 | unsigned long last_blink_time; |
786 | u8 last_blink_rate; | 797 | u8 last_blink_rate; |
787 | u8 allow_blinking; | 798 | u8 allow_blinking; |
788 | unsigned int rxtxpackets; | 799 | unsigned int rxtxpackets; |
800 | u64 led_tpt; | ||
789 | #endif | 801 | #endif |
790 | 802 | ||
791 | 803 | ||
@@ -836,24 +848,14 @@ struct iwl3945_priv { | |||
836 | 848 | ||
837 | u8 mac80211_registered; | 849 | u8 mac80211_registered; |
838 | 850 | ||
839 | u32 notif_missed_beacons; | ||
840 | |||
841 | /* Rx'd packet timing information */ | 851 | /* Rx'd packet timing information */ |
842 | u32 last_beacon_time; | 852 | u32 last_beacon_time; |
843 | u64 last_tsf; | 853 | u64 last_tsf; |
844 | 854 | ||
845 | /* Duplicate packet detection */ | ||
846 | u16 last_seq_num; | ||
847 | u16 last_frag_num; | ||
848 | unsigned long last_packet_time; | ||
849 | |||
850 | /* Hash table for finding stations in IBSS network */ | ||
851 | struct list_head ibss_mac_hash[IWL_IBSS_MAC_HASH_SIZE]; | ||
852 | |||
853 | /* eeprom */ | 855 | /* eeprom */ |
854 | struct iwl3945_eeprom eeprom; | 856 | struct iwl3945_eeprom eeprom; |
855 | 857 | ||
856 | enum ieee80211_if_types iw_mode; | 858 | enum nl80211_iftype iw_mode; |
857 | 859 | ||
858 | struct sk_buff *ibss_beacon; | 860 | struct sk_buff *ibss_beacon; |
859 | 861 | ||
@@ -886,6 +888,7 @@ struct iwl3945_priv { | |||
886 | struct work_struct report_work; | 888 | struct work_struct report_work; |
887 | struct work_struct request_scan; | 889 | struct work_struct request_scan; |
888 | struct work_struct beacon_update; | 890 | struct work_struct beacon_update; |
891 | struct work_struct set_monitor; | ||
889 | 892 | ||
890 | struct tasklet_struct irq_tasklet; | 893 | struct tasklet_struct irq_tasklet; |
891 | 894 | ||
@@ -895,7 +898,6 @@ struct iwl3945_priv { | |||
895 | struct delayed_work thermal_periodic; | 898 | struct delayed_work thermal_periodic; |
896 | struct delayed_work gather_stats; | 899 | struct delayed_work gather_stats; |
897 | struct delayed_work scan_check; | 900 | struct delayed_work scan_check; |
898 | struct delayed_work post_associate; | ||
899 | 901 | ||
900 | #define IWL_DEFAULT_TX_POWER 0x0F | 902 | #define IWL_DEFAULT_TX_POWER 0x0F |
901 | s8 user_txpower_limit; | 903 | s8 user_txpower_limit; |
@@ -924,11 +926,6 @@ static inline int is_channel_valid(const struct iwl3945_channel_info *ch_info) | |||
924 | return (ch_info->flags & EEPROM_CHANNEL_VALID) ? 1 : 0; | 926 | return (ch_info->flags & EEPROM_CHANNEL_VALID) ? 1 : 0; |
925 | } | 927 | } |
926 | 928 | ||
927 | static inline int is_channel_narrow(const struct iwl3945_channel_info *ch_info) | ||
928 | { | ||
929 | return (ch_info->flags & EEPROM_CHANNEL_NARROW) ? 1 : 0; | ||
930 | } | ||
931 | |||
932 | static inline int is_channel_radar(const struct iwl3945_channel_info *ch_info) | 929 | static inline int is_channel_radar(const struct iwl3945_channel_info *ch_info) |
933 | { | 930 | { |
934 | return (ch_info->flags & EEPROM_CHANNEL_RADAR) ? 1 : 0; | 931 | return (ch_info->flags & EEPROM_CHANNEL_RADAR) ? 1 : 0; |