Commit 431e3154 authored by Ashok Nagarajan's avatar Ashok Nagarajan Committed by John W. Linville

mac80211: Advertise HT protection mode in IEs

Signed-off-by: default avatarAshok Nagarajan <ashok@cozybit.com>
Reviewed-by: default avatarThomas Pedersen <thomas@cozybit.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent ef9456a8
...@@ -164,7 +164,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, ...@@ -164,7 +164,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
pos = ieee80211_ie_build_ht_cap(pos, &sband->ht_cap, pos = ieee80211_ie_build_ht_cap(pos, &sband->ht_cap,
sband->ht_cap.cap); sband->ht_cap.cap);
pos = ieee80211_ie_build_ht_oper(pos, &sband->ht_cap, pos = ieee80211_ie_build_ht_oper(pos, &sband->ht_cap,
chan, channel_type); chan, channel_type, 0);
} }
if (local->hw.queues >= IEEE80211_NUM_ACS) { if (local->hw.queues >= IEEE80211_NUM_ACS) {
......
...@@ -1497,7 +1497,8 @@ u8 *ieee80211_ie_build_ht_cap(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, ...@@ -1497,7 +1497,8 @@ u8 *ieee80211_ie_build_ht_cap(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
u16 cap); u16 cap);
u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
struct ieee80211_channel *channel, struct ieee80211_channel *channel,
enum nl80211_channel_type channel_type); enum nl80211_channel_type channel_type,
u16 prot_mode);
/* internal work items */ /* internal work items */
void ieee80211_work_init(struct ieee80211_local *local); void ieee80211_work_init(struct ieee80211_local *local);
......
...@@ -396,7 +396,8 @@ int mesh_add_ht_oper_ie(struct sk_buff *skb, ...@@ -396,7 +396,8 @@ int mesh_add_ht_oper_ie(struct sk_buff *skb,
return -ENOMEM; return -ENOMEM;
pos = skb_put(skb, 2 + sizeof(struct ieee80211_ht_operation)); pos = skb_put(skb, 2 + sizeof(struct ieee80211_ht_operation));
ieee80211_ie_build_ht_oper(pos, ht_cap, channel, channel_type); ieee80211_ie_build_ht_oper(pos, ht_cap, channel, channel_type,
sdata->vif.bss_conf.ht_operation_mode);
return 0; return 0;
} }
......
...@@ -1663,7 +1663,8 @@ u8 *ieee80211_ie_build_ht_cap(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, ...@@ -1663,7 +1663,8 @@ u8 *ieee80211_ie_build_ht_cap(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
struct ieee80211_channel *channel, struct ieee80211_channel *channel,
enum nl80211_channel_type channel_type) enum nl80211_channel_type channel_type,
u16 prot_mode)
{ {
struct ieee80211_ht_operation *ht_oper; struct ieee80211_ht_operation *ht_oper;
/* Build HT Information */ /* Build HT Information */
...@@ -1689,11 +1690,7 @@ u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, ...@@ -1689,11 +1690,7 @@ u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
channel_type != NL80211_CHAN_HT20) channel_type != NL80211_CHAN_HT20)
ht_oper->ht_param |= IEEE80211_HT_PARAM_CHAN_WIDTH_ANY; ht_oper->ht_param |= IEEE80211_HT_PARAM_CHAN_WIDTH_ANY;
/* ht_oper->operation_mode = cpu_to_le16(prot_mode);
* Note: According to 802.11n-2009 9.13.3.1, HT Protection field and
* RIFS Mode are reserved in IBSS mode, therefore keep them at 0
*/
ht_oper->operation_mode = 0x0000;
ht_oper->stbc_param = 0x0000; ht_oper->stbc_param = 0x0000;
/* It seems that Basic MCS set and Supported MCS set /* It seems that Basic MCS set and Supported MCS set
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment