aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshok Nagarajan <ashok@cozybit.com>2012-04-30 17:20:29 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-05-08 21:53:57 -0400
commit431e31542383b71bc5f2642572a1e6ef07f1bb87 (patch)
tree39d2cbc1b9e4321b27b6938034de67c4dedcdf9f
parentef9456a85dabe2222a4cb80fe8eef6361170c55d (diff)
mac80211: Advertise HT protection mode in IEs
Signed-off-by: Ashok Nagarajan <ashok@cozybit.com> Reviewed-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/mac80211/ibss.c2
-rw-r--r--net/mac80211/ieee80211_i.h3
-rw-r--r--net/mac80211/mesh.c3
-rw-r--r--net/mac80211/util.c9
4 files changed, 8 insertions, 9 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 61cd391c32a3..bb1a3e62a66a 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -164,7 +164,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
164 pos = ieee80211_ie_build_ht_cap(pos, &sband->ht_cap, 164 pos = ieee80211_ie_build_ht_cap(pos, &sband->ht_cap,
165 sband->ht_cap.cap); 165 sband->ht_cap.cap);
166 pos = ieee80211_ie_build_ht_oper(pos, &sband->ht_cap, 166 pos = ieee80211_ie_build_ht_oper(pos, &sband->ht_cap,
167 chan, channel_type); 167 chan, channel_type, 0);
168 } 168 }
169 169
170 if (local->hw.queues >= IEEE80211_NUM_ACS) { 170 if (local->hw.queues >= IEEE80211_NUM_ACS) {
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 6cd89d414f22..ae046b52d5e2 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1497,7 +1497,8 @@ u8 *ieee80211_ie_build_ht_cap(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
1497 u16 cap); 1497 u16 cap);
1498u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, 1498u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
1499 struct ieee80211_channel *channel, 1499 struct ieee80211_channel *channel,
1500 enum nl80211_channel_type channel_type); 1500 enum nl80211_channel_type channel_type,
1501 u16 prot_mode);
1501 1502
1502/* internal work items */ 1503/* internal work items */
1503void ieee80211_work_init(struct ieee80211_local *local); 1504void ieee80211_work_init(struct ieee80211_local *local);
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index 598a96a3a051..8a952e04690a 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -396,7 +396,8 @@ int mesh_add_ht_oper_ie(struct sk_buff *skb,
396 return -ENOMEM; 396 return -ENOMEM;
397 397
398 pos = skb_put(skb, 2 + sizeof(struct ieee80211_ht_operation)); 398 pos = skb_put(skb, 2 + sizeof(struct ieee80211_ht_operation));
399 ieee80211_ie_build_ht_oper(pos, ht_cap, channel, channel_type); 399 ieee80211_ie_build_ht_oper(pos, ht_cap, channel, channel_type,
400 sdata->vif.bss_conf.ht_operation_mode);
400 401
401 return 0; 402 return 0;
402} 403}
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index d9a747d387f0..22f2216b397e 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1663,7 +1663,8 @@ u8 *ieee80211_ie_build_ht_cap(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
1663 1663
1664u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, 1664u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
1665 struct ieee80211_channel *channel, 1665 struct ieee80211_channel *channel,
1666 enum nl80211_channel_type channel_type) 1666 enum nl80211_channel_type channel_type,
1667 u16 prot_mode)
1667{ 1668{
1668 struct ieee80211_ht_operation *ht_oper; 1669 struct ieee80211_ht_operation *ht_oper;
1669 /* Build HT Information */ 1670 /* Build HT Information */
@@ -1689,11 +1690,7 @@ u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
1689 channel_type != NL80211_CHAN_HT20) 1690 channel_type != NL80211_CHAN_HT20)
1690 ht_oper->ht_param |= IEEE80211_HT_PARAM_CHAN_WIDTH_ANY; 1691 ht_oper->ht_param |= IEEE80211_HT_PARAM_CHAN_WIDTH_ANY;
1691 1692
1692 /* 1693 ht_oper->operation_mode = cpu_to_le16(prot_mode);
1693 * Note: According to 802.11n-2009 9.13.3.1, HT Protection field and
1694 * RIFS Mode are reserved in IBSS mode, therefore keep them at 0
1695 */
1696 ht_oper->operation_mode = 0x0000;
1697 ht_oper->stbc_param = 0x0000; 1694 ht_oper->stbc_param = 0x0000;
1698 1695
1699 /* It seems that Basic MCS set and Supported MCS set 1696 /* It seems that Basic MCS set and Supported MCS set