From: Ashok Nagarajan <ashok@cozybit.com>
To: linux-wireless@vger.kernel.org
Cc: linville@tuxdriver.com, johannes@sipsolutions.net,
javier@cozybit.com, devel@lists.open80211s.org,
Ashok Nagarajan <ashok@cozybit.com>
Subject: [PATCH v2 1/4] mac80211: Advertise HT protection mode in IEs
Date: Mon, 30 Apr 2012 14:20:29 -0700 [thread overview]
Message-ID: <1335820832-18887-1-git-send-email-ashok@cozybit.com> (raw)
Signed-off-by: Ashok Nagarajan <ashok@cozybit.com>
Reviewed-by: Thomas Pedersen <thomas@cozybit.com>
---
net/mac80211/ibss.c | 2 +-
net/mac80211/ieee80211_i.h | 3 ++-
net/mac80211/mesh.c | 3 ++-
net/mac80211/util.c | 9 +++------
4 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 61cd391..bb1a3e6 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,
pos = ieee80211_ie_build_ht_cap(pos, &sband->ht_cap,
sband->ht_cap.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) {
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 6cd89d4..ae046b5 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,
u16 cap);
u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
struct ieee80211_channel *channel,
- enum nl80211_channel_type channel_type);
+ enum nl80211_channel_type channel_type,
+ u16 prot_mode);
/* internal work items */
void ieee80211_work_init(struct ieee80211_local *local);
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index 598a96a..8a952e0 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,
return -ENOMEM;
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;
}
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index d9a747d..22f2216 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,
u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
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;
/* Build HT Information */
@@ -1689,11 +1690,7 @@ u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
channel_type != NL80211_CHAN_HT20)
ht_oper->ht_param |= IEEE80211_HT_PARAM_CHAN_WIDTH_ANY;
- /*
- * 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->operation_mode = cpu_to_le16(prot_mode);
ht_oper->stbc_param = 0x0000;
/* It seems that Basic MCS set and Supported MCS set
--
1.7.5.4
next reply other threads:[~2012-04-30 21:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-30 21:20 Ashok Nagarajan [this message]
2012-04-30 21:20 ` [PATCH v2 2/4] mac80211: Implement HT mixed protection mode Ashok Nagarajan
2012-05-03 19:39 ` Johannes Berg
2012-05-03 20:21 ` Ashok Nagarajan
2012-04-30 21:20 ` [PATCH v2 3/4] mac80211: Allow nonHT/HT peering in mesh Ashok Nagarajan
2012-05-03 19:40 ` Johannes Berg
2012-05-03 20:23 ` Ashok Nagarajan
2012-05-03 20:29 ` Johannes Berg
2012-04-30 21:20 ` [PATCH v2 4/4] [nl,cfg,mac]80211: Allow user to see/configure HT protection mode Ashok Nagarajan
2012-05-03 19:36 ` [PATCH v2 1/4] mac80211: Advertise HT protection mode in IEs Johannes Berg
2012-05-03 20:20 ` Ashok Nagarajan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1335820832-18887-1-git-send-email-ashok@cozybit.com \
--to=ashok@cozybit.com \
--cc=devel@lists.open80211s.org \
--cc=javier@cozybit.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).