diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-06-10 04:21:51 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-14 15:39:28 -0400 |
commit | 8b58ff832df9222e1fb3c58ae7f745f95569b55e (patch) | |
tree | 0283d0ee403eb19a4b411fc3803763619c5d6dfc /net/mac80211/rx.c | |
parent | 73a72a81d27b71f9ace31668d2dd7f3ac1c8228e (diff) |
mac80211: fix mgmt frame accounting
The recent change to processing action frames from
the management frame queue had already broken action
frame accounting, and my rework didn't help either.
So add back accounting and simplify the code with a
label rather than duplicating it, and also add
accounting for management frames.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r-- | net/mac80211/rx.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index ee01daccacbb..1594ebe80a4f 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -1966,10 +1966,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) | |||
1966 | goto invalid; | 1966 | goto invalid; |
1967 | } | 1967 | } |
1968 | 1968 | ||
1969 | rx->skb->pkt_type = IEEE80211_SDATA_QUEUE_TYPE_FRAME; | 1969 | goto queue; |
1970 | skb_queue_tail(&sdata->skb_queue, rx->skb); | ||
1971 | ieee80211_queue_work(&local->hw, &sdata->work); | ||
1972 | return RX_QUEUED; | ||
1973 | case WLAN_CATEGORY_SPECTRUM_MGMT: | 1970 | case WLAN_CATEGORY_SPECTRUM_MGMT: |
1974 | if (local->hw.conf.channel->band != IEEE80211_BAND_5GHZ) | 1971 | if (local->hw.conf.channel->band != IEEE80211_BAND_5GHZ) |
1975 | break; | 1972 | break; |
@@ -1999,10 +1996,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) | |||
1999 | if (memcmp(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN)) | 1996 | if (memcmp(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN)) |
2000 | break; | 1997 | break; |
2001 | 1998 | ||
2002 | rx->skb->pkt_type = IEEE80211_SDATA_QUEUE_TYPE_FRAME; | 1999 | goto queue; |
2003 | skb_queue_tail(&sdata->skb_queue, rx->skb); | ||
2004 | ieee80211_queue_work(&local->hw, &sdata->work); | ||
2005 | return RX_QUEUED; | ||
2006 | } | 2000 | } |
2007 | break; | 2001 | break; |
2008 | case WLAN_CATEGORY_SA_QUERY: | 2002 | case WLAN_CATEGORY_SA_QUERY: |
@@ -2022,10 +2016,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) | |||
2022 | case WLAN_CATEGORY_MESH_PATH_SEL: | 2016 | case WLAN_CATEGORY_MESH_PATH_SEL: |
2023 | if (!ieee80211_vif_is_mesh(&sdata->vif)) | 2017 | if (!ieee80211_vif_is_mesh(&sdata->vif)) |
2024 | break; | 2018 | break; |
2025 | rx->skb->pkt_type = IEEE80211_SDATA_QUEUE_TYPE_FRAME; | 2019 | goto queue; |
2026 | skb_queue_tail(&sdata->skb_queue, rx->skb); | ||
2027 | ieee80211_queue_work(&local->hw, &sdata->work); | ||
2028 | return RX_QUEUED; | ||
2029 | } | 2020 | } |
2030 | 2021 | ||
2031 | invalid: | 2022 | invalid: |
@@ -2076,6 +2067,14 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) | |||
2076 | rx->sta->rx_packets++; | 2067 | rx->sta->rx_packets++; |
2077 | dev_kfree_skb(rx->skb); | 2068 | dev_kfree_skb(rx->skb); |
2078 | return RX_QUEUED; | 2069 | return RX_QUEUED; |
2070 | |||
2071 | queue: | ||
2072 | rx->skb->pkt_type = IEEE80211_SDATA_QUEUE_TYPE_FRAME; | ||
2073 | skb_queue_tail(&sdata->skb_queue, rx->skb); | ||
2074 | ieee80211_queue_work(&local->hw, &sdata->work); | ||
2075 | if (rx->sta) | ||
2076 | rx->sta->rx_packets++; | ||
2077 | return RX_QUEUED; | ||
2079 | } | 2078 | } |
2080 | 2079 | ||
2081 | static ieee80211_rx_result debug_noinline | 2080 | static ieee80211_rx_result debug_noinline |
@@ -2131,6 +2130,8 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_data *rx) | |||
2131 | rx->skb->pkt_type = IEEE80211_SDATA_QUEUE_TYPE_FRAME; | 2130 | rx->skb->pkt_type = IEEE80211_SDATA_QUEUE_TYPE_FRAME; |
2132 | skb_queue_tail(&sdata->skb_queue, rx->skb); | 2131 | skb_queue_tail(&sdata->skb_queue, rx->skb); |
2133 | ieee80211_queue_work(&rx->local->hw, &sdata->work); | 2132 | ieee80211_queue_work(&rx->local->hw, &sdata->work); |
2133 | if (rx->sta) | ||
2134 | rx->sta->rx_packets++; | ||
2134 | 2135 | ||
2135 | return RX_QUEUED; | 2136 | return RX_QUEUED; |
2136 | } | 2137 | } |