ar9170: remove redundant frame flags
The flags in question were once useful for debugging. Time has passed and now they do nothing more than duplicating txinfo->flags. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
53a76b58b6
commit
15b098bbf7
2 changed files with 22 additions and 38 deletions
|
@ -248,13 +248,8 @@ struct ar9170_sta_info {
|
||||||
unsigned int ampdu_max_len;
|
unsigned int ampdu_max_len;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define AR9170_TX_FLAG_WAIT_FOR_ACK BIT(0)
|
|
||||||
#define AR9170_TX_FLAG_NO_ACK BIT(1)
|
|
||||||
#define AR9170_TX_FLAG_BLOCK_ACK BIT(2)
|
|
||||||
|
|
||||||
struct ar9170_tx_info {
|
struct ar9170_tx_info {
|
||||||
unsigned long timeout;
|
unsigned long timeout;
|
||||||
unsigned int flags;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define IS_STARTED(a) (((struct ar9170 *)a)->state >= AR9170_STARTED)
|
#define IS_STARTED(a) (((struct ar9170 *)a)->state >= AR9170_STARTED)
|
||||||
|
|
|
@ -213,10 +213,10 @@ static void ar9170_print_txheader(struct ar9170 *ar, struct sk_buff *skb)
|
||||||
struct ar9170_tx_info *arinfo = (void *) txinfo->rate_driver_data;
|
struct ar9170_tx_info *arinfo = (void *) txinfo->rate_driver_data;
|
||||||
struct ieee80211_hdr *hdr = (void *) txc->frame_data;
|
struct ieee80211_hdr *hdr = (void *) txc->frame_data;
|
||||||
|
|
||||||
printk(KERN_DEBUG "%s: => FRAME [skb:%p, q:%d, DA:[%pM] flags:%x s:%d "
|
printk(KERN_DEBUG "%s: => FRAME [skb:%p, q:%d, DA:[%pM] s:%d "
|
||||||
"mac_ctrl:%04x, phy_ctrl:%08x, timeout:[%d ms]]\n",
|
"mac_ctrl:%04x, phy_ctrl:%08x, timeout:[%d ms]]\n",
|
||||||
wiphy_name(ar->hw->wiphy), skb, skb_get_queue_mapping(skb),
|
wiphy_name(ar->hw->wiphy), skb, skb_get_queue_mapping(skb),
|
||||||
ieee80211_get_DA(hdr), arinfo->flags, ar9170_get_seq_h(hdr),
|
ieee80211_get_DA(hdr), ar9170_get_seq_h(hdr),
|
||||||
le16_to_cpu(txc->mac_control), le32_to_cpu(txc->phy_control),
|
le16_to_cpu(txc->mac_control), le32_to_cpu(txc->phy_control),
|
||||||
jiffies_to_msecs(arinfo->timeout - jiffies));
|
jiffies_to_msecs(arinfo->timeout - jiffies));
|
||||||
}
|
}
|
||||||
|
@ -440,22 +440,17 @@ void ar9170_tx_callback(struct ar9170 *ar, struct sk_buff *skb)
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&ar->tx_stats_lock, flags);
|
spin_unlock_irqrestore(&ar->tx_stats_lock, flags);
|
||||||
|
|
||||||
if (arinfo->flags & AR9170_TX_FLAG_BLOCK_ACK) {
|
if (info->flags & IEEE80211_TX_CTL_NO_ACK) {
|
||||||
ar9170_tx_ampdu_callback(ar, skb);
|
|
||||||
} else if (arinfo->flags & AR9170_TX_FLAG_WAIT_FOR_ACK) {
|
|
||||||
arinfo->timeout = jiffies +
|
|
||||||
msecs_to_jiffies(AR9170_TX_TIMEOUT);
|
|
||||||
|
|
||||||
skb_queue_tail(&ar->tx_status[queue], skb);
|
|
||||||
} else if (arinfo->flags & AR9170_TX_FLAG_NO_ACK) {
|
|
||||||
ar9170_tx_status(ar, skb, AR9170_TX_STATUS_FAILED);
|
ar9170_tx_status(ar, skb, AR9170_TX_STATUS_FAILED);
|
||||||
} else {
|
} else {
|
||||||
#ifdef AR9170_QUEUE_DEBUG
|
if (info->flags & IEEE80211_TX_CTL_AMPDU) {
|
||||||
printk(KERN_DEBUG "%s: unsupported frame flags!\n",
|
ar9170_tx_ampdu_callback(ar, skb);
|
||||||
wiphy_name(ar->hw->wiphy));
|
} else {
|
||||||
ar9170_print_txheader(ar, skb);
|
arinfo->timeout = jiffies +
|
||||||
#endif /* AR9170_QUEUE_DEBUG */
|
msecs_to_jiffies(AR9170_TX_TIMEOUT);
|
||||||
dev_kfree_skb_any(skb);
|
|
||||||
|
skb_queue_tail(&ar->tx_status[queue], skb);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ar->tx_stats[queue].len &&
|
if (!ar->tx_stats[queue].len &&
|
||||||
|
@ -1407,17 +1402,6 @@ static int ar9170_tx_prepare(struct ar9170 *ar, struct sk_buff *skb)
|
||||||
|
|
||||||
if (!(info->flags & IEEE80211_TX_CTL_NO_ACK) &&
|
if (!(info->flags & IEEE80211_TX_CTL_NO_ACK) &&
|
||||||
(is_valid_ether_addr(ieee80211_get_DA(hdr)))) {
|
(is_valid_ether_addr(ieee80211_get_DA(hdr)))) {
|
||||||
if (info->flags & IEEE80211_TX_CTL_AMPDU) {
|
|
||||||
if (unlikely(!info->control.sta))
|
|
||||||
goto err_out;
|
|
||||||
|
|
||||||
txc->mac_control |= cpu_to_le16(AR9170_TX_MAC_AGGR);
|
|
||||||
arinfo->flags = AR9170_TX_FLAG_BLOCK_ACK;
|
|
||||||
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
txc->mac_control |= cpu_to_le16(AR9170_TX_MAC_RATE_PROBE);
|
|
||||||
/*
|
/*
|
||||||
* WARNING:
|
* WARNING:
|
||||||
* Putting the QoS queue bits into an unexplored territory is
|
* Putting the QoS queue bits into an unexplored territory is
|
||||||
|
@ -1431,12 +1415,17 @@ static int ar9170_tx_prepare(struct ar9170 *ar, struct sk_buff *skb)
|
||||||
|
|
||||||
txc->phy_control |=
|
txc->phy_control |=
|
||||||
cpu_to_le32(queue << AR9170_TX_PHY_QOS_SHIFT);
|
cpu_to_le32(queue << AR9170_TX_PHY_QOS_SHIFT);
|
||||||
arinfo->flags = AR9170_TX_FLAG_WAIT_FOR_ACK;
|
|
||||||
} else {
|
if (info->flags & IEEE80211_TX_CTL_AMPDU) {
|
||||||
arinfo->flags = AR9170_TX_FLAG_NO_ACK;
|
if (unlikely(!info->control.sta))
|
||||||
|
goto err_out;
|
||||||
|
|
||||||
|
txc->mac_control |= cpu_to_le16(AR9170_TX_MAC_AGGR);
|
||||||
|
} else {
|
||||||
|
txc->mac_control |= cpu_to_le16(AR9170_TX_MAC_RATE_PROBE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_out:
|
err_out:
|
||||||
|
@ -1771,7 +1760,7 @@ static void ar9170_tx(struct ar9170 *ar)
|
||||||
arinfo->timeout = jiffies +
|
arinfo->timeout = jiffies +
|
||||||
msecs_to_jiffies(AR9170_TX_TIMEOUT);
|
msecs_to_jiffies(AR9170_TX_TIMEOUT);
|
||||||
|
|
||||||
if (arinfo->flags == AR9170_TX_FLAG_BLOCK_ACK)
|
if (info->flags & IEEE80211_TX_CTL_AMPDU)
|
||||||
atomic_inc(&ar->tx_ampdu_pending);
|
atomic_inc(&ar->tx_ampdu_pending);
|
||||||
|
|
||||||
#ifdef AR9170_QUEUE_DEBUG
|
#ifdef AR9170_QUEUE_DEBUG
|
||||||
|
@ -1782,7 +1771,7 @@ static void ar9170_tx(struct ar9170 *ar)
|
||||||
|
|
||||||
err = ar->tx(ar, skb);
|
err = ar->tx(ar, skb);
|
||||||
if (unlikely(err)) {
|
if (unlikely(err)) {
|
||||||
if (arinfo->flags == AR9170_TX_FLAG_BLOCK_ACK)
|
if (info->flags & IEEE80211_TX_CTL_AMPDU)
|
||||||
atomic_dec(&ar->tx_ampdu_pending);
|
atomic_dec(&ar->tx_ampdu_pending);
|
||||||
|
|
||||||
frames_failed++;
|
frames_failed++;
|
||||||
|
|
Loading…
Add table
Reference in a new issue