diff options
Diffstat (limited to 'net/mac80211/wme.c')
-rw-r--r-- | net/mac80211/wme.c | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c index 139b5f267b34..ac71b38f7cb5 100644 --- a/net/mac80211/wme.c +++ b/net/mac80211/wme.c | |||
@@ -114,8 +114,8 @@ u16 ieee80211_select_queue(struct net_device *dev, struct sk_buff *skb) | |||
114 | { | 114 | { |
115 | struct ieee80211_master_priv *mpriv = netdev_priv(dev); | 115 | struct ieee80211_master_priv *mpriv = netdev_priv(dev); |
116 | struct ieee80211_local *local = mpriv->local; | 116 | struct ieee80211_local *local = mpriv->local; |
117 | struct ieee80211_hw *hw = &local->hw; | ||
117 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; | 118 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; |
118 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | ||
119 | struct sta_info *sta; | 119 | struct sta_info *sta; |
120 | u16 queue; | 120 | u16 queue; |
121 | u8 tid; | 121 | u8 tid; |
@@ -124,21 +124,19 @@ u16 ieee80211_select_queue(struct net_device *dev, struct sk_buff *skb) | |||
124 | if (unlikely(queue >= local->hw.queues)) | 124 | if (unlikely(queue >= local->hw.queues)) |
125 | queue = local->hw.queues - 1; | 125 | queue = local->hw.queues - 1; |
126 | 126 | ||
127 | if (info->flags & IEEE80211_TX_CTL_REQUEUE) { | 127 | if (skb->requeue) { |
128 | if (!hw->ampdu_queues) | ||
129 | return queue; | ||
130 | |||
128 | rcu_read_lock(); | 131 | rcu_read_lock(); |
129 | sta = sta_info_get(local, hdr->addr1); | 132 | sta = sta_info_get(local, hdr->addr1); |
130 | tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK; | 133 | tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK; |
131 | if (sta) { | 134 | if (sta) { |
132 | struct ieee80211_hw *hw = &local->hw; | ||
133 | int ampdu_queue = sta->tid_to_tx_q[tid]; | 135 | int ampdu_queue = sta->tid_to_tx_q[tid]; |
134 | 136 | ||
135 | if ((ampdu_queue < ieee80211_num_queues(hw)) && | 137 | if ((ampdu_queue < ieee80211_num_queues(hw)) && |
136 | test_bit(ampdu_queue, local->queue_pool)) { | 138 | test_bit(ampdu_queue, local->queue_pool)) |
137 | queue = ampdu_queue; | 139 | queue = ampdu_queue; |
138 | info->flags |= IEEE80211_TX_CTL_AMPDU; | ||
139 | } else { | ||
140 | info->flags &= ~IEEE80211_TX_CTL_AMPDU; | ||
141 | } | ||
142 | } | 140 | } |
143 | rcu_read_unlock(); | 141 | rcu_read_unlock(); |
144 | 142 | ||
@@ -159,20 +157,18 @@ u16 ieee80211_select_queue(struct net_device *dev, struct sk_buff *skb) | |||
159 | *p++ = ack_policy | tid; | 157 | *p++ = ack_policy | tid; |
160 | *p = 0; | 158 | *p = 0; |
161 | 159 | ||
160 | if (!hw->ampdu_queues) | ||
161 | return queue; | ||
162 | |||
162 | rcu_read_lock(); | 163 | rcu_read_lock(); |
163 | 164 | ||
164 | sta = sta_info_get(local, hdr->addr1); | 165 | sta = sta_info_get(local, hdr->addr1); |
165 | if (sta) { | 166 | if (sta) { |
166 | int ampdu_queue = sta->tid_to_tx_q[tid]; | 167 | int ampdu_queue = sta->tid_to_tx_q[tid]; |
167 | struct ieee80211_hw *hw = &local->hw; | ||
168 | 168 | ||
169 | if ((ampdu_queue < ieee80211_num_queues(hw)) && | 169 | if ((ampdu_queue < ieee80211_num_queues(hw)) && |
170 | test_bit(ampdu_queue, local->queue_pool)) { | 170 | test_bit(ampdu_queue, local->queue_pool)) |
171 | queue = ampdu_queue; | 171 | queue = ampdu_queue; |
172 | info->flags |= IEEE80211_TX_CTL_AMPDU; | ||
173 | } else { | ||
174 | info->flags &= ~IEEE80211_TX_CTL_AMPDU; | ||
175 | } | ||
176 | } | 172 | } |
177 | 173 | ||
178 | rcu_read_unlock(); | 174 | rcu_read_unlock(); |
@@ -206,13 +202,11 @@ int ieee80211_ht_agg_queue_add(struct ieee80211_local *local, | |||
206 | * on the previous queue | 202 | * on the previous queue |
207 | * since HT is strict in order */ | 203 | * since HT is strict in order */ |
208 | #ifdef CONFIG_MAC80211_HT_DEBUG | 204 | #ifdef CONFIG_MAC80211_HT_DEBUG |
209 | if (net_ratelimit()) { | 205 | if (net_ratelimit()) |
210 | DECLARE_MAC_BUF(mac); | ||
211 | printk(KERN_DEBUG "allocated aggregation queue" | 206 | printk(KERN_DEBUG "allocated aggregation queue" |
212 | " %d tid %d addr %s pool=0x%lX\n", | 207 | " %d tid %d addr %pM pool=0x%lX\n", |
213 | i, tid, print_mac(mac, sta->sta.addr), | 208 | i, tid, sta->sta.addr, |
214 | local->queue_pool[0]); | 209 | local->queue_pool[0]); |
215 | } | ||
216 | #endif /* CONFIG_MAC80211_HT_DEBUG */ | 210 | #endif /* CONFIG_MAC80211_HT_DEBUG */ |
217 | return 0; | 211 | return 0; |
218 | } | 212 | } |