summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2008-12-12 11:57:43 +0530
committerJohn W. Linville <linville@tuxdriver.com>2008-12-19 15:22:54 -0500
commit094d05dc32fc2930e381189a942016e5561775d9 (patch)
tree4deedbcbe196f88cb8d9fe0cd0755775a7ff0939 /include
parent420e7fabd9c6d907280ed6b3e40eef425c5d8d8d (diff)
downloadop-kernel-dev-094d05dc32fc2930e381189a942016e5561775d9.zip
op-kernel-dev-094d05dc32fc2930e381189a942016e5561775d9.tar.gz
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.h22
-rw-r--r--include/net/cfg80211.h2
-rw-r--r--include/net/mac80211.h9
3 files changed, 13 insertions, 20 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 7501acf..e86ed59 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -201,13 +201,13 @@ enum nl80211_commands {
* @NL80211_ATTR_WIPHY_NAME: wiphy name (used for renaming)
* @NL80211_ATTR_WIPHY_TXQ_PARAMS: a nested array of TX queue parameters
* @NL80211_ATTR_WIPHY_FREQ: frequency of the selected channel in MHz
- * @NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET: included with NL80211_ATTR_WIPHY_FREQ
+ * @NL80211_ATTR_WIPHY_CHANNEL_TYPE: included with NL80211_ATTR_WIPHY_FREQ
* if HT20 or HT40 are allowed (i.e., 802.11n disabled if not included):
- * NL80211_SEC_CHAN_NO_HT = HT not allowed (i.e., same as not including
+ * NL80211_CHAN_NO_HT = HT not allowed (i.e., same as not including
* this attribute)
- * NL80211_SEC_CHAN_DISABLED = HT20 only
- * NL80211_SEC_CHAN_BELOW = secondary channel is below the primary channel
- * NL80211_SEC_CHAN_ABOVE = secondary channel is above the primary channel
+ * NL80211_CHAN_HT20 = HT20 only
+ * NL80211_CHAN_HT40MINUS = secondary channel is below the primary channel
+ * NL80211_CHAN_HT40PLUS = secondary channel is above the primary channel
*
* @NL80211_ATTR_IFINDEX: network interface index of the device to operate on
* @NL80211_ATTR_IFNAME: network interface name
@@ -344,7 +344,7 @@ enum nl80211_attrs {
NL80211_ATTR_WIPHY_TXQ_PARAMS,
NL80211_ATTR_WIPHY_FREQ,
- NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET,
+ NL80211_ATTR_WIPHY_CHANNEL_TYPE,
/* add attributes here, update the policy in nl80211.c */
@@ -805,10 +805,10 @@ enum nl80211_txq_q {
NL80211_TXQ_Q_BK
};
-enum nl80211_sec_chan_offset {
- NL80211_SEC_CHAN_NO_HT /* No HT */,
- NL80211_SEC_CHAN_DISABLED /* HT20 only */,
- NL80211_SEC_CHAN_BELOW /* HT40- */,
- NL80211_SEC_CHAN_ABOVE /* HT40+ */
+enum nl80211_channel_type {
+ NL80211_CHAN_NO_HT,
+ NL80211_CHAN_HT20,
+ NL80211_CHAN_HT40MINUS,
+ NL80211_CHAN_HT40PLUS
};
#endif /* __LINUX_NL80211_H */
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 65e03ac..23c0ab7 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -563,7 +563,7 @@ struct cfg80211_ops {
int (*set_channel)(struct wiphy *wiphy,
struct ieee80211_channel *chan,
- enum nl80211_sec_chan_offset);
+ enum nl80211_channel_type channel_type);
};
/* temporary wext handlers */
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 046ce69..22ae72c 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -165,14 +165,9 @@ enum ieee80211_bss_change {
/**
* struct ieee80211_bss_ht_conf - BSS's changing HT configuration
- * @secondary_channel_offset: secondary channel offset, uses
- * %IEEE80211_HT_PARAM_CHA_SEC_ values
- * @width_40_ok: indicates that 40 MHz bandwidth may be used for TX
* @operation_mode: HT operation mode (like in &struct ieee80211_ht_info)
*/
struct ieee80211_bss_ht_conf {
- u8 secondary_channel_offset;
- bool width_40_ok;
u16 operation_mode;
};
@@ -508,9 +503,7 @@ static inline int __deprecated __IEEE80211_CONF_SHORT_SLOT_TIME(void)
struct ieee80211_ht_conf {
bool enabled;
- int sec_chan_offset; /* 0 = HT40 disabled; -1 = HT40 enabled, secondary
- * channel below primary; 1 = HT40 enabled,
- * secondary channel above primary */
+ enum nl80211_channel_type channel_type;
};
/**
OpenPOWER on IntegriCloud