提交 8c0c709e 编写于 作者: J Johannes Berg 提交者: John W. Linville

mac80211: move cmntr flag out of rx flags

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: NJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 e60d7443
...@@ -513,6 +513,9 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) ...@@ -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_HT: HT MCS was used and rate_idx is MCS index
* @RX_FLAG_40MHZ: HT40 (40 MHz) was used * @RX_FLAG_40MHZ: HT40 (40 MHz) was used
* @RX_FLAG_SHORT_GI: Short guard interval 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 { enum mac80211_rx_flags {
RX_FLAG_MMIC_ERROR = 1<<0, RX_FLAG_MMIC_ERROR = 1<<0,
...@@ -526,6 +529,7 @@ enum mac80211_rx_flags { ...@@ -526,6 +529,7 @@ enum mac80211_rx_flags {
RX_FLAG_HT = 1<<9, RX_FLAG_HT = 1<<9,
RX_FLAG_40MHZ = 1<<10, RX_FLAG_40MHZ = 1<<10,
RX_FLAG_SHORT_GI = 1<<11, RX_FLAG_SHORT_GI = 1<<11,
RX_FLAG_INTERNAL_CMTR = 1<<12,
}; };
/** /**
......
...@@ -163,8 +163,7 @@ typedef unsigned __bitwise__ ieee80211_rx_result; ...@@ -163,8 +163,7 @@ typedef unsigned __bitwise__ ieee80211_rx_result;
/* frame is destined to interface currently processed (incl. multicast frames) */ /* frame is destined to interface currently processed (incl. multicast frames) */
#define IEEE80211_RX_RA_MATCH BIT(1) #define IEEE80211_RX_RA_MATCH BIT(1)
#define IEEE80211_RX_AMSDU BIT(2) #define IEEE80211_RX_AMSDU BIT(2)
#define IEEE80211_RX_CMNTR_REPORTED BIT(3) #define IEEE80211_RX_FRAGMENTED BIT(3)
#define IEEE80211_RX_FRAGMENTED BIT(4)
struct ieee80211_rx_data { struct ieee80211_rx_data {
struct sk_buff *skb; struct sk_buff *skb;
......
...@@ -1868,7 +1868,7 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx, ...@@ -1868,7 +1868,7 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx,
struct net_device *prev_dev = NULL; struct net_device *prev_dev = NULL;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); 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; goto out_free_skb;
if (skb_headroom(skb) < sizeof(*rthdr) && if (skb_headroom(skb) < sizeof(*rthdr) &&
...@@ -1929,7 +1929,7 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx, ...@@ -1929,7 +1929,7 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx,
} else } else
goto out_free_skb; goto out_free_skb;
rx->flags |= IEEE80211_RX_CMNTR_REPORTED; status->flag |= RX_FLAG_INTERNAL_CMTR;
return; return;
out_free_skb: out_free_skb:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册