diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/rx.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 21d401523d13..f255579dc564 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -28,6 +28,8 @@ | |||
28 | /* pre-rx handlers | 28 | /* pre-rx handlers |
29 | * | 29 | * |
30 | * these don't have dev/sdata fields in the rx data | 30 | * these don't have dev/sdata fields in the rx data |
31 | * The sta value should also not be used because it may | ||
32 | * be NULL even though a STA (in IBSS mode) will be added. | ||
31 | */ | 33 | */ |
32 | 34 | ||
33 | static ieee80211_txrx_result | 35 | static ieee80211_txrx_result |
@@ -50,12 +52,11 @@ ieee80211_rx_h_parse_qos(struct ieee80211_txrx_data *rx) | |||
50 | tid = 0; /* 802.1d - Best Effort */ | 52 | tid = 0; /* 802.1d - Best Effort */ |
51 | } | 53 | } |
52 | } | 54 | } |
53 | #ifdef CONFIG_MAC80211_DEBUG_COUNTERS | 55 | |
54 | I802_DEBUG_INC(rx->local->wme_rx_queue[tid]); | 56 | I802_DEBUG_INC(rx->local->wme_rx_queue[tid]); |
55 | if (rx->sta) { | 57 | /* only a debug counter, sta might not be assigned properly yet */ |
58 | if (rx->sta) | ||
56 | I802_DEBUG_INC(rx->sta->wme_rx_queue[tid]); | 59 | I802_DEBUG_INC(rx->sta->wme_rx_queue[tid]); |
57 | } | ||
58 | #endif /* CONFIG_MAC80211_DEBUG_COUNTERS */ | ||
59 | 60 | ||
60 | rx->u.rx.queue = tid; | 61 | rx->u.rx.queue = tid; |
61 | /* Set skb->priority to 1d tag if highest order bit of TID is not set. | 62 | /* Set skb->priority to 1d tag if highest order bit of TID is not set. |
@@ -110,8 +111,6 @@ ieee80211_rx_h_load_stats(struct ieee80211_txrx_data *rx) | |||
110 | /* Divide channel_use by 8 to avoid wrapping around the counter */ | 111 | /* Divide channel_use by 8 to avoid wrapping around the counter */ |
111 | load >>= CHAN_UTIL_SHIFT; | 112 | load >>= CHAN_UTIL_SHIFT; |
112 | local->channel_use_raw += load; | 113 | local->channel_use_raw += load; |
113 | if (rx->sta) | ||
114 | rx->sta->channel_use_raw += load; | ||
115 | rx->u.rx.load = load; | 114 | rx->u.rx.load = load; |
116 | 115 | ||
117 | return TXRX_CONTINUE; | 116 | return TXRX_CONTINUE; |
@@ -129,6 +128,8 @@ ieee80211_rx_handler ieee80211_rx_pre_handlers[] = | |||
129 | static ieee80211_txrx_result | 128 | static ieee80211_txrx_result |
130 | ieee80211_rx_h_if_stats(struct ieee80211_txrx_data *rx) | 129 | ieee80211_rx_h_if_stats(struct ieee80211_txrx_data *rx) |
131 | { | 130 | { |
131 | if (rx->sta) | ||
132 | rx->sta->channel_use_raw += rx->u.rx.load; | ||
132 | rx->sdata->channel_use_raw += rx->u.rx.load; | 133 | rx->sdata->channel_use_raw += rx->u.rx.load; |
133 | return TXRX_CONTINUE; | 134 | return TXRX_CONTINUE; |
134 | } | 135 | } |