diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2008-12-23 15:58:36 -0800 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 15:59:27 -0500 |
commit | 10c806b32db1c9f010945e92043ef2a3f6fffc3f (patch) | |
tree | fc971f55e0f4b30a63a024ad786498f6b6bc3f36 /include | |
parent | 51af3d3fbbe326077a7e245268a7de325de6ecd2 (diff) | |
download | op-kernel-dev-10c806b32db1c9f010945e92043ef2a3f6fffc3f.zip op-kernel-dev-10c806b32db1c9f010945e92043ef2a3f6fffc3f.tar.gz |
mac80211: add HT conf helpers
In HT capable drivers you often need to check if you
are currently using HT20 or HT40. This adds a few small
helpers to let drivers figure that out.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/mac80211.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 559422f..1e8db8a 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -1962,4 +1962,34 @@ rate_lowest_index(struct ieee80211_supported_band *sband, int ieee80211_rate_control_register(struct rate_control_ops *ops); void ieee80211_rate_control_unregister(struct rate_control_ops *ops); +static inline bool +conf_is_ht20(struct ieee80211_conf *conf) +{ + return conf->ht.channel_type == NL80211_CHAN_HT20; +} + +static inline bool +conf_is_ht40_minus(struct ieee80211_conf *conf) +{ + return conf->ht.channel_type == NL80211_CHAN_HT40MINUS; +} + +static inline bool +conf_is_ht40_plus(struct ieee80211_conf *conf) +{ + return conf->ht.channel_type == NL80211_CHAN_HT40PLUS; +} + +static inline bool +conf_is_ht40(struct ieee80211_conf *conf) +{ + return conf_is_ht40_minus(conf) || conf_is_ht40_plus(conf); +} + +static inline bool +conf_is_ht(struct ieee80211_conf *conf) +{ + return conf->ht.channel_type != NL80211_CHAN_NO_HT; +} + #endif /* MAC80211_H */ |