From: Thomas Pedersen <thomas@cozybit.com>
To: linux-wireless@vger.kernel.org
Cc: johannes@sipsolutions.net, linville@tuxdriver.com,
Thomas Pedersen <thomas@cozybit.com>
Subject: [PATCH 5/5] mac80211: mesh beacon includes TIM IE
Date: Wed, 13 Jul 2011 16:45:47 -0700 [thread overview]
Message-ID: <1310600747-9583-6-git-send-email-thomas@cozybit.com> (raw)
In-Reply-To: <1310600747-9583-1-git-send-email-thomas@cozybit.com>
Even though we don't currently implement PS for mesh points, the
standard asks us to include a TIM element in beacons. Include an empty
element for now.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
---
net/mac80211/tx.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index e1389e8..174db68 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2251,6 +2251,7 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
IEEE80211_STYPE_BEACON);
} else if (ieee80211_vif_is_mesh(&sdata->vif)) {
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
+ u8 *pos;
#ifdef CONFIG_MAC80211_MESH
if (!sdata->u.mesh.mesh_id_len)
goto out;
@@ -2269,6 +2270,14 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
memcpy(skb_put(skb, beacon->head_len), beacon->head,
beacon->head_len);
+ pos = skb_put(skb, 6);
+ *pos++ = WLAN_EID_TIM;
+ *pos++ = 4;
+ *pos++ = 0; /* DTIM count */
+ *pos++ = 0; /* DTIM period */
+ *pos++ = 0; /* Bitmap control */
+ *pos++ = 0; /* Part Virt Bitmap */
+
if (beacon->tail && beacon->tail_len)
memcpy(skb_put(skb, beacon->tail_len),
beacon->tail, beacon->tail_len);
--
1.7.6
next prev parent reply other threads:[~2011-07-13 23:46 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-13 23:45 [PATCH 0/5] mac80211: mesh beaconing Thomas Pedersen
2011-07-13 23:45 ` [PATCH 1/5] mac80211: give if_mesh a beacon Thomas Pedersen
2011-07-14 9:50 ` Johannes Berg
2011-07-15 9:45 ` Johannes Berg
2011-07-15 18:36 ` Thomas Pedersen
2011-07-15 18:41 ` Johannes Berg
2011-07-15 9:54 ` Johannes Berg
2011-07-15 19:30 ` Thomas Pedersen
2011-07-15 21:00 ` Johannes Berg
2011-07-17 17:36 ` Thomas Pedersen
2011-07-18 7:34 ` Johannes Berg
2011-07-13 23:45 ` [PATCH 2/5] mac80211: correct mesh beacon head Thomas Pedersen
2011-07-15 9:57 ` Johannes Berg
2011-07-15 18:44 ` Thomas Pedersen
2011-07-15 21:00 ` Johannes Berg
2011-07-13 23:45 ` [PATCH 3/5] mac80211: Ext. Supported Rates go in mesh beacon tail Thomas Pedersen
2011-07-15 9:58 ` Johannes Berg
2011-07-15 19:31 ` Thomas Pedersen
2011-07-13 23:45 ` [PATCH 4/5] mac80211: move RSN IE to tail of mesh beacon Thomas Pedersen
2011-07-14 9:51 ` Johannes Berg
2011-07-15 0:50 ` [PATCH v2 " Thomas Pedersen
2011-07-15 9:07 ` Johannes Berg
2011-07-15 18:49 ` Thomas Pedersen
2011-07-13 23:45 ` Thomas Pedersen [this message]
2011-07-14 6:25 ` [PATCH 5/5] mac80211: mesh beacon includes TIM IE Jouni Malinen
2011-07-14 20:16 ` Thomas Pedersen
2011-07-15 10:00 ` Johannes Berg
2011-07-18 14:11 ` Javier Cardona
2011-07-18 15:07 ` Johannes Berg
2011-07-14 9:52 ` Johannes Berg
2011-07-14 19:20 ` Thomas Pedersen
2011-07-15 10:50 ` [PATCH 0/5] mac80211: mesh beaconing Max Filippov
2011-07-15 18:17 ` 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=1310600747-9583-6-git-send-email-thomas@cozybit.com \
--to=thomas@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).