aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-3945.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-01-24 13:38:38 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:19:32 -0500
commit8318d78a44d49ac1edf2bdec7299de3617c4232e (patch)
treed434634418edd7399737801615d247be06616fdd /drivers/net/wireless/iwlwifi/iwl-3945.h
parent10b6b80145cc93887dd8aab99bfffa375e9add31 (diff)
cfg80211 API for channels/bitrates, mac80211 and driver conversion
This patch creates new cfg80211 wiphy API for channel and bitrate registration and converts mac80211 and drivers to the new API. The old mac80211 API is completely ripped out. All drivers (except ath5k) are updated to the new API, in many cases I expect that optimisations can be done. Along with the regulatory code I've also ripped out the IEEE80211_HW_DEFAULT_REG_DOMAIN_CONFIGURED flag, I believe it to be unnecessary if the hardware simply gives us whatever channels it wants to support and we then enable/disable them as required, which is pretty much required for travelling. Additionally, the patch adds proper "basic" rate handling for STA mode interface, AP mode interface will have to have new API added to allow userspace to set the basic rate set, currently it'll be empty... However, the basic rate handling will need to be moved to the BSS conf stuff. I do expect there to be bugs in this, especially wrt. transmit power handling where I'm basically clueless about how it should work. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> 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.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h
index 1da14f9bbe0f..1beb5b676797 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.h
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.h
@@ -195,7 +195,7 @@ struct iwl3945_channel_info {
195 195
196 u8 group_index; /* 0-4, maps channel to group1/2/3/4/5 */ 196 u8 group_index; /* 0-4, maps channel to group1/2/3/4/5 */
197 u8 band_index; /* 0-4, maps channel to band1/2/3/4/5 */ 197 u8 band_index; /* 0-4, maps channel to band1/2/3/4/5 */
198 u8 phymode; /* MODE_IEEE80211{A,B,G} */ 198 enum ieee80211_band band;
199 199
200 /* Radio/DSP gain settings for each "normal" data Tx rate. 200 /* Radio/DSP gain settings for each "normal" data Tx rate.
201 * These include, in addition to RF and DSP gain, a few fields for 201 * These include, in addition to RF and DSP gain, a few fields for
@@ -699,14 +699,14 @@ struct iwl3945_priv {
699 struct list_head free_frames; 699 struct list_head free_frames;
700 int frames_count; 700 int frames_count;
701 701
702 u8 phymode; 702 enum ieee80211_band band;
703 int alloc_rxb_skb; 703 int alloc_rxb_skb;
704 bool add_radiotap; 704 bool add_radiotap;
705 705
706 void (*rx_handlers[REPLY_MAX])(struct iwl3945_priv *priv, 706 void (*rx_handlers[REPLY_MAX])(struct iwl3945_priv *priv,
707 struct iwl3945_rx_mem_buffer *rxb); 707 struct iwl3945_rx_mem_buffer *rxb);
708 708
709 const struct ieee80211_hw_mode *modes; 709 struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS];
710 710
711#ifdef CONFIG_IWL3945_SPECTRUM_MEASUREMENT 711#ifdef CONFIG_IWL3945_SPECTRUM_MEASUREMENT
712 /* spectrum measurement report caching */ 712 /* spectrum measurement report caching */
@@ -937,13 +937,12 @@ static inline int is_channel_radar(const struct iwl3945_channel_info *ch_info)
937 937
938static inline u8 is_channel_a_band(const struct iwl3945_channel_info *ch_info) 938static inline u8 is_channel_a_band(const struct iwl3945_channel_info *ch_info)
939{ 939{
940 return ch_info->phymode == MODE_IEEE80211A; 940 return ch_info->band == IEEE80211_BAND_5GHZ;
941} 941}
942 942
943static inline u8 is_channel_bg_band(const struct iwl3945_channel_info *ch_info) 943static inline u8 is_channel_bg_band(const struct iwl3945_channel_info *ch_info)
944{ 944{
945 return ((ch_info->phymode == MODE_IEEE80211B) || 945 return ch_info->band == IEEE80211_BAND_2GHZ;
946 (ch_info->phymode == MODE_IEEE80211G));
947} 946}
948 947
949static inline int is_channel_passive(const struct iwl3945_channel_info *ch) 948static inline int is_channel_passive(const struct iwl3945_channel_info *ch)
@@ -967,7 +966,7 @@ static inline int iwl3945_rate_index_from_plcp(int plcp)
967} 966}
968 967
969extern const struct iwl3945_channel_info *iwl3945_get_channel_info( 968extern const struct iwl3945_channel_info *iwl3945_get_channel_info(
970 const struct iwl3945_priv *priv, int phymode, u16 channel); 969 const struct iwl3945_priv *priv, enum ieee80211_band band, u16 channel);
971 970
972/* Requires full declaration of iwl3945_priv before including */ 971/* Requires full declaration of iwl3945_priv before including */
973#include "iwl-3945-io.h" 972#include "iwl-3945-io.h"