aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorKarl Beldan <karl.beldan@rivierawaves.com>2013-03-25 11:26:57 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-03-25 14:19:35 -0400
commit675a0b049abf6edf30f8dd84c5610b6edc2296c8 (patch)
tree164178c576642dc1ec8ae70d9e26a5ec33472d26 /include/net
parent219c38674c262378ec411dd8318ebfd199fbce8d (diff)
mac80211: Use a cfg80211_chan_def in ieee80211_hw_conf_chan
Drivers that don't use chanctxes cannot perform VHT association because they still use a "backward compatibility" pair of {ieee80211_channel, nl80211_channel_type} in ieee80211_conf and ieee80211_local. Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com> [fix kernel-doc] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/mac80211.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 23a275a9a3b2..64faf015dd1e 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -974,8 +974,7 @@ enum ieee80211_smps_mode {
974 * @power_level: requested transmit power (in dBm), backward compatibility 974 * @power_level: requested transmit power (in dBm), backward compatibility
975 * value only that is set to the minimum of all interfaces 975 * value only that is set to the minimum of all interfaces
976 * 976 *
977 * @channel: the channel to tune to 977 * @chandef: the channel definition to tune to
978 * @channel_type: the channel (HT) type
979 * @radar_enabled: whether radar detection is enabled 978 * @radar_enabled: whether radar detection is enabled
980 * 979 *
981 * @long_frame_max_tx_count: Maximum number of transmissions for a "long" frame 980 * @long_frame_max_tx_count: Maximum number of transmissions for a "long" frame
@@ -1001,8 +1000,7 @@ struct ieee80211_conf {
1001 1000
1002 u8 long_frame_max_tx_count, short_frame_max_tx_count; 1001 u8 long_frame_max_tx_count, short_frame_max_tx_count;
1003 1002
1004 struct ieee80211_channel *channel; 1003 struct cfg80211_chan_def chandef;
1005 enum nl80211_channel_type channel_type;
1006 bool radar_enabled; 1004 bool radar_enabled;
1007 enum ieee80211_smps_mode smps_mode; 1005 enum ieee80211_smps_mode smps_mode;
1008}; 1006};
@@ -4216,31 +4214,33 @@ void ieee80211_rate_control_unregister(struct rate_control_ops *ops);
4216static inline bool 4214static inline bool
4217conf_is_ht20(struct ieee80211_conf *conf) 4215conf_is_ht20(struct ieee80211_conf *conf)
4218{ 4216{
4219 return conf->channel_type == NL80211_CHAN_HT20; 4217 return conf->chandef.width == NL80211_CHAN_WIDTH_20;
4220} 4218}
4221 4219
4222static inline bool 4220static inline bool
4223conf_is_ht40_minus(struct ieee80211_conf *conf) 4221conf_is_ht40_minus(struct ieee80211_conf *conf)
4224{ 4222{
4225 return conf->channel_type == NL80211_CHAN_HT40MINUS; 4223 return conf->chandef.width == NL80211_CHAN_WIDTH_40 &&
4224 conf->chandef.center_freq1 < conf->chandef.chan->center_freq;
4226} 4225}
4227 4226
4228static inline bool 4227static inline bool
4229conf_is_ht40_plus(struct ieee80211_conf *conf) 4228conf_is_ht40_plus(struct ieee80211_conf *conf)
4230{ 4229{
4231 return conf->channel_type == NL80211_CHAN_HT40PLUS; 4230 return conf->chandef.width == NL80211_CHAN_WIDTH_40 &&
4231 conf->chandef.center_freq1 > conf->chandef.chan->center_freq;
4232} 4232}
4233 4233
4234static inline bool 4234static inline bool
4235conf_is_ht40(struct ieee80211_conf *conf) 4235conf_is_ht40(struct ieee80211_conf *conf)
4236{ 4236{
4237 return conf_is_ht40_minus(conf) || conf_is_ht40_plus(conf); 4237 return conf->chandef.width == NL80211_CHAN_WIDTH_40;
4238} 4238}
4239 4239
4240static inline bool 4240static inline bool
4241conf_is_ht(struct ieee80211_conf *conf) 4241conf_is_ht(struct ieee80211_conf *conf)
4242{ 4242{
4243 return conf->channel_type != NL80211_CHAN_NO_HT; 4243 return conf->chandef.width != NL80211_CHAN_WIDTH_20_NOHT;
4244} 4244}
4245 4245
4246static inline enum nl80211_iftype 4246static inline enum nl80211_iftype