]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/mac80211/wme.c
mac80211: Re-enable aggregation
[mirror_ubuntu-bionic-kernel.git] / net / mac80211 / wme.c
index d27ef7f2d4a76821a313beb7d6c8cb7fc2313b8c..ac71b38f7cb5cb217180bb2cef3bcfa4b6540b40 100644 (file)
@@ -114,8 +114,8 @@ u16 ieee80211_select_queue(struct net_device *dev, struct sk_buff *skb)
 {
        struct ieee80211_master_priv *mpriv = netdev_priv(dev);
        struct ieee80211_local *local = mpriv->local;
+       struct ieee80211_hw *hw = &local->hw;
        struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
-       struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
        struct sta_info *sta;
        u16 queue;
        u8 tid;
@@ -124,21 +124,19 @@ u16 ieee80211_select_queue(struct net_device *dev, struct sk_buff *skb)
        if (unlikely(queue >= local->hw.queues))
                queue = local->hw.queues - 1;
 
-       if (info->flags & IEEE80211_TX_CTL_REQUEUE) {
+       if (skb->requeue) {
+               if (!hw->ampdu_queues)
+                       return queue;
+
                rcu_read_lock();
                sta = sta_info_get(local, hdr->addr1);
                tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;
                if (sta) {
-                       struct ieee80211_hw *hw = &local->hw;
                        int ampdu_queue = sta->tid_to_tx_q[tid];
 
                        if ((ampdu_queue < ieee80211_num_queues(hw)) &&
-                           test_bit(ampdu_queue, local->queue_pool)) {
+                           test_bit(ampdu_queue, local->queue_pool))
                                queue = ampdu_queue;
-                               info->flags |= IEEE80211_TX_CTL_AMPDU;
-                       } else {
-                               info->flags &= ~IEEE80211_TX_CTL_AMPDU;
-                       }
                }
                rcu_read_unlock();
 
@@ -159,20 +157,18 @@ u16 ieee80211_select_queue(struct net_device *dev, struct sk_buff *skb)
                *p++ = ack_policy | tid;
                *p = 0;
 
+               if (!hw->ampdu_queues)
+                       return queue;
+
                rcu_read_lock();
 
                sta = sta_info_get(local, hdr->addr1);
                if (sta) {
                        int ampdu_queue = sta->tid_to_tx_q[tid];
-                       struct ieee80211_hw *hw = &local->hw;
 
                        if ((ampdu_queue < ieee80211_num_queues(hw)) &&
-                           test_bit(ampdu_queue, local->queue_pool)) {
+                           test_bit(ampdu_queue, local->queue_pool))
                                queue = ampdu_queue;
-                               info->flags |= IEEE80211_TX_CTL_AMPDU;
-                       } else {
-                               info->flags &= ~IEEE80211_TX_CTL_AMPDU;
-                       }
                }
 
                rcu_read_unlock();