diff options
author | Zhu Yi <yi.zhu@intel.com> | 2007-12-19 22:27:32 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:07:53 -0500 |
commit | 12342c475f5de17071eaf24ea2938ba8dfe285f2 (patch) | |
tree | a2cdfd191069397e093f2410009092e7e96c9325 /drivers/net/wireless/iwlwifi/iwl-3945.h | |
parent | 7e94041ca17685cf12c658b8edc008dd0bdb00c7 (diff) |
iwlwifi: proper monitor support
This patch changes the iwlwifi driver to properly support
monitor interfaces after the filter flags change.
The patch is originally created by Johannes Berg for iwl4965. I fixed some
of the comments and created a similar patch for iwl3945.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.h | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h index bfa260654c5a..f1aa4dc5aac4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.h +++ b/drivers/net/wireless/iwlwifi/iwl-3945.h | |||
@@ -91,29 +91,6 @@ struct iwl3945_rx_mem_buffer { | |||
91 | struct list_head list; | 91 | struct list_head list; |
92 | }; | 92 | }; |
93 | 93 | ||
94 | struct iwl3945_rt_rx_hdr { | ||
95 | struct ieee80211_radiotap_header rt_hdr; | ||
96 | __le64 rt_tsf; /* TSF */ | ||
97 | u8 rt_flags; /* radiotap packet flags */ | ||
98 | u8 rt_rate; /* rate in 500kb/s */ | ||
99 | __le16 rt_channelMHz; /* channel in MHz */ | ||
100 | __le16 rt_chbitmask; /* channel bitfield */ | ||
101 | s8 rt_dbmsignal; /* signal in dBm, kluged to signed */ | ||
102 | s8 rt_dbmnoise; | ||
103 | u8 rt_antenna; /* antenna number */ | ||
104 | u8 payload[0]; /* payload... */ | ||
105 | } __attribute__ ((packed)); | ||
106 | |||
107 | struct iwl3945_rt_tx_hdr { | ||
108 | struct ieee80211_radiotap_header rt_hdr; | ||
109 | u8 rt_rate; /* rate in 500kb/s */ | ||
110 | __le16 rt_channel; /* channel in mHz */ | ||
111 | __le16 rt_chbitmask; /* channel bitfield */ | ||
112 | s8 rt_dbmsignal; /* signal in dBm, kluged to signed */ | ||
113 | u8 rt_antenna; /* antenna number */ | ||
114 | u8 payload[0]; /* payload... */ | ||
115 | } __attribute__ ((packed)); | ||
116 | |||
117 | /* | 94 | /* |
118 | * Generic queue structure | 95 | * Generic queue structure |
119 | * | 96 | * |
@@ -531,7 +508,7 @@ struct iwl3945_ibss_seq { | |||
531 | }; | 508 | }; |
532 | 509 | ||
533 | /** | 510 | /** |
534 | * struct iwl4965_driver_hw_info | 511 | * struct iwl3945_driver_hw_info |
535 | * @max_txq_num: Max # Tx queues supported | 512 | * @max_txq_num: Max # Tx queues supported |
536 | * @ac_queue_count: # Tx queues for EDCA Access Categories (AC) | 513 | * @ac_queue_count: # Tx queues for EDCA Access Categories (AC) |
537 | * @tx_cmd_len: Size of Tx command (but not including frame itself) | 514 | * @tx_cmd_len: Size of Tx command (but not including frame itself) |
@@ -725,6 +702,7 @@ struct iwl3945_priv { | |||
725 | 702 | ||
726 | u8 phymode; | 703 | u8 phymode; |
727 | int alloc_rxb_skb; | 704 | int alloc_rxb_skb; |
705 | bool add_radiotap; | ||
728 | 706 | ||
729 | void (*rx_handlers[REPLY_MAX])(struct iwl3945_priv *priv, | 707 | void (*rx_handlers[REPLY_MAX])(struct iwl3945_priv *priv, |
730 | struct iwl3945_rx_mem_buffer *rxb); | 708 | struct iwl3945_rx_mem_buffer *rxb); |
@@ -980,6 +958,16 @@ static inline int is_channel_ibss(const struct iwl3945_channel_info *ch) | |||
980 | return ((ch->flags & EEPROM_CHANNEL_IBSS)) ? 1 : 0; | 958 | return ((ch->flags & EEPROM_CHANNEL_IBSS)) ? 1 : 0; |
981 | } | 959 | } |
982 | 960 | ||
961 | static inline int iwl3945_rate_index_from_plcp(int plcp) | ||
962 | { | ||
963 | int i; | ||
964 | |||
965 | for (i = 0; i < IWL_RATE_COUNT; i++) | ||
966 | if (iwl3945_rates[i].plcp == plcp) | ||
967 | return i; | ||
968 | return -1; | ||
969 | } | ||
970 | |||
983 | extern const struct iwl3945_channel_info *iwl3945_get_channel_info( | 971 | extern const struct iwl3945_channel_info *iwl3945_get_channel_info( |
984 | const struct iwl3945_priv *priv, int phymode, u16 channel); | 972 | const struct iwl3945_priv *priv, int phymode, u16 channel); |
985 | 973 | ||