All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mac80211: exit cooked monitor RX early if there are none
@ 2011-10-21  8:17 Johannes Berg
  2011-10-21  8:22 ` [PATCH v2] " Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2011-10-21  8:17 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless

From: Johannes Berg <johannes.berg@intel.com>

If there are no cooked monitor interfaces, there's
no point in building the radiotap RX header for the
frame and iterating the interface list.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/mac80211/rx.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/net/mac80211/rx.c	2011-10-20 22:03:03.000000000 +0200
+++ b/net/mac80211/rx.c	2011-10-21 10:15:27.000000000 +0200
@@ -2496,6 +2496,10 @@ static void ieee80211_rx_cooked_monitor(
 		goto out_free_skb;
 	rx->flags |= IEEE80211_RX_CMNTR;
 
+	/* If there are no cooked monitor interfaces, just free the SKB */
+	if (!local->>cooked_mntrs)
+		goto out_free_skb;
+
 	if (skb_headroom(skb) < sizeof(*rthdr) &&
 	    pskb_expand_head(skb, sizeof(*rthdr), 0, GFP_ATOMIC))
 		goto out_free_skb;



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

* [PATCH v2] mac80211: exit cooked monitor RX early if there are none
  2011-10-21  8:17 [PATCH] mac80211: exit cooked monitor RX early if there are none Johannes Berg
@ 2011-10-21  8:22 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2011-10-21  8:22 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless

From: Johannes Berg <johannes.berg@intel.com>

If there are no cooked monitor interfaces, there's
no point in building the radiotap RX header for the
frame and iterating the interface list.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
v2: wow, embarrassing ... try quilt refresh ...

 net/mac80211/rx.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/net/mac80211/rx.c	2011-10-21 10:19:33.000000000 +0200
+++ b/net/mac80211/rx.c	2011-10-21 10:20:59.000000000 +0200
@@ -2489,6 +2489,10 @@ static void ieee80211_rx_cooked_monitor(
 		goto out_free_skb;
 	rx->flags |= IEEE80211_RX_CMNTR;
 
+	/* If there are no cooked monitor interfaces, just free the SKB */
+	if (!local->cooked_mntrs)
+		goto out_free_skb;
+
 	if (skb_headroom(skb) < sizeof(*rthdr) &&
 	    pskb_expand_head(skb, sizeof(*rthdr), 0, GFP_ATOMIC))
 		goto out_free_skb;



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

end of thread, other threads:[~2011-10-21  8:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-21  8:17 [PATCH] mac80211: exit cooked monitor RX early if there are none Johannes Berg
2011-10-21  8:22 ` [PATCH v2] " Johannes Berg

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.