From d586eacf3b29edc7dce33fe78f0117d83e732f16 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Wed, 25 Nov 2009 17:46:15 +0100 Subject: [PATCH] --- yaml --- r: 172226 b: refs/heads/master c: 8c0c709eea5cbab97fb464cd68b06f24acc58ee1 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/net/mac80211.h | 4 ++++ trunk/net/mac80211/ieee80211_i.h | 3 +-- trunk/net/mac80211/rx.c | 4 ++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 6ed7645f3299..8d4637360fc1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e60d7443e00a72a2c056950cdaab79c7b077f3d4 +refs/heads/master: 8c0c709eea5cbab97fb464cd68b06f24acc58ee1 diff --git a/trunk/include/net/mac80211.h b/trunk/include/net/mac80211.h index 3754ea405c88..1d75b960da06 100644 --- a/trunk/include/net/mac80211.h +++ b/trunk/include/net/mac80211.h @@ -513,6 +513,9 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) * @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, }; /** diff --git a/trunk/net/mac80211/ieee80211_i.h b/trunk/net/mac80211/ieee80211_i.h index 04093e84ebd7..ba5d3637b956 100644 --- a/trunk/net/mac80211/ieee80211_i.h +++ b/trunk/net/mac80211/ieee80211_i.h @@ -163,8 +163,7 @@ typedef unsigned __bitwise__ ieee80211_rx_result; /* 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; diff --git a/trunk/net/mac80211/rx.c b/trunk/net/mac80211/rx.c index 96f13ad05d3c..097bb0343b91 100644 --- a/trunk/net/mac80211/rx.c +++ b/trunk/net/mac80211/rx.c @@ -1868,7 +1868,7 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx, 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(struct ieee80211_rx_data *rx, } else goto out_free_skb; - rx->flags |= IEEE80211_RX_CMNTR_REPORTED; + status->flag |= RX_FLAG_INTERNAL_CMTR; return; out_free_skb: