aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-4965.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-4965.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-4965.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wireless/iwlwifi/iwl-4965.h
index de5c1bf8fc42..cb8f7f2a8d48 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.h
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.h
@@ -206,7 +206,7 @@ struct iwl4965_channel_info {
206 206
207 u8 group_index; /* 0-4, maps channel to group1/2/3/4/5 */ 207 u8 group_index; /* 0-4, maps channel to group1/2/3/4/5 */
208 u8 band_index; /* 0-4, maps channel to band1/2/3/4/5 */ 208 u8 band_index; /* 0-4, maps channel to band1/2/3/4/5 */
209 u8 phymode; /* MODE_IEEE80211{A,B,G} */ 209 enum ieee80211_band band;
210 210
211 /* Radio/DSP gain settings for each "normal" data Tx rate. 211 /* Radio/DSP gain settings for each "normal" data Tx rate.
212 * These include, in addition to RF and DSP gain, a few fields for 212 * These include, in addition to RF and DSP gain, a few fields for
@@ -764,7 +764,8 @@ extern void iwl4965_update_rate_scaling(struct iwl4965_priv *priv, u8 mode);
764extern void iwl4965_chain_noise_reset(struct iwl4965_priv *priv); 764extern void iwl4965_chain_noise_reset(struct iwl4965_priv *priv);
765extern void iwl4965_init_sensitivity(struct iwl4965_priv *priv, u8 flags, 765extern void iwl4965_init_sensitivity(struct iwl4965_priv *priv, u8 flags,
766 u8 force); 766 u8 force);
767extern int iwl4965_set_fat_chan_info(struct iwl4965_priv *priv, int phymode, 767extern int iwl4965_set_fat_chan_info(struct iwl4965_priv *priv,
768 enum ieee80211_band band,
768 u16 channel, 769 u16 channel,
769 const struct iwl4965_eeprom_channel *eeprom_ch, 770 const struct iwl4965_eeprom_channel *eeprom_ch,
770 u8 fat_extension_channel); 771 u8 fat_extension_channel);
@@ -977,14 +978,14 @@ struct iwl4965_priv {
977 struct list_head free_frames; 978 struct list_head free_frames;
978 int frames_count; 979 int frames_count;
979 980
980 u8 phymode; 981 enum ieee80211_band band;
981 int alloc_rxb_skb; 982 int alloc_rxb_skb;
982 bool add_radiotap; 983 bool add_radiotap;
983 984
984 void (*rx_handlers[REPLY_MAX])(struct iwl4965_priv *priv, 985 void (*rx_handlers[REPLY_MAX])(struct iwl4965_priv *priv,
985 struct iwl4965_rx_mem_buffer *rxb); 986 struct iwl4965_rx_mem_buffer *rxb);
986 987
987 const struct ieee80211_hw_mode *modes; 988 struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS];
988 989
989#ifdef CONFIG_IWL4965_SPECTRUM_MEASUREMENT 990#ifdef CONFIG_IWL4965_SPECTRUM_MEASUREMENT
990 /* spectrum measurement report caching */ 991 /* spectrum measurement report caching */
@@ -1243,13 +1244,12 @@ static inline int is_channel_radar(const struct iwl4965_channel_info *ch_info)
1243 1244
1244static inline u8 is_channel_a_band(const struct iwl4965_channel_info *ch_info) 1245static inline u8 is_channel_a_band(const struct iwl4965_channel_info *ch_info)
1245{ 1246{
1246 return ch_info->phymode == MODE_IEEE80211A; 1247 return ch_info->band == IEEE80211_BAND_5GHZ;
1247} 1248}
1248 1249
1249static inline u8 is_channel_bg_band(const struct iwl4965_channel_info *ch_info) 1250static inline u8 is_channel_bg_band(const struct iwl4965_channel_info *ch_info)
1250{ 1251{
1251 return ((ch_info->phymode == MODE_IEEE80211B) || 1252 return ch_info->band == IEEE80211_BAND_2GHZ;
1252 (ch_info->phymode == MODE_IEEE80211G));
1253} 1253}
1254 1254
1255static inline int is_channel_passive(const struct iwl4965_channel_info *ch) 1255static inline int is_channel_passive(const struct iwl4965_channel_info *ch)
@@ -1263,7 +1263,7 @@ static inline int is_channel_ibss(const struct iwl4965_channel_info *ch)
1263} 1263}
1264 1264
1265extern const struct iwl4965_channel_info *iwl4965_get_channel_info( 1265extern const struct iwl4965_channel_info *iwl4965_get_channel_info(
1266 const struct iwl4965_priv *priv, int phymode, u16 channel); 1266 const struct iwl4965_priv *priv, enum ieee80211_band band, u16 channel);
1267 1267
1268/* Requires full declaration of iwl4965_priv before including */ 1268/* Requires full declaration of iwl4965_priv before including */
1269#include "iwl-4965-io.h" 1269#include "iwl-4965-io.h"