linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH v2 1/5] mac80211: move cmntr flag out of rx flags
Date: Wed, 25 Nov 2009 17:46:15 +0100	[thread overview]
Message-ID: <20091125164820.854703334@sipsolutions.net> (raw)
In-Reply-To: 20091125164614.427835023@sipsolutions.net

The RX flags should soon be used only for flags
that cannot change within an a-MPDU, so move the
cooked monitor flag into the RX status flags.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
 include/net/mac80211.h     |    4 ++++
 net/mac80211/ieee80211_i.h |    3 +--
 net/mac80211/rx.c          |    4 ++--
 3 files changed, 7 insertions(+), 4 deletions(-)

--- wireless-testing.orig/include/net/mac80211.h	2009-11-19 14:38:32.000000000 +0100
+++ wireless-testing/include/net/mac80211.h	2009-11-19 14:38:33.000000000 +0100
@@ -513,6 +513,9 @@ ieee80211_tx_info_clear_status(struct ie
  * @RX_FLAG_HT: HT MCS was used and rate_idx is MCS index
  * @RX_FLAG_40MHZ: HT40 (40 MHz) was used
  * @RX_FLAG_SHORT_GI: Short guard interval was used
+ * @RX_FLAG_INTERNAL_CMTR: set internally after frame was reported
+ *	on cooked monitor to avoid double-reporting it for multiple
+ *	virtual interfaces
  */
 enum mac80211_rx_flags {
 	RX_FLAG_MMIC_ERROR	= 1<<0,
@@ -526,6 +529,7 @@ enum mac80211_rx_flags {
 	RX_FLAG_HT		= 1<<9,
 	RX_FLAG_40MHZ		= 1<<10,
 	RX_FLAG_SHORT_GI	= 1<<11,
+	RX_FLAG_INTERNAL_CMTR	= 1<<12,
 };
 
 /**
--- wireless-testing.orig/net/mac80211/ieee80211_i.h	2009-11-19 14:38:32.000000000 +0100
+++ wireless-testing/net/mac80211/ieee80211_i.h	2009-11-19 14:38:33.000000000 +0100
@@ -163,8 +163,7 @@ typedef unsigned __bitwise__ ieee80211_r
 /* frame is destined to interface currently processed (incl. multicast frames) */
 #define IEEE80211_RX_RA_MATCH		BIT(1)
 #define IEEE80211_RX_AMSDU		BIT(2)
-#define IEEE80211_RX_CMNTR_REPORTED	BIT(3)
-#define IEEE80211_RX_FRAGMENTED		BIT(4)
+#define IEEE80211_RX_FRAGMENTED		BIT(3)
 
 struct ieee80211_rx_data {
 	struct sk_buff *skb;
--- wireless-testing.orig/net/mac80211/rx.c	2009-11-19 14:38:32.000000000 +0100
+++ wireless-testing/net/mac80211/rx.c	2009-11-19 14:38:33.000000000 +0100
@@ -1868,7 +1868,7 @@ static void ieee80211_rx_cooked_monitor(
 	struct net_device *prev_dev = NULL;
 	struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
 
-	if (rx->flags & IEEE80211_RX_CMNTR_REPORTED)
+	if (status->flag & RX_FLAG_INTERNAL_CMTR)
 		goto out_free_skb;
 
 	if (skb_headroom(skb) < sizeof(*rthdr) &&
@@ -1929,7 +1929,7 @@ static void ieee80211_rx_cooked_monitor(
 	} else
 		goto out_free_skb;
 
-	rx->flags |= IEEE80211_RX_CMNTR_REPORTED;
+	status->flag |= RX_FLAG_INTERNAL_CMTR;
 	return;
 
  out_free_skb:



  reply	other threads:[~2009-11-25 16:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-25 16:46 [PATCH v2 0/5] mac80211: stations per virtual interface, netdev reduction Johannes Berg
2009-11-25 16:46 ` Johannes Berg [this message]
2009-11-25 16:46 ` [PATCH v2 2/5] mac80211: move aMPDU RX reorder code Johannes Berg
2009-11-25 16:46 ` [PATCH v2 3/5] mac80211: correctly place " Johannes Berg
2009-12-03 18:13   ` reinette chatre
2009-12-03 18:52     ` Johannes Berg
2009-12-03 19:14     ` Johannes Berg
2009-12-03 19:30       ` reinette chatre
2009-11-25 16:46 ` [PATCH v2 4/5] mac80211: make station management completely depend on vif Johannes Berg
2009-11-25 19:27   ` [PATCH v3 " Johannes Berg
2009-12-01  9:51     ` Johannes Berg
2009-11-25 16:46 ` [PATCH v2 5/5] mac80211: reduce reliance on netdev Johannes Berg

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=20091125164820.854703334@sipsolutions.net \
    --to=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).