linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: Fix unresolved mesh frames queued without valid control.vif
@ 2009-08-11  0:24 Javier Cardona
  2009-08-11  0:29 ` Javier Cardona
  0 siblings, 1 reply; 2+ messages in thread
From: Javier Cardona @ 2009-08-11  0:24 UTC (permalink / raw)
  To: linux-wireless; +Cc: Javier Cardona, andrey, johannes, linville, devel

Mesh frames that could not be immediately resolved were queued with a NULL
info->control.vif.  This patch moves the call to mesh_nexthop_lookup closer to
the point where it is handed over to ieee80211_tx().  This ensures that the
unresolved frames are ready to be sent once the path is resolved.
---
 net/mac80211/tx.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index b9f5be6..56dc8df 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1413,14 +1413,7 @@ static void ieee80211_xmit(struct ieee80211_sub_if_data *sdata,
 
 	info->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS;
 
-	if (ieee80211_vif_is_mesh(&sdata->vif) &&
-	    ieee80211_is_data(hdr->frame_control)) {
-		if (!is_multicast_ether_addr(hdr->addr1))
-			if (mesh_nexthop_lookup(skb, sdata)) {
-				dev_put(sdata->dev);
-				return;
-			}
-	} else if (unlikely(sdata->vif.type == NL80211_IFTYPE_MONITOR)) {
+	if (unlikely(sdata->vif.type == NL80211_IFTYPE_MONITOR)) {
 		int hdrlen;
 		u16 len_rthdr;
 
@@ -1477,6 +1470,15 @@ static void ieee80211_xmit(struct ieee80211_sub_if_data *sdata,
 
 	info->control.vif = &sdata->vif;
 
+	if (ieee80211_vif_is_mesh(&sdata->vif) &&
+	    ieee80211_is_data(hdr->frame_control) &&
+		!is_multicast_ether_addr(hdr->addr1))
+			if (mesh_nexthop_lookup(skb, sdata)) {
+				/* skb queued: don't free */
+				dev_put(sdata->dev);
+				return;
+			}
+
 	ieee80211_select_queue(local, skb);
 	ieee80211_tx(sdata, skb, false);
 	dev_put(sdata->dev);
-- 
1.5.4.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] mac80211: Fix unresolved mesh frames queued without valid control.vif
  2009-08-11  0:24 [PATCH] mac80211: Fix unresolved mesh frames queued without valid control.vif Javier Cardona
@ 2009-08-11  0:29 ` Javier Cardona
  0 siblings, 0 replies; 2+ messages in thread
From: Javier Cardona @ 2009-08-11  0:29 UTC (permalink / raw)
  To: linux-wireless; +Cc: Javier Cardona, andrey, johannes, linville, devel

Mesh frames that could not be immediately resolved were queued with a NULL
info->control.vif.  This patch moves the call to mesh_nexthop_lookup closer to
the point where it is handed over to ieee80211_tx().  This ensures that the
unresolved frames are ready to be sent once the path is resolved.

Signed-off-by: Javier Cardona <javier@cozybit.com>
---
 net/mac80211/tx.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index b9f5be6..56dc8df 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1413,14 +1413,7 @@ static void ieee80211_xmit(struct ieee80211_sub_if_data *sdata,
 
 	info->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS;
 
-	if (ieee80211_vif_is_mesh(&sdata->vif) &&
-	    ieee80211_is_data(hdr->frame_control)) {
-		if (!is_multicast_ether_addr(hdr->addr1))
-			if (mesh_nexthop_lookup(skb, sdata)) {
-				dev_put(sdata->dev);
-				return;
-			}
-	} else if (unlikely(sdata->vif.type == NL80211_IFTYPE_MONITOR)) {
+	if (unlikely(sdata->vif.type == NL80211_IFTYPE_MONITOR)) {
 		int hdrlen;
 		u16 len_rthdr;
 
@@ -1477,6 +1470,15 @@ static void ieee80211_xmit(struct ieee80211_sub_if_data *sdata,
 
 	info->control.vif = &sdata->vif;
 
+	if (ieee80211_vif_is_mesh(&sdata->vif) &&
+	    ieee80211_is_data(hdr->frame_control) &&
+		!is_multicast_ether_addr(hdr->addr1))
+			if (mesh_nexthop_lookup(skb, sdata)) {
+				/* skb queued: don't free */
+				dev_put(sdata->dev);
+				return;
+			}
+
 	ieee80211_select_queue(local, skb);
 	ieee80211_tx(sdata, skb, false);
 	dev_put(sdata->dev);
-- 
1.5.4.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-11  0:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-11  0:24 [PATCH] mac80211: Fix unresolved mesh frames queued without valid control.vif Javier Cardona
2009-08-11  0:29 ` Javier Cardona

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).