mac80211: Re-enable aggregation
Wireless HW without any dedicated queues for aggregation do not need the ampdu_queues mechanism present right now in mac80211. Since mac80211 is still incomplete wrt TX MQ changes, do not allow aggregation sessions for drivers that set ampdu_queues. This is only an interim hack until Intel fixes the requeue issue. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: Luis Rodriguez <Luis.Rodriguez@Atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user