From: Johannes Berg <johannes@sipsolutions.net>
To: Javier Cardona <javier@cozybit.com>
Cc: linux-wireless@vger.kernel.org,
Andrey Yurovsky <andrey@cozybit.com>,
linville@tuxdriver.com
Subject: Re: [PATCH v2] Assign next hop address to pending mesh frames once the path is resolved.
Date: Thu, 09 Jul 2009 23:54:37 +0200 [thread overview]
Message-ID: <1247176477.1905.9.camel@johannes.local> (raw)
In-Reply-To: <1247175736-6915-1-git-send-email-javier@cozybit.com>
[-- Attachment #1: Type: text/plain, Size: 1565 bytes --]
On Thu, 2009-07-09 at 14:42 -0700, Javier Cardona wrote:
> Regression. Frames transmitted when a mesh path was wating to be resolved were
> being transmitted with an invalid Receiver Address.
>
> [Changes since v1]
>
> Suggested by Johannes:
> - Improved frame_queue traversal
> - Narower RCU scope
>
> Signed-off-by: Javier Cardona <javier@cozybit.com>
> Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
> ---
> net/mac80211/mesh_pathtbl.c | 18 ++++++++++++++++++
> 1 files changed, 18 insertions(+), 0 deletions(-)
>
> diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
> index ae98766..1981af9 100644
> --- a/net/mac80211/mesh_pathtbl.c
> +++ b/net/mac80211/mesh_pathtbl.c
> @@ -55,7 +55,25 @@ static DEFINE_RWLOCK(pathtbl_resize_lock);
> */
> void mesh_path_assign_nexthop(struct mesh_path *mpath, struct sta_info *sta)
> {
> + struct sk_buff *skb;
> + struct ieee80211_hdr *hdr;
> + struct sk_buff_head tmpq;
> + unsigned long flags;
> +
> rcu_assign_pointer(mpath->next_hop, sta);
> +
> + __skb_queue_head_init(&tmpq);
> +
> + spin_lock_irqsave(&mpath->frame_queue.lock, flags);
> +
> + while ((skb = __skb_dequeue(&mpath->frame_queue)) != NULL) {
> + hdr = (struct ieee80211_hdr *) skb->data;
> + memcpy(hdr->addr1, sta->sta.addr, ETH_ALEN);
> + __skb_queue_tail(&tmpq, skb);
> + }
> +
> + skb_queue_splice(&tmpq, &mpath->frame_queue);
> + spin_unlock_irqrestore(&mpath->frame_queue.lock, flags);
> }
>
>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
prev parent reply other threads:[~2009-07-09 21:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-08 5:53 [PATCH] Assign next hop address to pending mesh frames once the path is resolved Javier Cardona
2009-07-08 10:40 ` Johannes Berg
2009-07-08 17:02 ` Javier Cardona
2009-07-09 21:42 ` [PATCH v2] " Javier Cardona
2009-07-09 21:54 ` Johannes Berg [this message]
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=1247176477.1905.9.camel@johannes.local \
--to=johannes@sipsolutions.net \
--cc=andrey@cozybit.com \
--cc=javier@cozybit.com \
--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