From: Thomas Pedersen <thomas@cozybit.com>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org, devel@lists.open80211s.org,
Thomas Pedersen <thomas@cozybit.com>
Subject: [PATCH 2/3] mac80211: generate mesh probe requests
Date: Sat, 2 Feb 2013 17:02:20 -0800 [thread overview]
Message-ID: <1359853341-29237-3-git-send-email-thomas@cozybit.com> (raw)
In-Reply-To: <1359853341-29237-1-git-send-email-thomas@cozybit.com>
A mesh probe request must include the mesh ID IE and a
wildcard SSID IE. Add this and transpose the SSID scan
list into mesh IDs for mesh interfaces.
Also allow the user to specify a mesh ID IE in the user
scan IEs, since additional SSID IEs seem to be allowed.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
---
net/mac80211/tx.c | 15 +++++++++++----
net/mac80211/util.c | 1 +
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 01dc001..9f3e9ba 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2622,11 +2622,18 @@ struct sk_buff *ieee80211_probereq_get(struct ieee80211_hw *hw,
memcpy(hdr->addr2, vif->addr, ETH_ALEN);
eth_broadcast_addr(hdr->addr3);
- pos = skb_put(skb, ie_ssid_len);
- *pos++ = WLAN_EID_SSID;
+ if (ieee80211_vif_is_mesh(vif)) {
+ pos = skb_put(skb, 2 + 2 + ssid_len);
+ *pos++ = WLAN_EID_SSID;
+ *pos++ = 0;
+ /* NOTE: mesh ID will be out of order */
+ *pos++ = WLAN_EID_MESH_ID;
+ } else {
+ pos = skb_put(skb, 2 + ssid_len);
+ *pos++ = WLAN_EID_SSID;
+ }
*pos++ = ssid_len;
- if (ssid_len)
- memcpy(pos, ssid, ssid_len);
+ memcpy(pos, ssid, ssid_len);
pos += ssid_len;
return skb;
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 139ad9b..aeb0f88 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1181,6 +1181,7 @@ int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
if (ie && ie_len) {
static const u8 before_ht[] = {
WLAN_EID_SSID,
+ WLAN_EID_MESH_ID,
WLAN_EID_SUPP_RATES,
WLAN_EID_REQUEST,
WLAN_EID_EXT_SUPP_RATES,
--
1.7.10.4
next prev parent reply other threads:[~2013-02-03 1:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-03 1:02 [PATCH 0/3] implement active mesh scanning Thomas Pedersen
2013-02-03 1:02 ` [PATCH 1/3] mac80211: cache mesh beacon Thomas Pedersen
2013-02-04 17:37 ` Johannes Berg
2013-02-04 18:09 ` Thomas Pedersen
2013-02-04 18:13 ` Johannes Berg
2013-02-03 1:02 ` Thomas Pedersen [this message]
2013-02-04 17:38 ` [PATCH 2/3] mac80211: generate mesh probe requests Johannes Berg
2013-02-04 17:57 ` Thomas Pedersen
2013-02-04 17:58 ` Thomas Pedersen
2013-02-04 18:03 ` Johannes Berg
2013-02-04 18:16 ` Thomas Pedersen
2013-02-03 1:02 ` [PATCH 3/3] mac80211: generate mesh probe responses Thomas Pedersen
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=1359853341-29237-3-git-send-email-thomas@cozybit.com \
--to=thomas@cozybit.com \
--cc=devel@lists.open80211s.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.