diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2008-12-12 01:27:43 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-12-19 15:22:54 -0500 |
commit | 094d05dc32fc2930e381189a942016e5561775d9 (patch) | |
tree | 4deedbcbe196f88cb8d9fe0cd0755775a7ff0939 /include | |
parent | 420e7fabd9c6d907280ed6b3e40eef425c5d8d8d (diff) |
mac80211: Fix HT channel selection
HT management is done differently for AP and STA modes, unify
to just the ->config() callback since HT is fundamentally a
PHY property and cannot be per-BSS.
Rename enum nl80211_sec_chan_offset as nl80211_channel_type to denote
the channel type ( NO_HT, HT20, HT40+, HT40- ).
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/nl80211.h | 22 | ||||
-rw-r--r-- | include/net/cfg80211.h | 2 | ||||
-rw-r--r-- | include/net/mac80211.h | 9 |
3 files changed, 13 insertions, 20 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 7501acfcfdc4..e86ed59f9ad5 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -201,13 +201,13 @@ enum nl80211_commands { | |||
201 | * @NL80211_ATTR_WIPHY_NAME: wiphy name (used for renaming) | 201 | * @NL80211_ATTR_WIPHY_NAME: wiphy name (used for renaming) |
202 | * @NL80211_ATTR_WIPHY_TXQ_PARAMS: a nested array of TX queue parameters | 202 | * @NL80211_ATTR_WIPHY_TXQ_PARAMS: a nested array of TX queue parameters |
203 | * @NL80211_ATTR_WIPHY_FREQ: frequency of the selected channel in MHz | 203 | * @NL80211_ATTR_WIPHY_FREQ: frequency of the selected channel in MHz |
204 | * @NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET: included with NL80211_ATTR_WIPHY_FREQ | 204 | * @NL80211_ATTR_WIPHY_CHANNEL_TYPE: included with NL80211_ATTR_WIPHY_FREQ |
205 | * if HT20 or HT40 are allowed (i.e., 802.11n disabled if not included): | 205 | * if HT20 or HT40 are allowed (i.e., 802.11n disabled if not included): |
206 | * NL80211_SEC_CHAN_NO_HT = HT not allowed (i.e., same as not including | 206 | * NL80211_CHAN_NO_HT = HT not allowed (i.e., same as not including |
207 | * this attribute) | 207 | * this attribute) |
208 | * NL80211_SEC_CHAN_DISABLED = HT20 only | 208 | * NL80211_CHAN_HT20 = HT20 only |
209 | * NL80211_SEC_CHAN_BELOW = secondary channel is below the primary channel | 209 | * NL80211_CHAN_HT40MINUS = secondary channel is below the primary channel |
210 | * NL80211_SEC_CHAN_ABOVE = secondary channel is above the primary channel | 210 | * NL80211_CHAN_HT40PLUS = secondary channel is above the primary channel |
211 | * | 211 | * |
212 | * @NL80211_ATTR_IFINDEX: network interface index of the device to operate on | 212 | * @NL80211_ATTR_IFINDEX: network interface index of the device to operate on |
213 | * @NL80211_ATTR_IFNAME: network interface name | 213 | * @NL80211_ATTR_IFNAME: network interface name |
@@ -344,7 +344,7 @@ enum nl80211_attrs { | |||
344 | 344 | ||
345 | NL80211_ATTR_WIPHY_TXQ_PARAMS, | 345 | NL80211_ATTR_WIPHY_TXQ_PARAMS, |
346 | NL80211_ATTR_WIPHY_FREQ, | 346 | NL80211_ATTR_WIPHY_FREQ, |
347 | NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET, | 347 | NL80211_ATTR_WIPHY_CHANNEL_TYPE, |
348 | 348 | ||
349 | /* add attributes here, update the policy in nl80211.c */ | 349 | /* add attributes here, update the policy in nl80211.c */ |
350 | 350 | ||
@@ -805,10 +805,10 @@ enum nl80211_txq_q { | |||
805 | NL80211_TXQ_Q_BK | 805 | NL80211_TXQ_Q_BK |
806 | }; | 806 | }; |
807 | 807 | ||
808 | enum nl80211_sec_chan_offset { | 808 | enum nl80211_channel_type { |
809 | NL80211_SEC_CHAN_NO_HT /* No HT */, | 809 | NL80211_CHAN_NO_HT, |
810 | NL80211_SEC_CHAN_DISABLED /* HT20 only */, | 810 | NL80211_CHAN_HT20, |
811 | NL80211_SEC_CHAN_BELOW /* HT40- */, | 811 | NL80211_CHAN_HT40MINUS, |
812 | NL80211_SEC_CHAN_ABOVE /* HT40+ */ | 812 | NL80211_CHAN_HT40PLUS |
813 | }; | 813 | }; |
814 | #endif /* __LINUX_NL80211_H */ | 814 | #endif /* __LINUX_NL80211_H */ |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 65e03ac93109..23c0ab74ded6 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -563,7 +563,7 @@ struct cfg80211_ops { | |||
563 | 563 | ||
564 | int (*set_channel)(struct wiphy *wiphy, | 564 | int (*set_channel)(struct wiphy *wiphy, |
565 | struct ieee80211_channel *chan, | 565 | struct ieee80211_channel *chan, |
566 | enum nl80211_sec_chan_offset); | 566 | enum nl80211_channel_type channel_type); |
567 | }; | 567 | }; |
568 | 568 | ||
569 | /* temporary wext handlers */ | 569 | /* temporary wext handlers */ |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 046ce692a906..22ae72c58d76 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -165,14 +165,9 @@ enum ieee80211_bss_change { | |||
165 | 165 | ||
166 | /** | 166 | /** |
167 | * struct ieee80211_bss_ht_conf - BSS's changing HT configuration | 167 | * struct ieee80211_bss_ht_conf - BSS's changing HT configuration |
168 | * @secondary_channel_offset: secondary channel offset, uses | ||
169 | * %IEEE80211_HT_PARAM_CHA_SEC_ values | ||
170 | * @width_40_ok: indicates that 40 MHz bandwidth may be used for TX | ||
171 | * @operation_mode: HT operation mode (like in &struct ieee80211_ht_info) | 168 | * @operation_mode: HT operation mode (like in &struct ieee80211_ht_info) |
172 | */ | 169 | */ |
173 | struct ieee80211_bss_ht_conf { | 170 | struct ieee80211_bss_ht_conf { |
174 | u8 secondary_channel_offset; | ||
175 | bool width_40_ok; | ||
176 | u16 operation_mode; | 171 | u16 operation_mode; |
177 | }; | 172 | }; |
178 | 173 | ||
@@ -508,9 +503,7 @@ static inline int __deprecated __IEEE80211_CONF_SHORT_SLOT_TIME(void) | |||
508 | 503 | ||
509 | struct ieee80211_ht_conf { | 504 | struct ieee80211_ht_conf { |
510 | bool enabled; | 505 | bool enabled; |
511 | int sec_chan_offset; /* 0 = HT40 disabled; -1 = HT40 enabled, secondary | 506 | enum nl80211_channel_type channel_type; |
512 | * channel below primary; 1 = HT40 enabled, | ||
513 | * secondary channel above primary */ | ||
514 | }; | 507 | }; |
515 | 508 | ||
516 | /** | 509 | /** |