aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-3945.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.h51
1 files changed, 23 insertions, 28 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h
index c7695a215a39..fa81ba1af3d3 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 */
40extern struct pci_device_id iwl3945_hw_card_ids[]; 44extern struct pci_device_id iwl3945_hw_card_ids[];
41 45
@@ -124,7 +128,6 @@ int iwl3945_x2_queue_used(const struct iwl3945_queue *q, int i);
124 128
125/* One for each TFD */ 129/* One for each TFD */
126struct iwl3945_tx_info { 130struct iwl3945_tx_info {
127 struct ieee80211_tx_status status;
128 struct sk_buff *skb[MAX_NUM_OF_TBS]; 131 struct sk_buff *skb[MAX_NUM_OF_TBS];
129}; 132};
130 133
@@ -507,8 +510,6 @@ struct iwl3945_ucode {
507 u8 data[0]; /* data in same order as "size" elements */ 510 u8 data[0]; /* data in same order as "size" elements */
508}; 511};
509 512
510#define IWL_IBSS_MAC_HASH_SIZE 32
511
512struct iwl3945_ibss_seq { 513struct iwl3945_ibss_seq {
513 u8 mac[ETH_ALEN]; 514 u8 mac[ETH_ALEN];
514 u16 seq_num; 515 u16 seq_num;
@@ -566,17 +567,8 @@ extern int iwl3945_send_add_station(struct iwl3945_priv *priv,
566 struct iwl3945_addsta_cmd *sta, u8 flags); 567 struct iwl3945_addsta_cmd *sta, u8 flags);
567extern u8 iwl3945_add_station(struct iwl3945_priv *priv, const u8 *bssid, 568extern u8 iwl3945_add_station(struct iwl3945_priv *priv, const u8 *bssid,
568 int is_ap, u8 flags); 569 int is_ap, u8 flags);
569extern int iwl3945_is_network_packet(struct iwl3945_priv *priv,
570 struct ieee80211_hdr *header);
571extern int iwl3945_power_init_handle(struct iwl3945_priv *priv); 570extern int iwl3945_power_init_handle(struct iwl3945_priv *priv);
572extern int iwl3945_eeprom_init(struct iwl3945_priv *priv); 571extern int iwl3945_eeprom_init(struct iwl3945_priv *priv);
573extern 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);
578extern int iwl3945_is_duplicate_packet(struct iwl3945_priv *priv,
579 struct ieee80211_hdr *header);
580extern int iwl3945_rx_queue_alloc(struct iwl3945_priv *priv); 572extern int iwl3945_rx_queue_alloc(struct iwl3945_priv *priv);
581extern void iwl3945_rx_queue_reset(struct iwl3945_priv *priv, 573extern void iwl3945_rx_queue_reset(struct iwl3945_priv *priv,
582 struct iwl3945_rx_queue *rxq); 574 struct iwl3945_rx_queue *rxq);
@@ -645,7 +637,7 @@ extern unsigned int iwl3945_hw_get_beacon_cmd(struct iwl3945_priv *priv,
645extern int iwl3945_hw_get_rx_read(struct iwl3945_priv *priv); 637extern int iwl3945_hw_get_rx_read(struct iwl3945_priv *priv);
646extern void iwl3945_hw_build_tx_cmd_rate(struct iwl3945_priv *priv, 638extern void iwl3945_hw_build_tx_cmd_rate(struct iwl3945_priv *priv,
647 struct iwl3945_cmd *cmd, 639 struct iwl3945_cmd *cmd,
648 struct ieee80211_tx_control *ctrl, 640 struct ieee80211_tx_info *info,
649 struct ieee80211_hdr *hdr, 641 struct ieee80211_hdr *hdr,
650 int sta_id, int tx_id); 642 int sta_id, int tx_id);
651extern int iwl3945_hw_reg_send_txpower(struct iwl3945_priv *priv); 643extern int iwl3945_hw_reg_send_txpower(struct iwl3945_priv *priv);
@@ -687,6 +679,18 @@ enum {
687 679
688#endif 680#endif
689 681
682#ifdef CONFIG_IWL3945_RFKILL
683struct iwl3945_priv;
684
685void iwl3945_rfkill_set_hw_state(struct iwl3945_priv *priv);
686void iwl3945_rfkill_unregister(struct iwl3945_priv *priv);
687int iwl3945_rfkill_init(struct iwl3945_priv *priv);
688#else
689static inline void iwl3945_rfkill_set_hw_state(struct iwl3945_priv *priv) {}
690static inline void iwl3945_rfkill_unregister(struct iwl3945_priv *priv) {}
691static inline int iwl3945_rfkill_init(struct iwl3945_priv *priv) { return 0; }
692#endif
693
690#define IWL_MAX_NUM_QUEUES IWL39_MAX_NUM_QUEUES 694#define IWL_MAX_NUM_QUEUES IWL39_MAX_NUM_QUEUES
691 695
692struct iwl3945_priv { 696struct iwl3945_priv {
@@ -780,12 +784,17 @@ struct iwl3945_priv {
780 struct iwl3945_init_alive_resp card_alive_init; 784 struct iwl3945_init_alive_resp card_alive_init;
781 struct iwl3945_alive_resp card_alive; 785 struct iwl3945_alive_resp card_alive;
782 786
787#ifdef CONFIG_IWL3945_RFKILL
788 struct rfkill *rfkill;
789#endif
790
783#ifdef CONFIG_IWL3945_LEDS 791#ifdef CONFIG_IWL3945_LEDS
784 struct iwl3945_led led[IWL_LED_TRG_MAX]; 792 struct iwl3945_led led[IWL_LED_TRG_MAX];
785 unsigned long last_blink_time; 793 unsigned long last_blink_time;
786 u8 last_blink_rate; 794 u8 last_blink_rate;
787 u8 allow_blinking; 795 u8 allow_blinking;
788 unsigned int rxtxpackets; 796 unsigned int rxtxpackets;
797 u64 led_tpt;
789#endif 798#endif
790 799
791 800
@@ -836,20 +845,10 @@ struct iwl3945_priv {
836 845
837 u8 mac80211_registered; 846 u8 mac80211_registered;
838 847
839 u32 notif_missed_beacons;
840
841 /* Rx'd packet timing information */ 848 /* Rx'd packet timing information */
842 u32 last_beacon_time; 849 u32 last_beacon_time;
843 u64 last_tsf; 850 u64 last_tsf;
844 851
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 */ 852 /* eeprom */
854 struct iwl3945_eeprom eeprom; 853 struct iwl3945_eeprom eeprom;
855 854
@@ -886,6 +885,7 @@ struct iwl3945_priv {
886 struct work_struct report_work; 885 struct work_struct report_work;
887 struct work_struct request_scan; 886 struct work_struct request_scan;
888 struct work_struct beacon_update; 887 struct work_struct beacon_update;
888 struct work_struct set_monitor;
889 889
890 struct tasklet_struct irq_tasklet; 890 struct tasklet_struct irq_tasklet;
891 891
@@ -924,11 +924,6 @@ static inline int is_channel_valid(const struct iwl3945_channel_info *ch_info)
924 return (ch_info->flags & EEPROM_CHANNEL_VALID) ? 1 : 0; 924 return (ch_info->flags & EEPROM_CHANNEL_VALID) ? 1 : 0;
925} 925}
926 926
927static 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
932static inline int is_channel_radar(const struct iwl3945_channel_info *ch_info) 927static inline int is_channel_radar(const struct iwl3945_channel_info *ch_info)
933{ 928{
934 return (ch_info->flags & EEPROM_CHANNEL_RADAR) ? 1 : 0; 929 return (ch_info->flags & EEPROM_CHANNEL_RADAR) ? 1 : 0;