aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-01-07 04:13:27 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:59:55 -0500
commit4797938c5dfa22af30fd16679192972f878419a1 (patch)
tree5e9de4801903f0e8fd5aac75c26295ed0069667a /include
parent47166791b7296db5c0a7189401e42b8c7f4cca25 (diff)
mac80211: clean up channel type config
The channel_type really doesn't need to be the only member in a new structure, so remove the struct. Additionally, remove the _CONF_CHANGE_HT flag and use _CONF_CHANGE_CHANNEL when the channel type changes, since that's enough of a change to require reprogramming the hardware anyway. Signed-off-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.h20
1 files changed, 7 insertions, 13 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 0ffe932942fd..76537f103872 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -507,10 +507,6 @@ static inline int __deprecated __IEEE80211_CONF_SHORT_SLOT_TIME(void)
507} 507}
508#define IEEE80211_CONF_SHORT_SLOT_TIME (__IEEE80211_CONF_SHORT_SLOT_TIME()) 508#define IEEE80211_CONF_SHORT_SLOT_TIME (__IEEE80211_CONF_SHORT_SLOT_TIME())
509 509
510struct ieee80211_ht_conf {
511 enum nl80211_channel_type channel_type;
512};
513
514/** 510/**
515 * enum ieee80211_conf_changed - denotes which configuration changed 511 * enum ieee80211_conf_changed - denotes which configuration changed
516 * 512 *
@@ -520,9 +516,8 @@ struct ieee80211_ht_conf {
520 * @IEEE80211_CONF_CHANGE_RADIOTAP: the radiotap flag changed 516 * @IEEE80211_CONF_CHANGE_RADIOTAP: the radiotap flag changed
521 * @IEEE80211_CONF_CHANGE_PS: the PS flag changed 517 * @IEEE80211_CONF_CHANGE_PS: the PS flag changed
522 * @IEEE80211_CONF_CHANGE_POWER: the TX power changed 518 * @IEEE80211_CONF_CHANGE_POWER: the TX power changed
523 * @IEEE80211_CONF_CHANGE_CHANNEL: the channel changed 519 * @IEEE80211_CONF_CHANGE_CHANNEL: the channel/channel_type changed
524 * @IEEE80211_CONF_CHANGE_RETRY_LIMITS: retry limits changed 520 * @IEEE80211_CONF_CHANGE_RETRY_LIMITS: retry limits changed
525 * @IEEE80211_CONF_CHANGE_HT: HT configuration changed
526 */ 521 */
527enum ieee80211_conf_changed { 522enum ieee80211_conf_changed {
528 IEEE80211_CONF_CHANGE_RADIO_ENABLED = BIT(0), 523 IEEE80211_CONF_CHANGE_RADIO_ENABLED = BIT(0),
@@ -533,7 +528,6 @@ enum ieee80211_conf_changed {
533 IEEE80211_CONF_CHANGE_POWER = BIT(5), 528 IEEE80211_CONF_CHANGE_POWER = BIT(5),
534 IEEE80211_CONF_CHANGE_CHANNEL = BIT(6), 529 IEEE80211_CONF_CHANGE_CHANNEL = BIT(6),
535 IEEE80211_CONF_CHANGE_RETRY_LIMITS = BIT(7), 530 IEEE80211_CONF_CHANGE_RETRY_LIMITS = BIT(7),
536 IEEE80211_CONF_CHANGE_HT = BIT(8),
537}; 531};
538 532
539/** 533/**
@@ -547,7 +541,7 @@ enum ieee80211_conf_changed {
547 * @flags: configuration flags defined above 541 * @flags: configuration flags defined above
548 * @power_level: requested transmit power (in dBm) 542 * @power_level: requested transmit power (in dBm)
549 * @channel: the channel to tune to 543 * @channel: the channel to tune to
550 * @ht: the HT configuration for the device 544 * @channel_type: the channel (HT) type
551 * @long_frame_max_tx_count: Maximum number of transmissions for a "long" frame 545 * @long_frame_max_tx_count: Maximum number of transmissions for a "long" frame
552 * (a frame not RTS protected), called "dot11LongRetryLimit" in 802.11, 546 * (a frame not RTS protected), called "dot11LongRetryLimit" in 802.11,
553 * but actually means the number of transmissions not the number of retries 547 * but actually means the number of transmissions not the number of retries
@@ -566,7 +560,7 @@ struct ieee80211_conf {
566 u8 long_frame_max_tx_count, short_frame_max_tx_count; 560 u8 long_frame_max_tx_count, short_frame_max_tx_count;
567 561
568 struct ieee80211_channel *channel; 562 struct ieee80211_channel *channel;
569 struct ieee80211_ht_conf ht; 563 enum nl80211_channel_type channel_type;
570}; 564};
571 565
572/** 566/**
@@ -1960,19 +1954,19 @@ void ieee80211_rate_control_unregister(struct rate_control_ops *ops);
1960static inline bool 1954static inline bool
1961conf_is_ht20(struct ieee80211_conf *conf) 1955conf_is_ht20(struct ieee80211_conf *conf)
1962{ 1956{
1963 return conf->ht.channel_type == NL80211_CHAN_HT20; 1957 return conf->channel_type == NL80211_CHAN_HT20;
1964} 1958}
1965 1959
1966static inline bool 1960static inline bool
1967conf_is_ht40_minus(struct ieee80211_conf *conf) 1961conf_is_ht40_minus(struct ieee80211_conf *conf)
1968{ 1962{
1969 return conf->ht.channel_type == NL80211_CHAN_HT40MINUS; 1963 return conf->channel_type == NL80211_CHAN_HT40MINUS;
1970} 1964}
1971 1965
1972static inline bool 1966static inline bool
1973conf_is_ht40_plus(struct ieee80211_conf *conf) 1967conf_is_ht40_plus(struct ieee80211_conf *conf)
1974{ 1968{
1975 return conf->ht.channel_type == NL80211_CHAN_HT40PLUS; 1969 return conf->channel_type == NL80211_CHAN_HT40PLUS;
1976} 1970}
1977 1971
1978static inline bool 1972static inline bool
@@ -1984,7 +1978,7 @@ conf_is_ht40(struct ieee80211_conf *conf)
1984static inline bool 1978static inline bool
1985conf_is_ht(struct ieee80211_conf *conf) 1979conf_is_ht(struct ieee80211_conf *conf)
1986{ 1980{
1987 return conf->ht.channel_type != NL80211_CHAN_NO_HT; 1981 return conf->channel_type != NL80211_CHAN_NO_HT;
1988} 1982}
1989 1983
1990#endif /* MAC80211_H */ 1984#endif /* MAC80211_H */