diff mbox

[RFC,1/3] mac80211: move cmntr flag out of rx flags

Message ID 20091116142412.978249174@sipsolutions.net (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Johannes Berg Nov. 16, 2009, 2:21 p.m. UTC
None
diff mbox

Patch

--- wireless-testing.orig/include/net/mac80211.h	2009-11-16 15:11:58.000000000 +0100
+++ wireless-testing/include/net/mac80211.h	2009-11-16 15:12:28.000000000 +0100
@@ -510,6 +510,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,
@@ -523,6 +526,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-16 15:11:46.000000000 +0100
+++ wireless-testing/net/mac80211/ieee80211_i.h	2009-11-16 15:11:50.000000000 +0100
@@ -162,8 +162,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-16 15:12:38.000000000 +0100
+++ wireless-testing/net/mac80211/rx.c	2009-11-16 15:13:15.000000000 +0100
@@ -1864,7 +1864,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) &&
@@ -1925,7 +1925,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: