From patchwork Fri May 3 02:33:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Pedersen X-Patchwork-Id: 2514881 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 0D4A5DF215 for ; Fri, 3 May 2013 02:36:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762301Ab3ECCgb (ORCPT ); Thu, 2 May 2013 22:36:31 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:55046 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762292Ab3ECCga (ORCPT ); Thu, 2 May 2013 22:36:30 -0400 Received: by mail-pa0-f43.google.com with SMTP id hz10so676241pad.2 for ; Thu, 02 May 2013 19:36:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=r3OwYQjwX8MO6ofBj0qzqEHy3gioEse7Ocibur9Y6uA=; b=E0dBP7hUzxu1ova7koj6FEOXI4ufyJc7okSu/h5fM3SXhToMGeHq24OHtnQ+qE01QC 7dvbLqmPObawrvc5UpBEF3iIDKCcwfEO3aN9Fm/mSEhvzqH/CY1VmX3oy96/WHZ1DcFD zmHVa7uXDFEgGQe9fxe2wQJxtAnIdsOxhmufKqyqvmcK6ETuWRvDQFznKWFT01y4dEvh 1v0nCHVus0tJxKSrigAczBnKLIH+EbYmqOrbRJxcjJbjH+oJmZZiTUFTClTujoLSUX8c hvsgLUHYfFyJvzK0uVS7j06UPpNFQvAiTap00Uj3WNlCnVdQ2d8t19BEVhfmR2zEuX41 4vKg== X-Received: by 10.68.172.65 with SMTP id ba1mr11794284pbc.166.1367548589997; Thu, 02 May 2013 19:36:29 -0700 (PDT) Received: from cable.lan (70-35-43-50.static.wiline.com. [70.35.43.50]) by mx.google.com with ESMTPSA id az5sm7391484pbc.18.2013.05.02.19.36.26 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 02 May 2013 19:36:28 -0700 (PDT) From: Thomas Pedersen To: Johannes Berg Cc: linux-wirelss , me@bobcopeland.com, open80211s Subject: [RFC 09/12] mac80211: add shared-mbss transmit path Date: Thu, 2 May 2013 19:33:59 -0700 Message-Id: <1367548442-8229-10-git-send-email-thomas@cozybit.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1367548442-8229-1-git-send-email-thomas@cozybit.com> References: <1367548442-8229-1-git-send-email-thomas@cozybit.com> X-Gm-Message-State: ALoCoQnvBScXkwwg5helWstTJRvLqAwbfLMubK28s7TjYhDJd6TDyUeeXQCtEOvOn5m/b8vkYu7d Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Bob Copeland Transmit locally-originated group data frames on every interface so that members of the mesh on every channel will see the frame. For individually-addressed frames, when we resolve the next hop, the outgoing interface might be different than the originator if the best path is on a different channel. Requeue such frames on the correct interface's pending queue. Signed-off-by: Bob Copeland --- net/mac80211/mesh_hwmp.c | 12 +++++++++++- net/mac80211/tx.c | 3 +++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index d8eaccc..6ba483e 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c @@ -1115,6 +1115,7 @@ int mesh_nexthop_resolve(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb) { struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; + struct ieee80211_sub_if_data *dest_sdata; struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); struct mesh_local_bss *mbss = mbss(sdata); struct mesh_path *mpath; @@ -1128,8 +1129,17 @@ int mesh_nexthop_resolve(struct ieee80211_sub_if_data *sdata, rcu_read_lock(); err = mesh_nexthop_lookup(mbss, skb); - if (!err) + if (!err) { + dest_sdata = vif_to_sdata(info->control.vif); + /* requeue if mesh path uses a different interface */ + if (dest_sdata != sdata) { + info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; + ieee80211_set_qos_hdr(dest_sdata, skb); + ieee80211_add_pending_skb(dest_sdata->local, skb); + err = -EAGAIN; + } goto endlookup; + } /* no nexthop found, start resolving */ mpath = mesh_path_lookup(mbss, target_addr); diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index c132c76..4b28680 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -1452,6 +1452,9 @@ void ieee80211_xmit(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, } else { ieee80211_mps_set_frame_flags(sdata, NULL, hdr); } + if (is_multicast_ether_addr(hdr->addr1) && + ieee80211_is_data(hdr->frame_control)) + mesh_bss_forward_tx(sdata, skb); } ieee80211_set_qos_hdr(sdata, skb);